473,480 Members | 2,134 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Pointer to a function in VB.NET?

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
Nov 21 '05 #1
5 1166
Have you tired using the AddressOf Operator?

"Mark" <Ma**@discussions.microsoft.com> wrote in message
news:D8**********************************@microsof t.com...
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

Nov 21 '05 #2
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:
Have you tired using the AddressOf Operator?

"Mark" <Ma**@discussions.microsoft.com> wrote in message
news:D8**********************************@microsof t.com...
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


Nov 21 '05 #3
"Mark" <Ma**@discussions.microsoft.com> schrieb:
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.


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

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #4
mark, not sure if this will help you
http://msdn.microsoft.com/library/de...asp?frame=true

"Mark" <Ma**@discussions.microsoft.com> wrote in message
news:1F**********************************@microsof t.com...
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:
Have you tired using the AddressOf Operator?

"Mark" <Ma**@discussions.microsoft.com> wrote in message
news:D8**********************************@microsof t.com...
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


Nov 21 '05 #5
Coud you post the code?

Imran.

"Mark" <Ma**@discussions.microsoft.com> wrote in message
news:1F**********************************@microsof t.com...
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:
Have you tired using the AddressOf Operator?

"Mark" <Ma**@discussions.microsoft.com> wrote in message
news:D8**********************************@microsof t.com...
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


Nov 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

37
4941
by: Ben | last post by:
Hi, there. Recently I was working on a problem where we want to save generic closures in a data structure (a vector). The closure should work for any data type and any method with pre-defined...
16
1898
by: fix | last post by:
Hi all, I am new to C and I just started to program for a homework. I included my code down there. It is a fraction "class". I declared the Fraction struct, tried to create some invalid fraction,...
35
2852
by: tuko | last post by:
Hello kind people. Can someone explain please the following code? /* Create Storage Space For The Texture */ AUX_RGBImageRec *TextureImage; /* Line 1*/ /* Set The Pointer To NULL...
23
7759
by: bluejack | last post by:
Ahoy... before I go off scouring particular platforms for specialized answers, I thought I would see if there is a portable C answer to this question: I want a function pointer that, when...
51
4390
by: Kuku | last post by:
What is the difference between a reference and a pointer?
9
23716
by: Morten Lemvigh | last post by:
Is it possible to pass a pointer to a constructor or a class definition as argument to a function? Maybe in a way similar to passing function pointers...? The function should construct a number...
26
4819
by: aruna.mysore | last post by:
Hi all, I have a specific problem passing a function pointer array as a parameter to a function. I am trying to use a function which takes a function pointer array as an argument. I am too sure...
20
2195
by: MikeC | last post by:
Folks, I've been playing with C programs for 25 years (not professionally - self-taught), and although I've used function pointers before, I've never got my head around them enough to be able to...
50
4422
by: Juha Nieminen | last post by:
I asked a long time ago in this group how to make a smart pointer which works with incomplete types. I got this answer (only relevant parts included): ...
10
3549
by: Richard Heathfield | last post by:
Stephen Sprunk said: <snip> Almost. A function name *is* a pointer-to-function. You can do two things with it - copy it (assign its value to an object of function pointer type, with a...
0
6920
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7060
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7106
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7022
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5365
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4799
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4501
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3013
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
572
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.