Click here to Skip to main content
14,689,513 members
Home » Discussions » Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: Hi Alls Pin
vassilux@20-Jun-06 21:47
Membervassilux@20-Jun-06 21:47 
GeneralRe: Hi Alls Pin
vassilux@20-Jun-06 21:53
Membervassilux@20-Jun-06 21:53 
GeneralRe: Hi Alls Pin
Jun Du26-Jun-06 17:51
MemberJun Du26-Jun-06 17:51 
GeneralRe: Hi Alls Pin
vassilux@27-Jun-06 3:12
Membervassilux@27-Jun-06 3:12 
GeneralRe: Hi Alls Pin
Jun Du27-Jun-06 4:40
MemberJun Du27-Jun-06 4:40 
QuestionNeed help to return string value from COM Pin
agarunk19-Jun-06 5:41
Memberagarunk19-Jun-06 5:41 
AnswerRe: Need help to return string value from COM Pin
Milton Karimbekallil19-Jun-06 22:58
MemberMilton Karimbekallil19-Jun-06 22:58 
QuestionStack problem with setting callback in native code. Pin
dbriggs19-Jun-06 5:15
Memberdbriggs19-Jun-06 5: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 8:27
MemberJun Du27-Jun-06 8:27 
QuestionMultidimension arrays Pin
Preminition18-Jun-06 12:57
MemberPreminition18-Jun-06 12:57 
AnswerRe: Multidimension arrays Pin
Michael Dunn18-Jun-06 14:38
sitebuilderMichael Dunn18-Jun-06 14:38 
AnswerRe: Multidimension arrays Pin
2bee 18-Jun-06 21:14
Member 2bee 18-Jun-06 21:14 
QuestionDataGrid/DataGridView within a MFC dialog Pin
Kulch4216-Jun-06 12:10
MemberKulch4216-Jun-06 12:10 
QuestionConver Data Type Problem Pin
dataminers16-Jun-06 6:17
Memberdataminers16-Jun-06 6:17 
AnswerRe: Conver Data Type Problem Pin
2bee 16-Jun-06 7:58
Member 2bee 16-Jun-06 7:58 
GeneralRe: Conver Data Type Problem Pin
dataminers16-Jun-06 13:58
Memberdataminers16-Jun-06 13:58 
QuestionHow to Create Array of Labels on the Run-Time ? Pin
dataminers16-Jun-06 3:34
Memberdataminers16-Jun-06 3:34 
AnswerRe: How to Create Array of Labels on the Run-Time ? [modified] Pin
2bee 16-Jun-06 3:46
Member 2bee 16-Jun-06 3:46 
GeneralRe: How to Create Array of Labels on the Run-Time ? Pin
dataminers16-Jun-06 4:58
Memberdataminers16-Jun-06 4:58 
GeneralRe: How to Create Array of Labels on the Run-Time ? [modified] Pin
2bee 16-Jun-06 5:08
Member 2bee 16-Jun-06 5:08 
GeneralRe: How to Create Array of Labels on the Run-Time ? Pin
dataminers16-Jun-06 6:31
Memberdataminers16-Jun-06 6:31 
AnswerRe: How to Create Array of Labels on the Run-Time ? [modified] Pin
2bee 16-Jun-06 7:50
Member 2bee 16-Jun-06 7:50 
GeneralRe: How to Create Array of Labels on the Run-Time ? Pin
dataminers16-Jun-06 14:11
Memberdataminers16-Jun-06 14:11 
AnswerRe: How to Create Array of Labels on the Run-Time ? Pin
2bee 16-Jun-06 22:29
Member 2bee 16-Jun-06 22:29 
GeneralRe: How to Create Array of Labels on the Run-Time ? Pin
dataminers18-Jun-06 12:21
Memberdataminers18-Jun-06 12: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.