473,394 Members | 1,812 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

delegate = pointer to function?

I've got an externally-defined method in a dll. The .h files for the dll
has something like

typedef int func (...);

int f (func* x);

Is this the right conversion:

Public Delegate func(...) as Integer
Declare Function f Lib "dll" (ByVal x as func) as Integer

Ken
Nov 20 '05 #1
1 986
Hi,

Maybe this will help
http://www.elitevb.com/content/01,0075,01/04.aspx

Ken
--------------------------
"Ken Kast" <ke*@NOSPAMkenkast.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
I've got an externally-defined method in a dll. The .h files for the dll
has something like

typedef int func (...);

int f (func* x);

Is this the right conversion:

Public Delegate func(...) as Integer
Declare Function f Lib "dll" (ByVal x as func) as Integer

Ken

Nov 20 '05 #2

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

Similar topics

5
by: Edward Diener | last post by:
The first type to a delegate constructor is obvious. It is a System::Object * . What is the MC++ type of the second argument to the delegate constructor ? In C++ it would be a member function...
11
by: Florian A. | last post by:
Hi everyone! I'm trying to write a global hook in C# and C++/CLI. I'm almost done if there wasn't this little delegate problem. I get the function pointer to a delegate and pass it to my...
3
by: Minh Khoa | last post by:
Please give me more information about delegate and its usage? Why do i use it and when?
2
by: sg71.cherub | last post by:
Here I am meeting a problem. I am transfering unmanaged C/C++ codes to managed C# codes. For the general C/C++ function pointer, it is easy to implement its function by C# delegate. e.g. Declare...
4
by: ^MisterJingo^ | last post by:
Hi all, I've been trying to get my head around delegates. The book i'm using had a single example, not much explaination, and didn't show how to set up a delegate and pass variables in and out...
0
by: Haxan | last post by:
Hi, I have an unmanaged application that converts a function pointer to a delegate and then pass this as a parameter(delegate) to a managed function which then invokes it. Currently Im able to...
3
by: lothar.behrens | last post by:
Hi, I am thinking about the delegate mechanism and try to understand it. I am coming from C++ and know about callbacks or member callbacks. In C++ I have this typedef for every class that...
3
by: vijay.gandhi | last post by:
Hi, I am trying to convert a set of classes written in VC++ 6.0 to a .DLL file using VC++ .NET (Visual Studio 2005) and C++/CLI. I made one of the classes (one at the root level) to be a 'ref'...
0
by: ling2000 | last post by:
Hello all, I'm trying to upgrade a VB6 project into VB.net, and the problem I had is in converting 'address of' to 'delegate'. I had the error "Value of type 'DelegateIDccManSink_OnLogIpAddr'...
10
by: vcquestions | last post by:
Hi. Is there way to have a function pointer to a delegate in c++/cli that would allow me to pass delegates with the same signatures as parameters to a method? I'm working with managed code. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...

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.