[mono-android] C to C#
goncalo at minkan.net
Mon Feb 20 17:15:09 UTC 2012
This is not exactly Android specific, but I am writing a wrapper for a
native library using the C header as a reference.
I'm not sure if I'm doing this wrong, or there's something else beyond the
wrapper, so maybe someone can help me out, I'm a bit rusty on these things.
// callback (ConnEventType is an enum)
typedef void (*CommCallback) (ConnEventType status, unsigned long connID);
// method (callingConvention is also an enum)
long Msg_StartUp (void *pConnEventFn, const char *pConfigPath, bool
bIsProLicensed = true, bool bIsSDKLicensed = true, bool bStartConnection =
true, callingConvention convention = convention_default);
delegate void DelegateCommCallback( ConnEventType status, uint connID );
[DllImport( "libsdk", EntryPoint = "Java_com_sdk_Msg_Msg_1StartUp", CharSet
= CharSet.Auto )]
private static extern int Msg_StartUp( DelegateCommCallback commCallback,
byte configDir, bool isProLicensed, bool isSDKLicensed, bool
startConnection, int convention );
Does this seem wrong to anyone?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Monodroid