//The original array is here: __declspec(dllexport) bot_movestate_t *botmovestates[MAX_CLIENTS+1]; __declspec(dllexport) struct bot_movestate_s **Getbotmovestates( void ) { return botmovestates; }
struct bot_movestate_s *ai_main_botmovestates[MAX_CLIENTS+1]; typedef struct bot_movestate_s **(* fGetbotmovestates_t)( void ); struct bot_movestate_s **fGetbotmovestates( fGetbotmovestates_t pfGetbotmovestates ){ return pfGetbotmovestates(); } //sm func void smfunc() { fGetbotmovestates_t pfGetbotmovestates; HMODULE hLib; ///////////////////////////// hLib = LoadLibrary(TEXT("smdll.dll")); if (hLib == NULL) { //Module not found, permission denied, ... return; //inform caller of error } pfGetbotmovestates = (fGetbotmovestates_t)GetProcAddress(hLib, TEXT("Getbotmovestates")); if ( pfGetbotmovestates == NULL) { return; } ai_main_botmovestates = fGetbotmovestates(pfGetbotmovestates);//error C2106: '=' : left operand must be l-value ///////////////////////////// }
//error error C2106: '=' : left operand must be l-value
ai_main_botmovestates
struct bot_movestate_s **ai_main_botmovestates;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)