I am trying to have an MFC application that shares data with a DLL.
The DLL is loaded via a batch file in a C-Scripting environment.
I have included the following lines of code in both the EXE and DLL
#pragma data_seg(".CSL_DATA")
int volatile abortFlag = 0; /* The flag to abort the test */
int volatile contiuneFlag = 1; /* The flag to schedule the test to continue */
int volatile enterFlag = 0; /* The flag to schedule data entry the test */
#pragma data_seg()
#pragma comment(linker, "/SECTION:.CSL_DATA,RWS")
On the C-Scripting side of things the batch file loads the DLL as follows:-
#loadlibrary 'WHLLIB'
However any changes in the data (abortFlag say) is not reflected in the other side.
Basically all I want is the 3 variables to be visible by the libray and the application.
Am I doing it wrong?!?
The DLL is loaded via a batch file in a C-Scripting environment.
I have included the following lines of code in both the EXE and DLL
#pragma data_seg(".CSL_DATA")
int volatile abortFlag = 0; /* The flag to abort the test */
int volatile contiuneFlag = 1; /* The flag to schedule the test to continue */
int volatile enterFlag = 0; /* The flag to schedule data entry the test */
#pragma data_seg()
#pragma comment(linker, "/SECTION:.CSL_DATA,RWS")
On the C-Scripting side of things the batch file loads the DLL as follows:-
#loadlibrary 'WHLLIB'
However any changes in the data (abortFlag say) is not reflected in the other side.
Basically all I want is the 3 variables to be visible by the libray and the application.
Am I doing it wrong?!?