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

calling MFC from managed C++

I have defined a managed C++ project to call into an unmanaged MFC project. The MFC project builds successfully. However, the build of the managed project fails because the linker cannot resolve the external symbols for the methods defined in the unmanaged class. Attached is the class definition for the managed class

public __gc class MTracke

public
MTracker(Control* pControl,Control* cControl

m_CTracker = new CComTrackerApp()
IntPtr pPtr = pControl->Handle
IntPtr cPtr = cControl->Handle
HWND pHwnd = (HWND)pPtr.ToPointer()
HWND cHwnd = (HWND)cPtr.ToPointer()
m_CTracker->Create(pHwnd,cHwnd)

protected
void Dispose(bool b

MTracker::Dispose(b)

if (m_CTracker != NULL

delete m_CTracker
m_CTracker = NULL

}
private
CComTrackerApp* m_CTracker
}

The CCOMTrackerAPP class is defined in the MFC project. The linker cannot resolve the addresses for CComTracker::CComTracker() or CComTracker::Create(HWND pHwnd,HWND cHwnd). Any suggestions would be appreciated.

Nov 17 '05 #1
0 1127

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

Similar topics

2
by: b.bardugo | last post by:
Hi all, I have a C# user control (a little app I made to display video). In this code I am using a third party .dll, which is written in C++ (un-managed). I am tring to put this control on a web...
15
by: Bryan | last post by:
I have a multi-threaded C# console application that uses WMI (System.Management namespace) to make RPC calls to several servers (600+ ) and returns ScheduledJobs. The section of my code that...
2
by: Andre | last post by:
Hi, I have a problem with calling a managed C++ function from C#. The function in C++ looks like Class::Func(char* Text) this function is compiled to an DLL and this DLL is referenced in my...
4
by: zlatko | last post by:
Hello. I am new to .net . I have a managed C++ library. It looks like this. // header file namespace cppnetdll { public __gc class Class1 { public: static int foo_int(void);
5
by: Virajitha Sarma | last post by:
Hi, Can u plz help me out with how to call a C# DLL from C... I tried to find out by searching in net..but i couldnot find anything on it.... Thanku Virajitha *** Sent via Developersdex...
1
by: Jesse McGrew | last post by:
Hi all, I'm trying to make a plugin DLL for a third-party application, using VC++ .NET 2003. This DLL acts as a bridge between the C++ plugin API of the application, and my actual plugin code...
1
by: H.B. | last post by:
Hi, I need to make a function that can display data on my Managed C++ app and be called by an unmanaged C++ DLL. Something like : void Form1::Form1_Load(System::Object * sender,...
1
by: MC-Advantica | last post by:
Does anyone have a simple "Hello World" like application that demonstrates unmanaged C++ calling managed C++ developed in VS2005? I'm confused by many posts as they discuss managed extensions from...
3
by: Klaus | last post by:
Hi, I have an existing VC 6 MFC application which communicates asynchronly with a VC 2005 managed code dll. I use an unmanaged base class with virtual functions to access methods in the MFC...
7
by: =?Utf-8?B?UVNJRGV2ZWxvcGVy?= | last post by:
I have a C# logging assembly with a static constructor and methods that is called from another C# Assembly that is used as a COM interface for a VB6 Application. Ideally I need to build a file...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
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
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
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
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...

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.