diff options
Diffstat (limited to 'dep/CascLib/src/CascOpenFile.cpp')
-rw-r--r-- | dep/CascLib/src/CascOpenFile.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/dep/CascLib/src/CascOpenFile.cpp b/dep/CascLib/src/CascOpenFile.cpp index f590155144d..9db3691af48 100644 --- a/dep/CascLib/src/CascOpenFile.cpp +++ b/dep/CascLib/src/CascOpenFile.cpp @@ -270,6 +270,28 @@ bool WINAPI CascOpenFile(HANDLE hStorage, const char * szFileName, DWORD dwLocal return (nError == ERROR_SUCCESS); } +DWORD WINAPI CascGetFileId(HANDLE hStorage, const char * szFileName) +{ + TCascStorage * hs; + + // Validate the storage handle + hs = IsValidStorageHandle(hStorage); + if (hs == NULL) + { + SetLastError(ERROR_INVALID_HANDLE); + return false; + } + + // Validate the other parameters + if (szFileName == NULL || szFileName[0] == 0) + { + SetLastError(ERROR_INVALID_PARAMETER); + return false; + } + + return RootHandler_GetFileId(hs->pRootHandler, szFileName); +} + bool WINAPI CascCloseFile(HANDLE hFile) { TCascFile * hf; |