aboutsummaryrefslogtreecommitdiff
path: root/dep/CascLib/src/CascOpenFile.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2017-03-07 17:14:16 +0100
committerShauren <shauren.trinity@gmail.com>2017-03-07 17:14:16 +0100
commit5e3156e27f7c49146ac6aa8af9fdab8a554a3c54 (patch)
tree03985520498e2a859751c11aea456a55f267d089 /dep/CascLib/src/CascOpenFile.cpp
parentc0a2c30a27f19d96a1ac44e6b2bcfcacb100b66a (diff)
Dep/CascLib: Update to ladislav-zezula/CascLib@2313e4aff966ef0f841c1748dad4db71c8ba6310
Closes #19237
Diffstat (limited to 'dep/CascLib/src/CascOpenFile.cpp')
-rw-r--r--dep/CascLib/src/CascOpenFile.cpp22
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;