FNFCIGETTEMPFILE macro (fci.h)
The FNFCIGETTEMPFILE macro provides the declaration for the application-defined callback function to obtain a temporary file name.
Syntax
void FNFCIGETTEMPFILE(
[out] fn
);
Parameters
[out] fn
Pointer to a buffer to receive the complete temporary file name.
Return value
None
Remarks
The function can return a filename that already exists by the time it is opened. For this reason, the caller should be prepared to make several attempts to create temporary files.
Examples
FNFCIGETTEMPFILE(fnGetTempFileName)
{
BOOL bSucceeded = FALSE;
CHAR pszTempPath[MAX_PATH];
CHAR pszTempFile[MAX_PATH];
UNREFERENCED_PARAMETER(pv);
UNREFERENCED_PARAMETER(cbTempName);
if( GetTempPathA(MAX_PATH, pszTempPath) != 0 )
{
if( GetTempFileNameA(pszTempPath, "CABINET", 0, pszTempFile) != 0 )
{
DeleteFileA(pszTempFile);
bSucceeded = SUCCEEDED(StringCbCopyA(pszTempName, cbTempName, pszTempFile));
}
}
return bSucceeded;
}
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | fci.h |
See also
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for