1>Linking...
1> Creating library .\Debug/ExpertSample.lib and object .\Debug/ExpertSample.exp
1>LINK : warning LNK4199: /DELAYLOAD:OleAcc.dll ignored; no imports found from OleAcc.dll
1>ExpertSample.obj : error LNK2019: unresolved external symbol __imp__GetWindowTextA@12 referenced in function "int __stdcall EnumWindowsProc(struct HWND__ *,long)" (?EnumWindowsProc@@YGHPAUHWND__@@J@Z)
1>ExpertSample.obj : error LNK2019: unresolved external symbol __imp__GetWindowThreadProcessId@8 referenced in function "int __stdcall EnumWindowsProc(struct HWND__ *,long)" (?EnumWindowsProc@@YGHPAUHWND__@@J@Z)
1>ExpertSample.obj : error LNK2019: unresolved external symbol __imp__EnumWindows@8 referenced in function "bool __stdcall Account_Validation(void)" (?Account_Validation@@YG_NXZ)
1>.\Debug/ExpertSample.dll : fatal error LNK1120: 3 unresolved externals
1>Build log was saved at "file://c:\Users\Reza\Desktop\Unlimited\DLLSample\Debug\BuildLog.htm"
1>ExpertSample - 4 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I added Wininet.lib too, but I have these errors too.
Can you help me for solve that.
Thanks.
What does Wininet.lib have to do with GetWindowText API?
Please, read the GetWindowText Function and other Windows API documentation and note the Requirements section:
Requirements
... Header
Winuser.h (include Windows.h)
Library
User32.lib
DLL
User32.dll
Unicode and ANSI names
GetWindowTextW (Unicode) and GetWindowTextA (ANSI)
In the bootom of each function documentation from MSDN, you can find in which library it is.
For example, if you use GetWindowText you need to link to User32.lib.
However, to avoid headaches, you can create a Win32 application from scratch. The good Application Wizard will add libs itself.
Bookmarks