convert function to IntPtr

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
 
A

Armin Zingler

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top