.net - What is the expected behavior of LoadLibrary() when called from an unmanaged process (native C++) on a managed assembly (C#) -


i've added hosting interface native c++ application instantiates clr, creates custom appdomainmanager, , provides calls load managed assemblies native process. in native c++ loaddll() function expecting able test incoming dll .net vs c++ calling loadlibrary(dllpath) assumed return failure (null) managed assemblies, i'm finding returning handle instead (this no clr running in unmanaged process). normal behavior unmanaged loadlibrary() call on managed assembly?

i'm not sure understand how loadlibrary can find proper entry point test in managed assembly. know (one possible) way solve problem, , way i'm planning implement, use clr instance access .net reflection apis , check if dll managed there first...but i'm puzzled fact loadlibrary() isn't returning failure , i'd understand i'm missing here. behavior undefined, should return handle, or depend on configuration of managed assembly? link references appreciated.

edit:

question answered in comments, closing.

no, won't anything, dll/exe of managed program stub(stub means template essential) program attempt call mscoree, .net runtime executor, called shim, because attempt select version of .net framework(and native function name called _corexemain), shim bootstrap .net framework, , launch clr instance, start procession of il codes inside pe, besides it's metadata generated cil compiler, such resource pools(string pool, constant values), function prototypes, inheritance, , generics types.

for more information, take deep @ this: http://blog.vuscode.com/malovicn/archive/2007/12/25/net-foundations-net-execution-model.aspx , won't disappointed.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -