|Top Previous Next|
IN PACKAGE_HANDLE hPkg,
IN LPWSTR SrcFileName,
IN LPWSTR DestFileName,
IN BOOL bVariablizeName )
Adds a file to the virtual application package.
Virtual application package handle, returned by PackageOpen.
Name of the physical file to be added to the package. In the form: "C:\SomeFile.ext".
Name of the file as it will appear in the virtual package. In the form: "SomeDir\SomeFile.ext". If bVariablizeName is set to TRUE, the path will be variablized.
If set to TRUE, DestFileName will be variablized. For example, "C:\Windows\SomeFile.ext" will be added as "%Windows%\SomeFile.ext".
Returns APIRET_SUCCESS if successful, or APIRET_NOT_FOUND if the file was not found.
The package containing virtual files will be reconstructed during the next call to PackageSave. The source file must remain accessible at that time.
DestFileName should always contain a logical path, containing a drive name.
Good examples: "%Program Files%\MyApp\SomeFile.exe", "C_\MyApp\SomeFile.exe" (or, if bVariablizeName set to false: "C:\Program Files\MyApp\SomeFile.exe", "C:\MyApp\SomeFile.exe").
BAD example: "MyApp\SomeFile.exe".
Remember: the virtual application has to be able to find this file with a full, logical path containing a drive.