Ok, I've placed
/////
Public Delegate Sub GM_MessageCallbackFunc(ByVal aMessageText As String)
Public Declare Sub GM_SetMessageCallback Lib "GlobalMapperInterface" _
( _
ByVal aCallbackFunc As GM_MessageCallbackFunc _
)
/////
into a module. On a Form I've placed
/////
Private Sub HandleLoadError(ByVal sError As String)
Debug.Print(sError)
End Sub
Private Sub Load()
Dim MessageDelegate As GM_MessageCallbackFunc
MessageDelegate = AddressOf HandleLoadError
(...Attempt Data Loading...)
End Sub
/////
but my handling sub is never called. It should be, because unmanaged DLL that I'm making
calls to displays it's Load Error dialog box - which is what the Sub above is supposed to
supress and let the client handle instead. What have I done incorrectly?
Lance
"Mattias Sjögren" <ma********************@mvps.orgwrote in message
news:ea**************@TK2MSFTNGP05.phx.gbl...
how do I translate this to VB2005 and then actually use it?
Try this:
Delegate Sub GM_MessageCallbackFunc(aMessageText As String)
Declare Sub GM_SetMessageCallback Lib "your.dll" (aCallbackFunc As
GM_MessageCallbackFunc)
Mattias
--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.