Can anybody elaborate the meaning of following log message on Mono?

I am trying to run the application on Mono framework which is built on windows platform. I know that there are some platform specific Interop calls are used in it. While running the application in Mono with debug I got following message. I know that it is looking for LoadLibrary but my interest is to know about "__Internal", what does this mean?

Mono: DllImport attempting to load: '__Internal'.
    Mono: DllImport loaded library '(null)'.
    Mono: DllImport searching in: '__Internal' ('(null)').
    Mono: Searching for 'LoadLibrary'.
    Mono: Probing 'LoadLibrary'.
    Mono: Probing 'LoadLibrary'.
    Mono: Probing 'LoadLibraryA'.
    Mono: Probing 'LoadLibraryA'.
    Mono: DllImport searching in: '__Internal' ('(null)').
    Mono: Searching for 'GetProcAddress'.
    Mono: Probing 'GetProcAddress'.
    Mono: Probing 'GetProcAddress'.
    Mono: Probing 'GetProcAddressA'.
    Mono: Probing 'GetProcAddressA'.
    Mono: DllImport searching in: '__Internal' ('(null)').
    Mono: Searching for 'FreeLibrary'.
    Mono: Probing 'FreeLibrary'.
    Mono: Probing 'FreeLibrary'.
    Mono: Probing 'FreeLibraryA'.
    Mono: Probing 'FreeLibraryA'.
    Mono: DllImport searching in: '__Internal' ('(null)').
    Mono: Searching for 'LoadLibrary'.
    Mono: Probing 'LoadLibrary'.
    Mono: Probing 'LoadLibrary'.
    Mono: Probing 'LoadLibraryA'.
    Mono: Probing 'LoadLibraryA'.

With Best Regards, Omky

Answers


It is the name of the DLL that's being searched for the function. That would normally be "kernel32.dll" to find LoadLibrary() but Mono also supports the special name "__Internal". Which makes it look for the exported function in DLLs that are already loaded. A feature that was originally intended for embedding Mono in an unmanaged program.

It works on Windows, even if Mono is not embedded. Kernel32.dll is always loaded since it is required to get the process running. So the likely [DllImport] directive was:

[DllImport ("__Internal", CharSet = CharSet.Ansi)]
static extern bool LoadLibrary(string path);

Need Your Help

Facebook Graph not returning email

javascript facebook facebook-graph-api

UPDATE It seems that my personnal email address had not been used for years. Facebook marked it as inactive and did not return it as part of the JSON.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.