c# - PIVOKE Stackimbalance error -
Hello, I was wondering what's wrong with this PINVOKE announcement? I have not found a mistake.
This code is in C ++;);
This is my announcement:
[DllImport ("CppHookDll.dll", Charset = Charset.Auto, // EntryPoint = "? SetHook @@ YGHHHPAPAHWND __ @@@Z ", EntryPoint =" SetKeyboardHook ", ExactSpelling = true, Calling Convention = Calling Conference. STCOL) Public Static External Bull Sethook (Int hook type, bull bistle, [Marshal AS (unmanaged type. ] UInt32 dwThreadId, IntPtr hWndCaller); Thank you in advance.
It seems that you are just importing the wrong function, the name of the function in unmanaged code SetHook is named , but you are importing a function named SetKeyboardHook . Probably there is a separate signature in the function SetKeyboardHook , which will explain the stack imbalance warning.
Comments
Post a Comment