convert function to IntPtr

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Can anyone help me with this one...

I am doing an API call and need to convert a function address to a IntPtr for a callback...

e.g.

RasDial(X,X,X,Pointer to Callback Function,X)

'Pointer to CallBack Function' needs to be of type IntPtr and the actual function to handle the callback is

RasCallBackFunction (byval X as X, byval X as X, byval X as X)


Thanks .. Ken
 
Ken Hughes said:
Can anyone help me with this one...

I am doing an API call and need to convert a function address to a
IntPtr for a callback...

e.g.

RasDial(X,X,X,Pointer to Callback Function,X)

'Pointer to CallBack Function' needs to be of type IntPtr and the
actual function to handle the callback is

RasCallBackFunction (byval X as X, byval X as X, byval X as X)

Declare it as a Delegate, not as IntPtr.

http://msdn.microsoft.com/library/en-us/cpguide/html/cpconusingcallbackfunctions.asp

--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html
 
Back
Top