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

Managed C++/CLI

 
GeneralRe: Hi Alls Pin
vassilux@20-Jun-06 20:47
vassilux@20-Jun-06 20:47 
GeneralRe: Hi Alls Pin
vassilux@20-Jun-06 20:53
vassilux@20-Jun-06 20:53 
GeneralRe: Hi Alls Pin
Jun Du26-Jun-06 16:51
Jun Du26-Jun-06 16:51 
GeneralRe: Hi Alls Pin
vassilux@27-Jun-06 2:12
vassilux@27-Jun-06 2:12 
GeneralRe: Hi Alls Pin
Jun Du27-Jun-06 3:40
Jun Du27-Jun-06 3:40 
QuestionNeed help to return string value from COM Pin
agarunk19-Jun-06 4:41
agarunk19-Jun-06 4:41 
AnswerRe: Need help to return string value from COM Pin
Milton Karimbekallil19-Jun-06 21:58
Milton Karimbekallil19-Jun-06 21:58 
QuestionStack problem with setting callback in native code. Pin
dbriggs19-Jun-06 4:15
dbriggs19-Jun-06 4:15 
I have a 3th party dll writen in C. I have no problem calling most functions in the dll from the managed code. But there is a function that take a function pointer for setting a callback function that I am having problems with.
I have the following code:

First in a wrapper class

[DllImport("w32dll.dll")]
static void dllSetCallFp( void (*aFp)(void*) );

Then in seperate class.
delegate void funDelegate(void*);
typedef void (__cdecl *FUNPT)(void*);
funDelegate ^ fp  = gcnew funDelegate(MFun);
pin_ptr<funDelegate^> pp = &fp;
IntPtr ip = Marshal::GetFunctionPointerForDelegate(fp);
FUNPT cb  = static_cast<FUNPT>(ip.ToPointer());

Wrapper::dllSetCallFp(cb);

MFun is just a test function.
void Client::MFun(void* pV)
{
	int i = 9;
}

The problem is I can debug into the calling of MFun but when I return I get the following errors
Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.
Then
'FatalExecutionEngineError'

Can anyone help me with this?
-Thanks
AnswerRe: Stack problem with setting callback in native code. Pin
Jun Du27-Jun-06 7:27
Jun Du27-Jun-06 7:27 
QuestionMultidimension arrays Pin
Preminition18-Jun-06 11:57
Preminition18-Jun-06 11:57 
AnswerRe: Multidimension arrays Pin
Michael Dunn18-Jun-06 13:38
sitebuilderMichael Dunn18-Jun-06 13:38 
AnswerRe: Multidimension arrays Pin
2bee 18-Jun-06 20:14
2bee 18-Jun-06 20:14 
QuestionDataGrid/DataGridView within a MFC dialog Pin
Kulch4216-Jun-06 11:10
Kulch4216-Jun-06 11:10 
QuestionConver Data Type Problem Pin
dataminers16-Jun-06 5:17
dataminers16-Jun-06 5:17 
AnswerRe: Conver Data Type Problem Pin
2bee 16-Jun-06 6:58
2bee 16-Jun-06 6:58 
GeneralRe: Conver Data Type Problem Pin
dataminers16-Jun-06 12:58
dataminers16-Jun-06 12:58 
QuestionHow to Create Array of Labels on the Run-Time ? Pin
dataminers16-Jun-06 2:34
dataminers16-Jun-06 2:34 
AnswerRe: How to Create Array of Labels on the Run-Time ? [modified] Pin
2bee 16-Jun-06 2:46
2bee 16-Jun-06 2:46 
GeneralRe: How to Create Array of Labels on the Run-Time ? Pin
dataminers16-Jun-06 3:58
dataminers16-Jun-06 3:58 
GeneralRe: How to Create Array of Labels on the Run-Time ? [modified] Pin
2bee 16-Jun-06 4:08
2bee 16-Jun-06 4:08 
GeneralRe: How to Create Array of Labels on the Run-Time ? Pin
dataminers16-Jun-06 5:31
dataminers16-Jun-06 5:31 
AnswerRe: How to Create Array of Labels on the Run-Time ? [modified] Pin
2bee 16-Jun-06 6:50
2bee 16-Jun-06 6:50 
GeneralRe: How to Create Array of Labels on the Run-Time ? Pin
dataminers16-Jun-06 13:11
dataminers16-Jun-06 13:11 
AnswerRe: How to Create Array of Labels on the Run-Time ? Pin
2bee 16-Jun-06 21:29
2bee 16-Jun-06 21:29 
GeneralRe: How to Create Array of Labels on the Run-Time ? Pin
dataminers18-Jun-06 11:21
dataminers18-Jun-06 11:21 

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.