kaveGetTempFolder
Gets the path to the temporary folder.
Syntax
HRESULT kaveGetTempFolder (
unsigned long dwBufLen,
char *pBuf,
unsigned long *pdwBufLen);
Parameters
The kaveGetTempFolder function has the following parameters.
kaveGetTempFolder function parameters
Name
|
Type
|
Description
|
dwBufLen
|
in
|
The size (in symbols) of the buffer where the path to the temporary folder will be written.
If dwBufLen is less than the necessary size for the buffer to accommodate the string, E_INVALIDARG is returned. However, if pdwBufLen is not NULL, it is filled with the size (in symbols) of the path to the temporary folder plus 1. This extra symbol is necessary to store the terminating null.
|
pBuf
|
out
|
A pointer to the memory buffer that will be filled with the path to the temporary folder.
If pBuf is NULL, E_INVALIDARG is returned. However, if pdwBufLen is not NULL, it is filled with the size (in symbols) of the path to the temporary folder plus 1. This extra symbol is necessary to store the terminating null.
|
pdwBufLen
|
out
|
If pBuf is not NULL and dwBuffLen is greater than the size of the string to be returned, pdwBufLen will point to the number of symbols actually copied to the buffer (without the terminating null character).
If the buffer size specified by dwBufLen is not sufficient, or pBuf is NULL, pdwBufLen will contain the size (in symbols) of the buffer necessary to accommodate the received data including the null terminating character. This value pointed by pdwBufLen tells you what buffer length is desired. The returned size will be one character longer than the actual string size. When allocating the buffer, use the size returned in pdwBufLen. This size will suffice to accommodate the received data, that is, the C-string value and the null terminating character.
|
Return value
If the kaveGetTempFolder function succeeds, its return value is S_OK.
For other return codes, see section "Return codes".
Page top