Passing Windows handle into an Unmanaged C++ dll -
An unmanaged C ++ DLL has an exported function, which takes an integer type window as a handle < / P>
zero set windowhandle (int'hindal); Otherwise where unmanaged DLL code int is placed on hwnd and used properly.
And from Windows applications, I set the handle as follows
_hHandle = this-> Handle.ToInt32 (); M_pViewer-> SetWindowHandle (_hHandle); Where is a private member inside the class <_> _hHandle am I handling correctly? It seems as though it is, but apparently this app does not give output output. I suspect that the problem is with handle.
PS: I have access to unmanaged DLL so that I can replace any suggestion I can amend.
On its face, nothing is wrong, you have not shown the whole. One thing to see the Net Declaration is that calling conventions need to match. Normal calling conference for DLL is stdcall , but it is not the default in C ++, you will usually need to ask for it using the WINAPI macro as if you were using all the windows headers Look in
Since you have access to both sides of the call, do you want to ensure that you are using Use the debugger ? Either set up the breakpoint and check the values of variables, or print the value in the debug console or a file and observe the result.
Comments
Post a Comment