<roadm...@yahoo.com> wrote in message
news:48edfb63.720...@sybase.com...
In your DLL,
1. add a new function registerWindow(HWND windowhandle)
return long // export DLL function if your DLL is not an OLE
Object
in this function, your C# code has to keep the window handle
to a member variable for calling back to PowerBuilder
2. In your DLL event,
add code to call PowerBuilder event,
PostMessage(windowhandle, 1024, 0, 0) // or your data
In PowerBuilder script, event 'open'
1. register your PowerBuilder window to C# DLL
- If your C# is an OLE object
// after ole_dll is created and connected
ole_dll.registerWindow(handle(this))
- If your C# is not an OLE object, you need to declare an
external function first, Function long registerWindow(long
al_window_handle) Library "YourDLL.DLL"
registerWindow(handle(this))
2.add an user event in that window 'pbm_custom01' to catch
the calling back from DLL
MessageBox("Hello", "C# DLL")