Click here to Skip to main content
15,908,112 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
AnswerRe: alternate code for cp command Pin
Christian Graus14-Sep-06 19:35
protectorChristian Graus14-Sep-06 19:35 
GeneralRe: alternate code for cp command Pin
vinod_kumar23314-Sep-06 21:44
vinod_kumar23314-Sep-06 21:44 
GeneralRe: alternate code for cp command Pin
Christian Graus14-Sep-06 22:20
protectorChristian Graus14-Sep-06 22:20 
QuestionGlobal hook for system menu events Pin
Harshabhi12-Sep-06 15:22
Harshabhi12-Sep-06 15:22 
QuestionStatus window in DLL Pin
mparent12-Sep-06 11:45
mparent12-Sep-06 11:45 
Questionlistview and columns Pin
aguest12-Sep-06 11:26
aguest12-Sep-06 11:26 
QuestionReferenced namespace in another project not linking Pin
Klempie12-Sep-06 2:49
Klempie12-Sep-06 2:49 
QuestionMaking a dot net wrapper [modified] Pin
User 58385211-Sep-06 15:25
User 58385211-Sep-06 15:25 
I have the task of making a library that we can use from c++ (windows and linux) and c#

So far I have one project that implements the basic functionality. Its plain old c++ and boost and can be built into a windows dll or a linux library. I call it the raw library.

I have a managed library project which will hopefully implement a wrapper around the raw library to make it available to c#

In my raw lib I have a class called Raw::Car (not really but its a good example)
Car has a number of events implemented with boost::function template

eg

boost::function<void (void)> Changed;

In my managed wrapper project I have a class called Managed::Car that has a private Raw::Car* member pointing to the 'real' car object.
I want Managed::Car to subscribe to the boost events in Raw::Car and raise dot net events when the events in Raw::Car are raised.

I cant pass a pointer to a function in Managed::Car to the boost event
eg
theRawCar->Changed = boost::bind(&Managed::Car::OnRawChanged, this);

error C3374: can't take address of 'Managed::Car::OnRawChanged' unless creating delegate instance

I guessing this is because the GC could move the function?

I thought I would create a non managed template that could subscribe to the boost event and call into the managed class to raise the dot net event but a non managed class or template cant have a reference to a managed class.

Can this be overcome by using a delegate? if so how?


-- modified at 21:30 Monday 11th September, 2006
AnswerRe: Making a dot net wrapper Pin
User 58385211-Sep-06 19:50
User 58385211-Sep-06 19:50 
QuestionTree View Control Pin
LakshmiPathiRao10-Sep-06 21:52
LakshmiPathiRao10-Sep-06 21:52 
AnswerRe: Tree View Control Pin
shezh12-Sep-06 5:25
shezh12-Sep-06 5:25 
QuestionStrange template behaviour? [modified] Pin
Zigenstein10-Sep-06 19:59
Zigenstein10-Sep-06 19:59 
AnswerRe: Strange template behaviour? [modified] Pin
George L. Jackson13-Sep-06 15:36
George L. Jackson13-Sep-06 15:36 
Questionstrange behaviour!!!!!!!!! Pin
hadez80310-Sep-06 13:02
hadez80310-Sep-06 13:02 
AnswerRe: strange behaviour!!!!!!!!! Pin
bob1697210-Sep-06 14:20
bob1697210-Sep-06 14:20 
Questiontic-tac-toe Pin
SwatiPathania10-Sep-06 5:50
SwatiPathania10-Sep-06 5:50 
AnswerRe: tic-tac-toe Pin
toxcct10-Sep-06 6:47
toxcct10-Sep-06 6:47 
QuestionHow can I make an editor, using C++? Pin
SwatiPathania10-Sep-06 5:49
SwatiPathania10-Sep-06 5:49 
QuestionSeeking hands Pin
kcynic8-Sep-06 21:40
kcynic8-Sep-06 21:40 
AnswerRe: Seeking hands Pin
toxcct10-Sep-06 6:50
toxcct10-Sep-06 6:50 
QuestionVC++ Express and GTK+ Pin
delphidab8-Sep-06 14:21
delphidab8-Sep-06 14:21 
QuestionReturn value from a function Pin
ankit_cse8-Sep-06 11:33
ankit_cse8-Sep-06 11:33 
AnswerRe: Return value from a function Pin
Jun Du9-Sep-06 5:07
Jun Du9-Sep-06 5:07 
GeneralRe: Return value from a function Pin
ankit_cse10-Sep-06 15:37
ankit_cse10-Sep-06 15:37 
Questiondynamically loading an unmanaged dll Pin
shezh8-Sep-06 7:13
shezh8-Sep-06 7:13 

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.