[Mono-list] dllentry

mrpugh at gmx.de mrpugh at gmx.de
Mon Jan 23 14:08:24 EST 2006


Hi!

I have some problems with dllmap and dllentry.

I try to make a call to the following method:

[DllImport("MSVCRT.DLL")]
private static extern int _vsnprintf(StringBuilder buffer, int count, String
format, IntPtr argptr);

For windows this is no problem, but under Linux I have to map this call to
vsnprintf in libc.

I tried this in [assemblyname].conf:

<configuration>
   <dllmap dll="MSVCRT.DLL" target="libc.so.6" />
   <dllmap dll="MSVCRT.DLL">
     <dllentry dll="libc.so.6" name="_vsnprintf" target="vsnprintf" />
   </dllmap>
</configuration>

The MSVCRT.DLL gets resolved to libc.so.6 but the method-name is not
resolved:

Unhandled Exception: System.TypeInitializationException: An exception was
thrown by the type initializer for JxtaNET.JxtaObject --->
System.EntryPointNotFoundException: _vsnprintf

Did I make a mistake or is this a bug in mono?

Thank You!
  Ruben

-- 
Telefonieren Sie schon oder sparen Sie noch?
NEU: GMX Phone_Flat http://www.gmx.net/de/go/telefonie


More information about the Mono-list mailing list