AddForcedVirtualLoadPath
Previous  Top  Next

Function AddForcedVirtualLoadPath(Path)

This function instructs Thinstall to load all DLLs from the specified path as virtual DLLs even if they are not located in the package. This should be used if the application needs to load external DLLs that have dependencies on DLLs located inside the package.

Parameters:

Path  
[in] The filename or path for DLLs to load as virtual  

Example:
' This sample script will load any DLL located in the same directory as the EXE as a virtual DLL 
 
' TS_ORIGIN is the path where the EXE is running from  
Origin = GetEnvironmentVariable("TS_ORIGIN")  
 
' We want to chop off the filename from TS_ORIGIN, so find the last backslash and remove everything after this  
LastSlash = InStrRev(Origin, "\")  
SourcePath = Left(Origin, LastSlash)  
 
' Tell Thinstall to load all DLLs in the same directory (or deeper) from where the source EXE is  
' This allows us to drop additional files in the SourcePath tree and have them resolve imports against virtual DLLs  
AddForcedVirtualLoadPath(SourcePath)