Answer the question
In order to leave comments, you need to log in
How to call FindWindowA function in Windows Forms?
I wrote a small console program, it had these lines:
hwnd = FindWindowA(NULL, "Notepad");
GetWindowThreadProcessId(hwnd, &procid);
unresolved external symbol "extern "C" struct HWND__ * __stdcall FindWindowA(char const *,char const *)" ([email protected]@[email protected]@[email protected])
unresolved external symbol "extern "C" unsigned long __stdcall GetWindowThreadProcessId(struct HWND__ *,unsigned long *)" ([email protected]@[email protected]@[email protected])
Answer the question
In order to leave comments, you need to log in
1. Right click on project -- > Properties --> Configuration Properties --> Linker --> Input
2. Select the 'Additional Dependencies" property node and then Click the on the 3 dotted (...) button
3. Then on the 'Additional Dependencies' popup, input "user32.lib" on the top textbox and click on 'Ok' button
4. Click on 'Apply' button and re-compile your application. .............. the linker errors are gone!
https://docs.microsoft.com/en-us/dotnet/standard/n...
https://pinvoke.net/default.aspx/user32/FindWindow.html
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question