CascLib API Reference

CascOpenStorage, CascOpenOnlineStorage

Description


  bool WINAPI CascOpenStorage(
      LPCTSTR szParams,                     // Parameters of a local storage
      DWORD dwLocaleMask,                   // Locale mask. Only used for World of Warcraft storages.
      HANDLE * phStorage                    // Pointer to a HANDLE variable that receives storage handle on success
      );

  bool WINAPI CascOpenOnlineStorage(
      LPCTSTR szParams,                     // Parameters of an online storage
      DWORD dwLocaleMask,                   // Locale mask. Only used for World of Warcraft storages.
      HANDLE * phStorage                    // Pointer to a HANDLE variable that receives storage handle on success
      );

Functions CascOpenStorage and CascOpenOnlineStorage open a CASC storage. Both functions are merely stubs for CascOpenStorageEx.

Parameters

szParams [in]
Local storages: A parameter string containing the path to a local storage. If the storage contains multiple products (World of Warcraft Retail + World of Warcraft PTR), the product can be specified by the product code name separated by a colon ("C:\Games\World of Warcraft:wowt").
Online storage: A parameter string containing the path to a local cache, followed by a product code name and region, both separated by a colon. Example: "C:\Cache:wow:eu".
dwLocaleMask [in]
Locale mask. Only used for World of Warcraft storages.
phStorage [out]
Pointer to a HANDLE variable that, on success, receives a handle to the opened storage. Use this handle for subsequent calls to other CASC APIs.

Return Value

On success, the function returns true.
On failure, the function returns false and GetLastError() returns the error code.

Local storages vs Online Storages

Please, refer to CascOpenStorageEx documentation for more information.