S
SM
Hello group,
we are converting a VB6 application, written by other
people, for .NET Framework.
Original application depends on a DLL written in standard C.
The application communicates with an external device
using serial API functions located on the DLL.
Original developer write a VB function which makes a
call located in the DLL passing the instance and a function
pointer to a VB function. The DLL code creates an
invisible window with CreateWindow() function using
instance handle and function pointer (as WndProc,just
to handle a custom WM_xxx message).
Until the code was VB6/C code, it was OK.
Now, the code is, with a little modifications, VB.NET
and we receive an INVALID_HANDLE error on
CreateWindow() function.
I suppose the problem is on HINSTACE handle, cause
the VB.NET function used as WndProc receive a couple of
standard messages (WM_NCCREATE/WM_NCDESTROY).
We need to leave 'untouched' the DLL (now unmanaged).
How can we solve ?
Is it possible to use the VB.NET HINSTANCE in the same
way of the old VB HINSTANCE to create a new window in
a C ?
Thanks a lot,
regards
we are converting a VB6 application, written by other
people, for .NET Framework.
Original application depends on a DLL written in standard C.
The application communicates with an external device
using serial API functions located on the DLL.
Original developer write a VB function which makes a
call located in the DLL passing the instance and a function
pointer to a VB function. The DLL code creates an
invisible window with CreateWindow() function using
instance handle and function pointer (as WndProc,just
to handle a custom WM_xxx message).
Until the code was VB6/C code, it was OK.
Now, the code is, with a little modifications, VB.NET
and we receive an INVALID_HANDLE error on
CreateWindow() function.
I suppose the problem is on HINSTACE handle, cause
the VB.NET function used as WndProc receive a couple of
standard messages (WM_NCCREATE/WM_NCDESTROY).
We need to leave 'untouched' the DLL (now unmanaged).
How can we solve ?
Is it possible to use the VB.NET HINSTANCE in the same
way of the old VB HINSTANCE to create a new window in
a C ?
Thanks a lot,
regards