473,396 Members | 1,840 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,396 software developers and data experts.

How to write a callback routine for a clr ext from an unmanaged dll?

I always get -- unresolved external symbol "public: void __thiscall CMObject::TriggerEvent(int)" (?TriggerEvent@CMObject@@QAEXH@Z) when compiling the unmanaged dll.
Dec 11 '10 #1
3 2493
weaknessforcats
9,208 Expert Mod 8TB
An "unresolved external" is a link error and not a compile error.

Your dll project is missing either code for CMObject or a library that has that code in it.
Dec 11 '10 #2
I understand. I am passing the address of CMObject to the dll. If I add the cpp code for CMObject to the dll, the control will go to that code instead of the code in the .exe ( where is what I want it to do).
Dec 11 '10 #3
weaknessforcats
9,208 Expert Mod 8TB
Yes. That's what you want.

The dll has the code for CMObject so that you can call functions in the dll using a CMObject*.

Otherwise, from the dll viewpoint, what is a CMObject*. Hence your link error.

I'm not sure what you mean by "control". When you run your program, the line of control is the thread through main(). When you call a function, the thread passes to that function. That is, main() stops while the function runs. It's irrelevant whether the function is in your code, the dll code or some other library code.
Dec 12 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Paul Liversidge | last post by:
I'd like your opinions as to why I don't use something like this... A function that iterates through $_GET, $_POST, $_COOKIES and $_SESSION arrays and turn them back into conventional variables....
6
by: Peter Otten | last post by:
It's easy to write a function that wraps a generator and provides a callback. E. g.: import os, sys def walk(path, visit): """ Emulate os.path.walk() (simplified) using os.walk()""" for dir,...
0
by: david | last post by:
Hi all, I am new to C#, I am trying to use a 3-party dll that require me to setup my own call back routine in a structure. All is good with in C++ if caller in c++ but in C# I am lost. The dll...
2
by: tony lock | last post by:
I am trying to call an unmanaged dll from c#, the function is asyncronous and expects a callback function and a parameter which is labelled lpvoid but which expects the address of the calling object,...
4
by: Michael C | last post by:
Hi all, Is there an easy way to get the parameters of an asynchronous delegate call from the callback function? Here's an example of what I'm trying to do: private delegate ArrayList...
3
by: Glen | last post by:
This is my first attempt as asynchronous processing. I have created a small test app as proof of concept, but I am having one proglem. In the example (code listed below), my callback routine has...
3
by: Remi THOMAS [MVP] | last post by:
Hi, I did spend quite a long time finding how to call managed code from unmanaged C++ class. Here is the my final code: http://xtware.com/mcallback/mcallback.htm Is it the best way to do it?...
2
by: Marcus Kwok | last post by:
I have processing code (I'll call it the "model") written in native unmanaged pure C++, and I have put a GUI on top of it written using Windows Forms (.NET 1.1). The GUI is used to set the...
0
by: DavidT | last post by:
Hello, at first, exuse if the following question is simple to solve, but i normaly coding with C# and now have to use C++/CLI for one project. My Problem is that i have to use a native c++ sdk...
6
by: =?Utf-8?B?Sm9lbWFuYw==?= | last post by:
Hi, I'm trying to figure out the Callback method. I have a .dll that I call from a sub in my unmanaged code/calling program. That works just fine. But I'd like to have the .dll finish doing it's...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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
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,...

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.