Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 0) extern "C" __declspec(dllexport)
- - - - - - - - - - - - - - - - - -
- 1) int (*_rr)();
- 2) HMODULE hDll = 0;
- 3) hDll = LoadLibrary("dll/for.dll");
- 4) _rr = (int(*)())GetProcAddress(hDll, "_rr");
- 5) FreeLibrary(hDll);
- #ifdef __GNUC__ //******************************* For GCC compiler ******************
- // !!! Обязательно инициализируйте в этой области все массивы и переменные !!!
- __declspec (dllexport) int _n __attribute__((section (".shared"), shared))
- = 123;
- __declspec (dllexport) int arr[22] __attribute__((section (".shared"), shared))
- = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement