I have 4 global variables defined in my starter module of a C dll, like so:
Code:
LFLOAT GTEMPX;
LFLOAT GTEMPY;
LFLOAT GTEMPSIZE;
long GPYRAMID;
long __stdcall ExtractRas(LFLOAT *tempX, LFLOAT *tempY, LFLOAT *tempSize, long *tempPyramid) {
rest of code etc................
later on in the code I set these globals to have some values set to them (from the incoming parameters ExtractRas, VB code to be exact). It simply does this:
Code:
LFLOAT GTEMPX = *tempX;
LFLOAT GTEMPY = *tempY;
LFLOAT GTEMPSIZE = *tempSize;
LONG GPYRAMID = *tempPyramid;
in a seperate module I have referred to these globals as:
Code:
extern LFLOAT GTEMPX;
extern LFLOAT GTEMPY;
extern LFLOAT GTEMPSIZE;
extern long GPYRAMID;
LONG get_tile_envelope (SE_RASTERATTR rasterattr, TILEENV* tileenv)
{
rest of code etc........................
Ok - so I think I have used the correct syntax, and everything is in the right place where it should be. So when I debug this dll, I see that the values in the globals (which are various numbers set from the external VB code), suddenly reset to 0.000000000000, as soon as "get_tile_envelope" function is called!!!!
This is not good, I am so close to finishing, and have tried many things, does anyone know why this type of thing is happening?
Many thanks