From 5e3156e27f7c49146ac6aa8af9fdab8a554a3c54 Mon Sep 17 00:00:00 2001 From: Shauren Date: Tue, 7 Mar 2017 17:14:16 +0100 Subject: Dep/CascLib: Update to ladislav-zezula/CascLib@2313e4aff966ef0f841c1748dad4db71c8ba6310 Closes #19237 --- dep/CascLib/src/CascOpenFile.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'dep/CascLib/src/CascOpenFile.cpp') 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; -- cgit v1.2.3