SetTempPath

Declaration

Delphi

procedure SetTempPath(const AFolder: PAnsiChar); stdcall;

ActiveX

HRESULT _stdcall SetTempPath([in] BSTR Folder);

 

Description

Use this method to set a temp path to a folder with read/write access. The API will make a copy of your document and store it in the given temp path when you call LoadDoc.

After you have finished your work on the document, you can choose to either save the document to the original directory or to another one by calling SaveDoc or respectively SaveDocTo. Afterwards you will have to call CloseDoc or EraseTempPath to delete the temporary copy of your document. If the given temp path does not exist (either partially or completely), then SetTempPath will create the path for you. If you don't set a temp path, the API will use the directory of your application as temp path. 

Important:

  • Call this before you call LoadDoc for the first time!
  • If you want to change the temp path during runtime, make sure, that no document is opened at that particular moment. That means, you have to call either CloseDoc or EraseTempPath before you can change the temp path.


Arguments

ArgumentDescription
Folder

Path to the folder where the temp files should be stored during runtime

 

C# sample  

AddSignature
// Set files for temp files
          
SignAPIv4.SetTempPath(@"c:\temp");

 

 

Â