TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sudripta
NA
1
0
Passing function or interface pointers from C++ to C#
May 26 2010 7:12 AM
I have a C# dll and a C++ executable. I am using COM to communicate between the unmanaged and the managed layers using COM interop. Everything is fine except for one problem. I have one time consuming operation to be done within the C# dll. I need to notify the status of the operation (i.e. percentage complete) to the C++ executable. So, I have two options:
1. To use a C++ function pointer which I will pass to the C# dll from the C++ executable. The C# dll will save this function pointer using something like delegate etc., and will call the function to update the status whenever needed.
2. To use a interface pointer which I will pass to the C# dll. The C# dll will call some function of this interface.
But, I am unsure of how to do any one of the above. Any ideas?
Reply
Answers (
0
)
Overloaded Function
Menu items with multiple displays