C#.DLL in C++ benutzen nach MSDN Tutorial
-
Hi,
ich mache gerade folgendes Tutorial:
http://msdn2.microsoft.com/en-us/library/aa645738(VS.71).aspxDoch wenn ich die C++-Datei kompiliere, bekomme ich folgende Errors:
1>main.cpp 1>main.cpp(23) : error C2065: 'IManagedInterface' : undeclared identifier 1>main.cpp(23) : error C2065: 'cpi' : undeclared identifier 1>main.cpp(28) : error C2065: 'CLSID_InterfaceImplementation' : undeclared identifier 1>main.cpp(30) : error C2065: 'IID_IManagedInterface' : undeclared identifier 1>main.cpp(47) : error C2227: left of '->PrintHi' must point to class/struct/union/generic type 1> type is ''unknown-type'' 1>main.cpp(53) : error C2227: left of '->Release' must point to class/struct/union/generic type 1> type is ''unknown-type'' 1>main.cpp 1>main.cpp(23) : error C2065: 'IManagedInterface' : undeclared identifier 1>main.cpp(23) : error C2065: 'cpi' : undeclared identifier 1>main.cpp(28) : error C2065: 'CLSID_InterfaceImplementation' : undeclared identifier 1>main.cpp(30) : error C2065: 'IID_IManagedInterface' : undeclared identifier 1>main.cpp(47) : error C2227: left of '->PrintHi' must point to class/struct/union/generic type 1> type is ''unknown-type'' 1>main.cpp(53) : error C2227: left of '->Release' must point to class/struct/union/generic type 1> type is ''unknown-type'' 1>Generating Code...
Ich benutze VC++2005 und VC#2005. Weiß einer woran das liegen kann? Die tlb-Datei habe ich auch dem Projekt hinzugefügt.