L
Lloyd Dupont
I have some managed C++ interacting with native DLL,
for good integration I'm setting up some function pointer in the native DLL,
passing some function pointer from the managed world.
=================
typedef void __cdecl NSLogHandler(Oid exception);
static void __cdecl ObjectiveNSLogHandler(Oid ns_str)
{
NSString^ str = dynamic_cast<NSString^>( ObjcRuntime::GetId(ns_str) );
Console::WriteLine("GNUstep.NET: "+str);
}
void ObjcRuntime::SetupNSLogHandler()
{
NSLogHandler** p_nslog_h = (NSLogHandler**) GetProcAddress(_hLibGSBase,
"_NSLog_printf_handler");
if( !p_nslog_h )
throw gcnew ObjectiveCException("Cannot set NSLog Handler");
*p_nslog_h = &ObjectiveNSLogHandler;
}
=================
I wonder if it's allright or if the code (hence its address) could be moved
too?
what could I do in this case?
--
Regards,
Lloyd Dupont
NovaMind development team
NovaMind Software
Mind Mapping Software
<www.nova-mind.com>
for good integration I'm setting up some function pointer in the native DLL,
passing some function pointer from the managed world.
=================
typedef void __cdecl NSLogHandler(Oid exception);
static void __cdecl ObjectiveNSLogHandler(Oid ns_str)
{
NSString^ str = dynamic_cast<NSString^>( ObjcRuntime::GetId(ns_str) );
Console::WriteLine("GNUstep.NET: "+str);
}
void ObjcRuntime::SetupNSLogHandler()
{
NSLogHandler** p_nslog_h = (NSLogHandler**) GetProcAddress(_hLibGSBase,
"_NSLog_printf_handler");
if( !p_nslog_h )
throw gcnew ObjectiveCException("Cannot set NSLog Handler");
*p_nslog_h = &ObjectiveNSLogHandler;
}
=================
I wonder if it's allright or if the code (hence its address) could be moved
too?
what could I do in this case?
--
Regards,
Lloyd Dupont
NovaMind development team
NovaMind Software
Mind Mapping Software
<www.nova-mind.com>