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

Managed C++/CLI

 
GeneralRe: using a MFC DLL in C++ .Net Pin
ursus zeta12-Jul-05 11:30
ursus zeta12-Jul-05 11:30 
GeneralRe: using a MFC DLL in C++ .Net Pin
Anonymous12-Jul-05 21:38
Anonymous12-Jul-05 21:38 
GeneralRe: using a MFC DLL in C++ .Net Pin
ursus zeta17-Jul-05 13:50
ursus zeta17-Jul-05 13:50 
GeneralUsi Pin
Anonymous11-Jul-05 0:04
Anonymous11-Jul-05 0:04 
QuestionHow to make installer Pin
saifi_hazarvi10-Jul-05 20:30
saifi_hazarvi10-Jul-05 20:30 
Generalhelp needed adding com components with idl Pin
arusmemon8-Jul-05 20:41
arusmemon8-Jul-05 20:41 
GeneralRe: help needed adding com components with idl Pin
ursus zeta9-Jul-05 10:25
ursus zeta9-Jul-05 10:25 
Generalcannot pass a __delegate ptr to a C++ function Pin
glutz8-Jul-05 11:32
glutz8-Jul-05 11:32 
(This is a clarification of my prev post - I dont mean to spam but somehow i cannot modify my old post - sorry!)

I have no trouble passing __delegate ptrs to native C functions in DLLs,
however when attempting to pass the __delegate ptr to a native C++ function
in a DLL I get the following runtime exception: An unhandled exception of
type 'System.EntryPointNotFoundException'.

This is confusing b/c if the entry point was not found, I would think I'd
get an unresolved symbol error during linking. Furthermore, I can
successfully pass void, int *, and function pointers, etc to C++ DLL
functions, but this error persists when attempting to pass a __delegate
pointer, which is used for callbacks to managed C++ functions.

Here is the relevant code snippet - the DLL code simply contains stubs of
the functions called here:

using namespace System;
using namespace System::Runtime::InteropServices;

__delegate void testCB();
[DllImport("unmdll.dll")]
void fnunmdll_2(testCB *UpdateProgMeter);

int fnunmdll_0(void);
void fnunmdll_1(int);

__gc class C1
{
public:
static void handleCB()
{
return;
}
};

int _tmain()
{
int k = 9;

//always works (as both C/C++)
fnunmdll_0();

//always works (as both C/C++)
fnunmdll_1(k);

testCB *pCB = new testCB(0, &C1::handleCB);

//if this is a C++ function expecting a function pointer, the
aforementioned error occurs. If this is an extern C function, all is ok!
fnunmdll_2(pCB);

return 0;
}

As crazy as it sounds, I'm beginning to think this is not possible to do this
with native C++ functions.

Thanks in advance, George
GeneralRe: cannot pass a __delegate ptr to a C++ function Pin
glutz8-Jul-05 13:54
glutz8-Jul-05 13:54 
GeneralRe: cannot pass a __delegate ptr to a C++ function Pin
Sheng Jiang 蒋晟10-Jul-05 13:59
Sheng Jiang 蒋晟10-Jul-05 13:59 
GeneralPassing callback params to an unmanaged DLL (written in C++) Pin
Glutz78bb7-Jul-05 7:06
Glutz78bb7-Jul-05 7:06 
QuestionHow to Convert VC# code to MC++ Pin
meetsukant7-Jul-05 0:21
meetsukant7-Jul-05 0:21 
AnswerRe: How to Convert VC# code to MC++ Pin
Christian Graus7-Jul-05 2:01
protectorChristian Graus7-Jul-05 2:01 
General.NET and c++ Pin
lemccain7-Jul-05 0:17
lemccain7-Jul-05 0:17 
GeneralRe: .NET and c++ Pin
Christian Graus7-Jul-05 2:04
protectorChristian Graus7-Jul-05 2:04 
GeneralRe: .NET and c++ Pin
Anonymous7-Jul-05 9:06
Anonymous7-Jul-05 9:06 
QuestionHow do you create a folder? Pin
Lagwagon566-Jul-05 7:37
Lagwagon566-Jul-05 7:37 
AnswerRe: How do you create a folder? Pin
Christian Graus6-Jul-05 11:18
protectorChristian Graus6-Jul-05 11:18 
GeneralRe: How do you create a folder? Pin
Lagwagon566-Jul-05 13:24
Lagwagon566-Jul-05 13:24 
GeneralRe: How do you create a folder? Pin
Christian Graus6-Jul-05 13:28
protectorChristian Graus6-Jul-05 13:28 
QuestionUsing images with managed c++?? Pin
richiemac6-Jul-05 0:49
richiemac6-Jul-05 0:49 
AnswerRe: Using images with managed c++?? Pin
Christian Graus6-Jul-05 11:19
protectorChristian Graus6-Jul-05 11:19 
GeneralMDI - help w/image background Pin
Qwick Miller5-Jul-05 16:45
Qwick Miller5-Jul-05 16:45 
GeneralRe: MDI - help w/image background Pin
Saksida Bojan7-Jul-05 20:41
Saksida Bojan7-Jul-05 20:41 
GeneralMDI - Accessing MDI parents public variables. Pin
Qwick Miller5-Jul-05 16:44
Qwick Miller5-Jul-05 16:44 

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.