the first function is called from dll_1, this function calls the second function from dll_2, the second function calls the third function from dll_1, the third function calls the fourth function from dll_2, the fourth function displays an inscription. how to do it? here are my attempts to write code.
dll_1:
#include "stdafx.h" #include <iostream> using namespace std; void first_func(void) { cout << "First function in first dll\n"; three_func(); } void second_func(void) { cout << "second function in first dll.\n"; four_func(); } _declspec(dllexport) void three_func(void) { three_func(); } _declspec(dllexport) void four_func(void) { four_func(); } dll_2:
#include "stdafx.h" #include <iostream> using namespace std; void three_func(void) { cout << "three function in second dll\n"; second_func(); } void four_func(void) { cout << "four function in second dll\nНу нифига себе."; } _declspec(dllexport) void second_func(void) { second_func(); }
_declspec(dllexport) void three_func(void) { three_func(); }_declspec(dllexport) void three_func(void) { three_func(); }? Why it is impossible without it, and declspec to hang on the original function? Plus you need a header, of course. - VladD