Syntax:
int LlStgsysGetFilename (HLLSTG hStg, INT nJob, INT nFile, LPTSTR pszBuffer, UINT nBufSize);
Task:
Can be used to get the "real" name(s) of the preview file(s). If a path has been provided to LlStgsysStorageOpen() this path will also be included.
Parameter:
hStg: The handle returned by LlStgsysStorageOpen()
nJob: Job Index: 1: first Job,... (1..LlStgsysGetJobCount())
nFile: Page number
Value |
Meaning |
-1 |
Management file |
0 |
Printer configuration file |
>0 |
Page Metafile for this page (1.. LlStgsysGetPageCount()) |
lpszBuffer: Initialized buffer for the file
name with file extension
nBufSize: Size of the buffer
Return value:
Error code
Hints:
The nFile Parameter distinguishes the type of file for which the name is to be returned.
In the case of LL_STG_STORAGE, its name is returned regardless of the nFile parameter, as this is the one and only file that contains all information.
Example:
CString sFilename,
sOutput;
LlStgsysGetFilename(hStg, 1, -1, sFilename.GetBuffer(_MAX_PATH),
_MAX_PATH);
sFilename.ReleaseBuffer();
sOutput =
CString(_T("View of file ")) + sFilename;
See also:
LlStgsysGetJobCount