Connecting Tech Pros Worldwide Forums | Help | Site Map

Pointer to a function in VB.NET?

Mark
Guest
 
Posts: n/a
#1: Nov 21 '05
I have an API I'm trying to declare that is defined with a parameter:
int(CALLBACK EXPORT *pFunc)(void)

The description says that's a pointer to a function. How would I declare
this parameter and how can I call it?

Thanks

solex
Guest
 
Posts: n/a
#2: Nov 21 '05

re: Pointer to a function in VB.NET?


Have you tired using the AddressOf Operator?

"Mark" <Mark@discussions.microsoft.com> wrote in message
news:D8936519-3580-4335-B7B0-183669DD25FF@microsoft.com...[color=blue]
> I have an API I'm trying to declare that is defined with a parameter:
> int(CALLBACK EXPORT *pFunc)(void)
>
> The description says that's a pointer to a function. How would I declare
> this parameter and how can I call it?
>
> Thanks[/color]


Mark
Guest
 
Posts: n/a
#3: Nov 21 '05

re: Pointer to a function in VB.NET?


I tried creating a delegate and then passing the AddressOf to the API. It's
erroring out on me with no description, so I can't figure out what is wrong.

"solex" wrote:
[color=blue]
> Have you tired using the AddressOf Operator?
>
> "Mark" <Mark@discussions.microsoft.com> wrote in message
> news:D8936519-3580-4335-B7B0-183669DD25FF@microsoft.com...[color=green]
> > I have an API I'm trying to declare that is defined with a parameter:
> > int(CALLBACK EXPORT *pFunc)(void)
> >
> > The description says that's a pointer to a function. How would I declare
> > this parameter and how can I call it?
> >
> > Thanks[/color]
>
>
>[/color]
Herfried K. Wagner [MVP]
Guest
 
Posts: n/a
#4: Nov 21 '05

re: Pointer to a function in VB.NET?


"Mark" <Mark@discussions.microsoft.com> schrieb:[color=blue]
>I tried creating a delegate and then passing the
> AddressOf to the API. It's erroring out on me
> with no description, so I can't figure out what is wrong.[/color]

Post your code and give details, when the error message occurs.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
solex
Guest
 
Posts: n/a
#5: Nov 21 '05

re: Pointer to a function in VB.NET?


mark, not sure if this will help you
http://msdn.microsoft.com/library/de...asp?frame=true

"Mark" <Mark@discussions.microsoft.com> wrote in message
news:1FD3822A-C6FF-4265-B893-F805057C3D6A@microsoft.com...[color=blue]
> I tried creating a delegate and then passing the AddressOf to the API.[/color]
It's[color=blue]
> erroring out on me with no description, so I can't figure out what is[/color]
wrong.[color=blue]
>
> "solex" wrote:
>[color=green]
> > Have you tired using the AddressOf Operator?
> >
> > "Mark" <Mark@discussions.microsoft.com> wrote in message
> > news:D8936519-3580-4335-B7B0-183669DD25FF@microsoft.com...[color=darkred]
> > > I have an API I'm trying to declare that is defined with a parameter:
> > > int(CALLBACK EXPORT *pFunc)(void)
> > >
> > > The description says that's a pointer to a function. How would I[/color][/color][/color]
declare[color=blue][color=green][color=darkred]
> > > this parameter and how can I call it?
> > >
> > > Thanks[/color]
> >
> >
> >[/color][/color]


Imran Koradia
Guest
 
Posts: n/a
#6: Nov 21 '05

re: Pointer to a function in VB.NET?


Coud you post the code?

Imran.

"Mark" <Mark@discussions.microsoft.com> wrote in message
news:1FD3822A-C6FF-4265-B893-F805057C3D6A@microsoft.com...[color=blue]
> I tried creating a delegate and then passing the AddressOf to the API.[/color]
It's[color=blue]
> erroring out on me with no description, so I can't figure out what is[/color]
wrong.[color=blue]
>
> "solex" wrote:
>[color=green]
> > Have you tired using the AddressOf Operator?
> >
> > "Mark" <Mark@discussions.microsoft.com> wrote in message
> > news:D8936519-3580-4335-B7B0-183669DD25FF@microsoft.com...[color=darkred]
> > > I have an API I'm trying to declare that is defined with a parameter:
> > > int(CALLBACK EXPORT *pFunc)(void)
> > >
> > > The description says that's a pointer to a function. How would I[/color][/color][/color]
declare[color=blue][color=green][color=darkred]
> > > this parameter and how can I call it?
> > >
> > > Thanks[/color]
> >
> >
> >[/color][/color]


Closed Thread