Quantcast
Channel: CodeGuru Forums - Visual C++ Programming
Viewing all articles
Browse latest Browse all 3042

What does C4237 mean?

$
0
0
warning C4273: 'MyTextOutW' : inconsistent dll linkage

I am developing the hooker in windows xp using Visual Studio 2010,
I have linked all kernel32.dll, user32.lib, advapi32.lib.... from the 7.0a sdk
By definition, WINGDIAPI is just __declspec(dllimport)

The original prototype is
Code:

__gdi_entry WINGDIAPI BOOL  WINAPI TextOutA( __in HDC hdc, __in int x, __in int y, __in_ecount(c) LPCSTR lpString, __in int c);
They just match each other, why does the warning occur?
Thanks
Jack

Code:

WINGDIAPI  BOOL    WINAPI MyTextOutA(HDC, int, int, LPCSTR, int);

BOOL    WINAPI MyTextOutA(HDC hDC, int a, int b, LPCSTR str, int c)
{
        std::string s("TextOutA called");
        logfile.write(s.c_str(), s.length());
        return ::TextOutA(hDC, a, b, "Hooked text", 11);
       
}


Viewing all articles
Browse latest Browse all 3042

Trending Articles