Link to home
Start Free TrialLog in
Avatar of ssite
ssite

asked on

MoveFileEx fails under WIN NT 4 WorkStation

Under win nt 4 workstation (ver 4.00.1381), I use my own installer for a very specific task of replacing a dll that is in use.

If I call MoveFileEx(Src, Dst, MOVEFILE_DELAY_UNTIL_REBOOT), nothing happends.

I looked up MSDN and the say that it is supposed to create a registry key at
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\
Control\Session Manager\PendingFileRenameOperations

But it doesn't.

I put it manually and it didn't make a difference.

Please help.
Avatar of ssite
ssite

ASKER

Edited text of question
Does the MoveFileEx() call return non-zero indicating an error occured?  If so, did you call GetLastError() to get the error code?  Are the paths you are specifying correct?  If nothing else, can you post your code?
Avatar of ssite

ASKER

It doesn't return an error.

Am I supposed to use long, or short file names ?
you can always use short names.  To the best of my knowledge, all Windows API functions will also take long names--certainly this one would.  

Can you post the code?
ASKER CERTIFIED SOLUTION
Avatar of byang
byang
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ssite

ASKER

I am away from the office for 24 hours. I will test it when I get back and confirm the answer.
Thanks for now.