Re: translating more stuff from C
- From: "Lance" <nunya@xxxxxxxxxxxx>
- Date: Wed, 23 Aug 2006 16:25:40 -0500
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" <mattias.dont.want.spam@xxxxxxxx> wrote in message
news:eaWTT6uxGHA.1300@xxxxxxxxxxxxxxxxxxxxxxx
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.
.
- Follow-Ups:
- Re: translating more stuff from C
- From: Lance
- Re: translating more stuff from C
- References:
- translating more stuff from C
- From: Lance
- Re: translating more stuff from C
- From: Mattias Sjögren
- translating more stuff from C
- Prev by Date: Re: Rich Text to Text Conversion
- Next by Date: Re: VB Express SQL Express Remote Connection
- Previous by thread: Re: translating more stuff from C
- Next by thread: Re: translating more stuff from C
- Index(es):
Relevant Pages
|