Taking a backup

Got a problem you cannot solve? Try here.
sbunyan
Posts: 10
Joined: Tue Oct 16, 2007 4:56 am

Taking a backup

Postby sbunyan » Fri Nov 16, 2007 6:26 am

Hi all,

I am trying to implement a system whereby a backup of an existing directory is taken before doing an upgrade. For this we had to code our own dll which will copy a directory and it's contents.

The declaration for this is as follows:
extern DLL_MODE int CopyDirectory(char *SourceDir,char *DestinationDir,int &Status);

When I call this dll in the InstallAware project, the CopyDirectory copies everything as it should however execution is never handed back to the installer. If I run the installer in debug mode, everything crashes after the Call Dll function, however the directory is copied.

My call to this dll is as follows:
~InstallAware Clipboard Data~
~Call DLL Function~
~{E9D6FDF5-6201-4939-B93A-1C75E8D32D37}~
~$SUPPORTDIR$\\DmmDongle.dll,_CopyDirectory,long,Result,"pointer to string",$Source$,"pointer to string",$Destination$,"pointer to long",$Result$,$~
~mIDEFunc.dll\\mEXEFunc.dll~

Can anyone shed any light on this?

Thanks in advance,
Sinead

sbunyan
Posts: 10
Joined: Tue Oct 16, 2007 4:56 am

Postby sbunyan » Mon Nov 19, 2007 7:21 am

Hi,

Just discovered that if I rearrange the sequence of the parameters to the dll function all works ok.

The function works as follows:

extern DLL_MODE void DmmCopyDirectory(char *SourceDir,int &Status,char *DestinationDir);

however if I declare the function as
extern DLL_MODE void DmmCopyDirectory(char *SourceDir,char *DestinationDir,int &Status);

this will not work!!

I don't know why this is the case, maybe someone out there has some ideas?

Thanks,
Sinead


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 120 guests