CreateWindowExA Hook und seine fehler

iderise

Mitglied
Hallo,
nach langer Zeit hier auch mal wieder eine Frage von mir:

Ich Hooke CreateWindowExA (um in einem Programm den Fenstertitel zu verändern~
Code:
			OrgCreateWindowExA		=		HookImported("USER32.DLL", "CreateWindowExA", MyCreateWindowExA);

Code:
HWND WINAPI MyCreateWindowExA (DWORD dwExStyle,LPCTSTR lpClassName, LPCTSTR lpWindowName, DWORD dwStyle, int x, int y, int nWidth, int nHeight, HWND hWndParent, HMENU hMenu, HINSTANCE hInstance, LPVOID lpParam);

HWND (*OrgCreateWindowExA) (DWORD dwExStyle, LPCTSTR lpClassName, LPCTSTR lpWindowName, DWORD dwStyle, int x, int y, int nWidth, int nHeight, HWND hWndParent, HMENU hMenu, HINSTANCE hInstance, LPVOID lpParam);

Code:
#define HookImported(MyFunctionModule, MyFunctionName, MyNewProc) HookImportedFunction( GetModuleHandle(0), (PSTR)MyFunctionModule, (PSTR)MyFunctionName, (PROC)MyNewProc,0)

an dem Fehler brech ich mir im Moment die Finger...:
Vs c++:
error C2440: '=': 'PROC' kann nicht in 'HWND (__cdecl *)(DWORD,LPCTSTR,LPCTSTR,DWORD,int,int,int,int,HWND,HMENU,HINSTANCE,LPVOID)' konvertiert werden
Diese Konvertierung erfordert einen reinterpret_cast-Operator oder eine Typumwandlung im C- oder Funktionsformat

Bcc32:
Error E2034 dll.cpp 13: Cannot convert 'int (__stdcall *)()' to 'HWND__ * (*)(un
signed long,const char *,const char *,unsigned long,int,int,int,int,HWND__ *,HME
NU__ *,HINSTANCE__ *,void *)' in function __stdcall DllMain(HINSTANCE__ *,unsign
ed long,void *)
(zeile 13 -> erstes code fenster)
Weis da jemand näheres? Oder hat Vorschläge/Lösungsansätze?

Währe euch dankbar^^
 
Zurück