none
Call from Unmanaged code, static managed methods RRS feed

Answers

  • Using ICLRRuntimeHost::ExecuteInDefaultAppDomain() is a handy way to call a simple static method.  Writing managed code in the C++/CLI syntax that simply exports a static function which in turn calls the managed method is another way to do this, you won't have to load the CLR yourself.
    Hans Passant.
    Thursday, September 18, 2008 6:33 PM
    Moderator

All replies

  • Using ICLRRuntimeHost::ExecuteInDefaultAppDomain() is a handy way to call a simple static method.  Writing managed code in the C++/CLI syntax that simply exports a static function which in turn calls the managed method is another way to do this, you won't have to load the CLR yourself.
    Hans Passant.
    Thursday, September 18, 2008 6:33 PM
    Moderator
  • Hi, all

    Anyone, please teach me how to create an object of managed class in unmanaged class within the same application (under MFC c++ vs2008) ?
    (I can turn "/clr" option on only for the managed c++ class, for the whole application it's off due to the compatibility issue.)

    jsk
    Friday, September 19, 2008 12:06 AM
  • Start your own thread, this isn't yours.
    Hans Passant.
    Friday, September 19, 2008 12:31 AM
    Moderator