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

Managed C++/CLI

 
AnswerRe: Reflection and MessageBox [modified] Pin
Luc Pattyn31-Mar-09 5:15
sitebuilderLuc Pattyn31-Mar-09 5:15 
GeneralRe: Reflection and MessageBox Pin
W Balboos, GHB31-Mar-09 6:43
W Balboos, GHB31-Mar-09 6:43 
QuestionResolving C++ dll's inside CLI Pin
BicycleTheif31-Mar-09 2:38
BicycleTheif31-Mar-09 2:38 
AnswerRe: Resolving C++ dll's inside CLI Pin
Mark Salsbery31-Mar-09 6:27
Mark Salsbery31-Mar-09 6:27 
QuestionPop-up Blocker for cable boxes Pin
Quecumber25629-Mar-09 13:40
Quecumber25629-Mar-09 13:40 
QuestionWhy does False = True !?!?!?!? [modified] Pin
Xpnctoc28-Mar-09 12:08
Xpnctoc28-Mar-09 12:08 
AnswerIt's a VS 2008 Watch window bug! Pin
Xpnctoc29-Mar-09 10:08
Xpnctoc29-Mar-09 10:08 
QuestionPassing pointer to C++ function from VC++ Pin
Kurt Richardson27-Mar-09 8:36
Kurt Richardson27-Mar-09 8:36 
Hi
I currently working on building a VC++.NET wrapper for a C++ DLL. Everything compiles fine, but for some reason any methods that require pointers to be passed do not appear to be public in the wrapper class. As an example:

The prototype for a function in the C++ DLL might be:

const char* error_msg( );


so I create a corresponding function in the VC++.NET wrapper class as:

String^ o10xxBase::flash_m::error_msg()
{
	return(gcnew System::String (m_flash->error_msg()));
}


This seems to work fine. Another example that requires input parameters... the prototype for the C++ function might be:

void WriteIoRegisterDW( unsigned int addr, unsigned int data );


so I create a corresponding function in the VC++.NET wrapper class as:

void o10xxBase::o10xxIo_m::WriteIoRegisterDW( unsigned int addr, unsigned int data )
{
	(m_o10xxIo->WriteIoRegisterDW( addr, data ));
}


Again this works fine it seems. However if the C++ prototype requires a pointer input things don't work so well. For example, prototype for the C++ function might be:

void read_fifo( short *p_Buffer, int count );


so I create a corresponding function in the VC++.NET wrapper class as:


void o10xxBase::adi_9446_a2d_m::read_fifo( short * p_Buffer, int count )
{
	(m_adi_9446_a2d->read_fifo( p_Buffer, count ));
}


This compiles with no errors, and yet the function does not appear in the wrapper class even though it is listed as public. Seems to be some issue I am overlooking with the movement of pointers from managed to unmanaged code.

Any thoughts most welcome.

Kind regards, Kurt
AnswerRe: Passing pointer to C++ function from VC++ Pin
Mark Salsbery27-Mar-09 10:38
Mark Salsbery27-Mar-09 10:38 
GeneralRe: Passing pointer to C++ function from VC++ Pin
Kurt Richardson30-Mar-09 7:22
Kurt Richardson30-Mar-09 7:22 
QuestionWrapper for CDialog class in C++/CLI dll Pin
Oldboy227-Mar-09 6:05
Oldboy227-Mar-09 6:05 
AnswerRe: Wrapper for CDialog class in C++/CLI dll Pin
Mark Salsbery27-Mar-09 6:42
Mark Salsbery27-Mar-09 6:42 
GeneralRe: Wrapper for CDialog class in C++/CLI dll Pin
led mike27-Mar-09 8:50
led mike27-Mar-09 8:50 
GeneralRe: Wrapper for CDialog class in C++/CLI dll Pin
Mark Salsbery27-Mar-09 8:55
Mark Salsbery27-Mar-09 8:55 
GeneralRe: Wrapper for CDialog class in C++/CLI dll Pin
Oldboy231-Mar-09 14:59
Oldboy231-Mar-09 14:59 
Questionshort cut key to a button ... Pin
m_mun25-Mar-09 23:09
m_mun25-Mar-09 23:09 
AnswerRe: short cut key to a button ... Pin
N a v a n e e t h25-Mar-09 23:32
N a v a n e e t h25-Mar-09 23:32 
Questionhelp with C++ Pin
mimikoyan25-Mar-09 18:15
mimikoyan25-Mar-09 18:15 
AnswerStop reposting your question you fraking monkey Pin
led mike26-Mar-09 4:42
led mike26-Mar-09 4:42 
QuestionCorrect handling of binary data defined in .h from a .Net perspective Pin
atzplzw25-Mar-09 9:02
atzplzw25-Mar-09 9:02 
AnswerRe: Correct handling of binary data defined in .h from a .Net perspective Pin
led mike25-Mar-09 9:47
led mike25-Mar-09 9:47 
Questionlistbox not visible in thread Pin
Thilek25-Mar-09 6:53
Thilek25-Mar-09 6:53 
AnswerRe: listbox not visible in thread Pin
Thilek25-Mar-09 9:09
Thilek25-Mar-09 9:09 
Questionhelp with C++ pragraming Pin
mimikoyan25-Mar-09 0:56
mimikoyan25-Mar-09 0:56 
QuestionForm refresh... and accept click on button while performing other task... Pin
Thilek24-Mar-09 23:31
Thilek24-Mar-09 23:31 

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.