#include #define ISOLATION_AWARE_ENABLED 1 #include __declspec(dllimport) int funca( int i ); int main( int argc, char **argv ) { char buf[ 100 ]; HMODULE hb = LoadLibrary( "dll\\b.dll" ); int (*b)(int) = GetProcAddress( hb, "funcb" ); printf( "hmodule: %x *funcb:%x \n", hb, b ); funca( 1 ); printf( "Back in main after calling locally bound funca\n"); gets( buf ); b( 2 ); return 0; } /* a.dll (v1)*/ #include __declspec(dllexport) int _stdcall funca( int i ) { return printf( "a.dll{v1.0.0.0}:funca() called with %d\n", i ); } /* b.dll */ #include __declspec(dllexport) int funcb( int i ) { printf( "b.dll:funcb() called with %d\n", i ); funca( i + 1 ); return 1; } /* a.dll (v2)*/ #include __declspec(dllexport) int funca( int i ) { return printf( "a.dll{v2.0.0.0}:funca() called with %d\n", i ); }