Click here to Skip to main content
14,846,958 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: Convert string array from C# to C++ ? Pin
taibc18-Jun-13 17:21
Membertaibc18-Jun-13 17:21 
QuestionGetting assembly details (descripton, version, etc) set for a C++/CLI assembly Pin
John Schroedl12-Jun-13 5:29
professionalJohn Schroedl12-Jun-13 5:29 
AnswerRe: Getting assembly details (descripton, version, etc) set for a C++/CLI assembly Pin
John Schroedl12-Jun-13 10:15
professionalJohn Schroedl12-Jun-13 10:15 
Questionwindows sdk Pin
Member 259538310-Jun-13 6:02
MemberMember 259538310-Jun-13 6:02 
AnswerRe: windows sdk Pin
Richard MacCutchan10-Jun-13 7:05
mveRichard MacCutchan10-Jun-13 7:05 
QuestionVC++ import dll command causes error C2872 'ambiguous symbol' in comdefsp.h Pin
devguy242-Jun-13 23:34
Memberdevguy242-Jun-13 23:34 
AnswerRe: VC++ import dll command causes error C2872 'ambiguous symbol' in comdefsp.h Pin
Member 259538311-Jun-13 12:10
MemberMember 259538311-Jun-13 12:10 
QuestionType casting in C++\CLI project Pin
for study23-May-13 20:41
Memberfor study23-May-13 20:41 
I have project which I am compiling with /clr. I have a class like below..

ref class A
{
public:
 void CheckValue(void * test);
 typedef ref struct val
{
 std::string *x;
}val_t;

};


in my implementation I ahve to use something like below..

void A::CheckValue(void *test)
{
 a::val_t^ allVal = (a::val_t^)test;
}


in my main I have used like..


int main()
{
A^ obj = gcnew A();
a::val_t valObj = new std::string("Test");
obj->CheckValue((void*)valObj);
}


I am getting type cast error and two places - obj->CheckValue((void*)valObj); and at obj->CheckValue((void*)valObj); error C2440: 'type cast' : cannot convert from 'void*' to 'A::val_t ^'

This snippet is just to show behavior at my end and I ahve to use it this way only. Earlier I was running it using non /clr so it compiled fine.

Now question I have how can I make this type casting work in C++/CLI type project?
AnswerRe: Type casting in C++\CLI project Pin
David Knechtges24-May-13 3:29
MemberDavid Knechtges24-May-13 3:29 
GeneralRe: Type casting in C++\CLI project Pin
Member 259538311-Jun-13 12:41
MemberMember 259538311-Jun-13 12:41 
Questionetting Access Violation Exception -Attempted to read or write protected memory - when trying to convert unmanaged array of structures into managed class in Vb.Net (VS2010,4.0 framework) in Windows 7 -64 bit mode. Pin
VijaySandur25-Apr-13 3:44
MemberVijaySandur25-Apr-13 3:44 
AnswerRe: etting Access Violation Exception -Attempted to read or write protected memory - when trying to convert unmanaged array of structures into managed class in Vb.Net (VS2010,4.0 framework) in Windows 7 -64 bit mode. Pin
John Schroedl25-Apr-13 7:52
professionalJohn Schroedl25-Apr-13 7:52 
AnswerRe: etting Access Violation Exception -Attempted to read or write protected memory - when trying to convert unmanaged array of structures into managed class in Vb.Net (VS2010,4.0 framework) in Windows 7 -64 bit mode. Pin
Richard MacCutchan25-Apr-13 22:29
mveRichard MacCutchan25-Apr-13 22:29 
GeneralRe: etting Access Violation Exception -Attempted to read or write protected memory - when trying to convert unmanaged array of structures into managed class in Vb.Net (VS2010,4.0 framework) in Windows 7 -64 bit mode. Pin
Tripurari Chaudhary13-May-13 23:43
MemberTripurari Chaudhary13-May-13 23:43 
QuestionRe: etting Access Violation Exception -Attempted to read or write protected memory - when trying to convert unmanaged array of structures into managed class in Vb.Net (VS2010,4.0 framework) in Windows 7 -64 bit mode. Pin
Richard MacCutchan13-May-13 23:50
mveRichard MacCutchan13-May-13 23:50 
AnswerRe: etting Access Violation Exception -Attempted to read or write protected memory - when trying to convert unmanaged array of structures into managed class in Vb.Net (VS2010,4.0 framework) in Windows 7 -64 bit mode. Pin
Tripurari Chaudhary13-May-13 23:44
MemberTripurari Chaudhary13-May-13 23:44 
QuestionAd Hoc routing protocol Pin
3bood.ghzawi18-Apr-13 2:43
Member3bood.ghzawi18-Apr-13 2:43 
AnswerRe: Ad Hoc routing protocol Pin
Richard MacCutchan18-Apr-13 4:27
mveRichard MacCutchan18-Apr-13 4:27 
GeneralRe: Ad Hoc routing protocol Pin
3bood.ghzawi18-Apr-13 5:09
Member3bood.ghzawi18-Apr-13 5:09 
GeneralRe: Ad Hoc routing protocol Pin
Richard MacCutchan18-Apr-13 5:42
mveRichard MacCutchan18-Apr-13 5:42 
GeneralRe: Ad Hoc routing protocol Pin
3bood.ghzawi19-Apr-13 0:05
Member3bood.ghzawi19-Apr-13 0:05 
GeneralRe: Ad Hoc routing protocol Pin
Richard MacCutchan19-Apr-13 0:38
mveRichard MacCutchan19-Apr-13 0:38 
GeneralRe: Ad Hoc routing protocol Pin
Joe Woodbury24-Apr-13 8:22
professionalJoe Woodbury24-Apr-13 8:22 
GeneralRe: Ad Hoc routing protocol Pin
Richard MacCutchan24-Apr-13 9:30
mveRichard MacCutchan24-Apr-13 9:30 
QuestionDisplay only 2 digs in string in label. Pin
Søren Lyder Nielsen17-Apr-13 23:50
MemberSøren Lyder Nielsen17-Apr-13 23:50 

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.