Hi, I'm trying to use the Skype Sdk in mono embedded. I'm able to load the assemblies but when I try to create a instance of a class that internally calls System.Environment.GetCommandLineArgs it throws an exception. After digging a bit I found out the System.Environment.GetCommandLineArgs internally invokes:
private static extern string[] GetCommandLineArgsNative(); this method is returning null therefore it fails. I'm trying to add an internal call to the extern method using: mono_add_internal_call ("System.Environment::GetCommandLineArgsNative", (void*)GetCommandLine); I also tried: mono_add_internal_call ("mscorlib.System.Environment::GetCommandLineArgsNative", (void*)GetCommandLine); but neither of them seem to work as my C++ function is never invoked. C++ function: MonoArray* GetCommandLine() { MonoDomain* domain = mono_domain_get(); MonoArray* array = mono_array_new(domain, mono_get_string_class(), 1); MonoString* ret = mono_string_new(domain, "yeah!"); mono_array_setref(array, 0, ret); return array; } Am I missing something? Thanks in advanced. -- View this message in context: http://mono.1490590.n4.nabble.com/mono-add-internal-call-to-mscorlib-method-tp4667951.html Sent from the Mono - Dev mailing list archive at Nabble.com. _______________________________________________ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list