Click here to Skip to main content
14,603,561 members

Managed C++/CLI

 
GeneralRe: C++ to Managed CLI Pin
Richard MacCutchan2-Apr-14 5:34
mveRichard MacCutchan2-Apr-14 5:34 
GeneralRe: C++ to Managed CLI Pin
sunshine@work.2-Apr-14 21:41
professionalsunshine@work.2-Apr-14 21:41 
GeneralRe: C++ to Managed CLI Pin
Richard MacCutchan2-Apr-14 23:17
mveRichard MacCutchan2-Apr-14 23:17 
GeneralRe: C++ to Managed CLI Pin
sunshine@work.3-Apr-14 22:44
professionalsunshine@work.3-Apr-14 22:44 
GeneralRe: C++ to Managed CLI Pin
Richard MacCutchan3-Apr-14 22:55
mveRichard MacCutchan3-Apr-14 22:55 
QuestionPassing unsigned int* from Native C++ to Managed C++ Pin
paulpraveen13-Mar-14 19:27
Memberpaulpraveen13-Mar-14 19:27 
AnswerRe: Passing unsigned int* from Native C++ to Managed C++ Pin
Richard MacCutchan17-Mar-14 4:24
mveRichard MacCutchan17-Mar-14 4:24 
Questionvc++2003 interop call c# DLL Pin
X.Q.Wang13-Mar-14 19:04
MemberX.Q.Wang13-Mar-14 19:04 
Hello,

I'm maintaining a previous system with VC++2003, and have to add more functions. I deveoped them with C# DLL. But now I can't call C# DLL from VC++ code.

pasted some code piece as below:

------------------------
c# part:

using System;

namespace MyCSClass
{

public class CSClass
{
public CSClass(){}

public void Print(){
System.Console.Writeline("Hello, I'm in CSClass");
}
}
}

--------------------
C++ part:

#using "..." //the DLL
using namespace MyCSClass;

void CPlus::CallCSClass()
{
CSClass ^ obj = gcnew CSClass();
obj->Print();
}

-----------------
The error is:

error C2143: Syntax error: missing ";" (before "^")
error C2065: "obj" undefined.
error C2227: "->Print" .....

Above is my translation, orginal is below:

error C2143: 语法错误 : 缺少“;”(在“^”的前面)
error C2143: 语法错误 : 缺少“;”(在“^”的前面)
error C2065: “objAuthen” : 未声明的标识符
error C2227: “->Authenticate”的左侧必须指向类/结构/联合类型是“'unknown-type'”

Anyone can help me? Thanks!
Code Project

AnswerRe: vc++2003 interop call c# DLL Pin
John Schroedl14-Mar-14 4:28
professionalJohn Schroedl14-Mar-14 4:28 
GeneralRe: vc++2003 interop call c# DLL Pin
X.Q.Wang14-Mar-14 21:50
MemberX.Q.Wang14-Mar-14 21:50 
GeneralRe: vc++2003 interop call c# DLL Pin
John Schroedl17-Mar-14 2:58
professionalJohn Schroedl17-Mar-14 2:58 
GeneralRe: vc++2003 interop call c# DLL Pin
X.Q.Wang20-Mar-14 1:21
MemberX.Q.Wang20-Mar-14 1:21 
Questionmedical store management Pin
Member 1062319524-Feb-14 20:51
MemberMember 1062319524-Feb-14 20:51 
AnswerRe: medical store management Pin
Richard MacCutchan24-Feb-14 21:21
mveRichard MacCutchan24-Feb-14 21:21 
QuestionMODBUS TCP in C Pin
JJ_201016-Feb-14 21:13
MemberJJ_201016-Feb-14 21:13 
QuestionRe: MODBUS TCP in C Pin
Richard MacCutchan16-Feb-14 22:56
mveRichard MacCutchan16-Feb-14 22:56 
AnswerRe: MODBUS TCP in C Pin
JJ_201016-Feb-14 23:14
MemberJJ_201016-Feb-14 23:14 
GeneralRe: MODBUS TCP in C Pin
Richard MacCutchan17-Feb-14 0:35
mveRichard MacCutchan17-Feb-14 0:35 
GeneralRe: MODBUS TCP in C Pin
JJ_201017-Feb-14 0:48
MemberJJ_201017-Feb-14 0:48 
GeneralRe: MODBUS TCP in C Pin
sathish_blr7-Jul-14 21:22
Membersathish_blr7-Jul-14 21:22 
Questionredirecting output of CMD with administrator privileges Pin
camillo8715-Feb-14 22:13
Membercamillo8715-Feb-14 22:13 
Questionhow to lock function used by thread? Pin
jone201324-Feb-14 20:43
Memberjone201324-Feb-14 20:43 
AnswerRe: how to lock function used by thread? Pin
Malli_S4-Feb-14 23:28
MemberMalli_S4-Feb-14 23:28 
QuestionHow to model endless-loop with states in UML-state-diagram Pin
Frygreen26-Jan-14 0:24
MemberFrygreen26-Jan-14 0:24 
AnswerRe: How do model endless-loop in UML Pin
Richard MacCutchan26-Jan-14 1:11
mveRichard MacCutchan26-Jan-14 1:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.