473,394 Members | 1,641 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.

Linker Error in Managed Wrapper when calling Method with CString Parameter

Hello Newsgroup,

I'm struggeling with wrapping a dll using MFC CStrings.

Code:

class CLASSEXPORTDLL_API CClassExportDll {

public:

long InitMcs5 (HWND hWnd, CString path);

}


When I try to call that member method linker fails with:

Error 3 error LNK2019: unresolved external symbol "public: long __thiscall
CClassExportDll::InitMcs5(struct HWND__ *,class ATL::CStringT<wchar_t,class
StrTraitMFC_DLL<wchar_t,class ATL::ChTraitsCRT<wchar_t >)"
(?InitMcs5@CClassExportDll@@$$FQAEJPAUHWND__@@V?$C StringT@_WV?$StrTraitMFC_DLL@_WV?$ChTraitsCRT@_W@A TL@@@@@ATL@@@Z)
referenced in function "public: __clrcall
CarlZeissWrapper::Test::Test(void)" (??0Test@CarlZeissWrapper@@$$FQ$AAM@XZ)
CarlZeiss.Wrapper.obj

Does anybody know how to successfully call an umanaged member function
consuming a MFC CString from
a C++/CLI mixed code project?

Thanks, Sebastian Dau
Jul 14 '06 #1
0 1231

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

Similar topics

7
by: Klaus Bonadt | last post by:
I have an existing VC6 application using the MFC. I am able to pass CString and other parameters from such a VC6 dll to an unmanaged MFC dll (compiled in Visual Studio .NET). Now I want to use...
1
by: sklett | last post by:
STILL trying to wrap an unmanaged C++ class that is itself a wrapper to some COM stuff, not sure, it is littered with LPDISPATCH and InvokeHelper, etc. Problem is, when something goes wrong, I'm...
3
by: WithPit | last post by:
I am trying to create an managed wrapper but have some problems with it by using abstract classes. In my unmanaged library code i had the following three classes with the following hierarchy ...
11
by: James Crouch | last post by:
I am trying to create a managed c++ wrapper and have run into a problem is when SetNewNetworkCallBack is run. It doesn't like that NetworkID isn't an UInt16. I get the error: ...
3
by: Chucker | last post by:
Hi Folks, I got a Wrapper Dll around a native C++ static library. In .NET 1.1 this worked fine. When moving to .NET 2.0 I get a couple of unresolved externals / linker errors: Error 16 error...
19
by: ashmangat | last post by:
Hi! now on the chapter "string-class" My assignment is below Word Counter: Write a function that accepts a pointer to a C-String as an argument and returns the number of words contained in the...
0
by: Kurt | last post by:
I have an MFC static lib which exports som classes, it still needs to be available to MFC apps and now C# apps as well. For C# I am creating a wrapper dll that will link in the library. My question...
5
by: Andy | last post by:
I'm having trouble accessing an unmanaged long from a managed class in VC++.NET When I do, the contents of the variable seem to be mangled. If I access the same variable byte-by-byte, I get the...
4
by: Olivier Matrot | last post by:
Hello, I'm in the process of writing a managed wrapper on legacy C++ code. I have to deal with methods that are using the ellipsis. For instance,the legacy method is : void CLog::Print (LPCSTR...
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
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...
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.