F
fernandez.dan
I have a umangaged dll ( I have the source code) which I use in my web
app using pinvoke. The dll creates a file, writes to it, and then
closes it. It works the first time through but the second time through
it can't open file so my dll fails and returns an error number.
I then try to delete the file manually but it says that I can not
delete it because it is use by other program or user. I used process
explorer utility from sysinternals to find out who had the file handle.
It seems that the aspnet_wp has the file handle.
It's weird if I wait for a long period of time, I can finally manually
delete the file. I'm not sure if it takes a period of time for the
aspnet_wp process to release resources.
Just an high overview of the file call sequence in my unmanaged dll
int pMode = 0x20;
hFile = CreateFile(filename,GENERIC_WRITE,0, NULL, CREATE_ALWAYS,
pMode, NULL);
WriteFile(hFile,cmdstring,strlen(cmdstring), &bytes,NULL);
CloseHandle(hFile);
I appreciate any advice.
app using pinvoke. The dll creates a file, writes to it, and then
closes it. It works the first time through but the second time through
it can't open file so my dll fails and returns an error number.
I then try to delete the file manually but it says that I can not
delete it because it is use by other program or user. I used process
explorer utility from sysinternals to find out who had the file handle.
It seems that the aspnet_wp has the file handle.
It's weird if I wait for a long period of time, I can finally manually
delete the file. I'm not sure if it takes a period of time for the
aspnet_wp process to release resources.
Just an high overview of the file call sequence in my unmanaged dll
int pMode = 0x20;
hFile = CreateFile(filename,GENERIC_WRITE,0, NULL, CREATE_ALWAYS,
pMode, NULL);
WriteFile(hFile,cmdstring,strlen(cmdstring), &bytes,NULL);
CloseHandle(hFile);
I appreciate any advice.