Call DLL function not working.
Posted: Mon May 11, 2009 6:59 am
Can anyone offer any explanation why my call to a dll function has stopped working? Here's the code:
~InstallAware Clipboard Data~
~Call DLL Function~
~{4FC59EEF-5733-4684-9415-BAFE3BF86997}~
~kernel32.dll,MoveFile,bool,MOVEFILESTATUS,"pointer to string",$TARGETDIR$\\ACE.Apollo.Framework.CacheSockets.dll,"pointer to string",$TARGETDIR$\\ACE.Apollo.Framework.CacheSockets.dll.PreP1BreakFix,$~
~mIDEFunc.dll\\mEXEFunc.dll~
I've got this call just before the ApplyInstall. The idea is that I make a copy of the existing file before the new one of the same name is installed. I set the MOVEFILESTATUS value to -999 before the call. After the call it still has the same value and the file is not renamed. I'm really convinced this used to work. I tried changing the bool return value to a long but no matter what I try now, the return value is still -999 (my initial setting) and it almost suggests that the call is not actually being made. I do have kernel32.dll in my XP Windows\\System32 folder.
All I'm trying to do is to rename the existing file before the new one is installed and I've got another call that renames the original file which is placed after the Apply Uninstall and that too fails to work. I can rename the files manually so I'm happy there's been no behind-the-scene access right restriction changes. I'm really puzzled. I know it has to be my fault but I'm totally flummoxed.
~InstallAware Clipboard Data~
~Call DLL Function~
~{4FC59EEF-5733-4684-9415-BAFE3BF86997}~
~kernel32.dll,MoveFile,bool,MOVEFILESTATUS,"pointer to string",$TARGETDIR$\\ACE.Apollo.Framework.CacheSockets.dll,"pointer to string",$TARGETDIR$\\ACE.Apollo.Framework.CacheSockets.dll.PreP1BreakFix,$~
~mIDEFunc.dll\\mEXEFunc.dll~
I've got this call just before the ApplyInstall. The idea is that I make a copy of the existing file before the new one of the same name is installed. I set the MOVEFILESTATUS value to -999 before the call. After the call it still has the same value and the file is not renamed. I'm really convinced this used to work. I tried changing the bool return value to a long but no matter what I try now, the return value is still -999 (my initial setting) and it almost suggests that the call is not actually being made. I do have kernel32.dll in my XP Windows\\System32 folder.
All I'm trying to do is to rename the existing file before the new one is installed and I've got another call that renames the original file which is placed after the Apply Uninstall and that too fails to work. I can rename the files manually so I'm happy there's been no behind-the-scene access right restriction changes. I'm really puzzled. I know it has to be my fault but I'm totally flummoxed.