I have a command-line application that exhibits some really puzzling behavior. At the end of a processing loop, the following code is called:
delete []m_pOutputAFBuffer;
at some point earlier in processing, the following code was executed:
m_pOutputAFBuffer = new FCAnchField[num];
FCanchField is defined as
typedef struct _AnchField
{
short mySize;
BYTE* pData;
UINT ulDataLen;
short bQuotes;
}FCAnchField;
Here comes the weirdness. When i have this executable on my C drive, it will execute as expected. If I copy the entire directory over to a mapped drive on another system , the delete will fail sporadically. I have copied
the entire directory that contains the executable over. The affect is the same whether i run it from Visual Studio (2008) or the command line. More specifically, I can open a command window and execute the image from my local system and
it runs. I can then cd to the remote directory and the image fails. For example:
c:\temp>prog.exe // this works
cd u:// u mapped to c drive on another system.
U:\temp>prog.exe// fails after a few records
Both local and remte machines are running Windows 7 Enterprise edition.
My understanding of executing an image located on another system is the image copied (opened - whatever the nomenclature is) into the memory of the host machine, and then executed. Since I am executing under the same command window, all the environment
variables are the same. It seems that there is some effect the the remote machine is having that i am unaware of. Can some Windows Internal guru enlighten me? I am just a simple developer.