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 an asterisk:
C:\Games\World of Warcraft*wowt
Online storages: A parameter string containing the storage parameters. The string is in the following format:
local_cache_folder[*cdn_server_url]*code_name[*region]

Example1: C:\Cache*wow*eu
Example2: C:\Cache*http://myowncdn.com:8000*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.