| 280 | } |
| 281 | |
| 282 | bool SetCacheStrategy(HANDLE hFile, CSTRTG CacheStrategy) |
| 283 | { |
| 284 | TCascFile * hf; |
| 285 | |
| 286 | // Validate the file handle |
| 287 | if((hf = TCascFile::IsValid(hFile)) != NULL) |
| 288 | { |
| 289 | // The cache must not be initialized yet |
| 290 | if(hf->pbFileCache == NULL) |
| 291 | { |
| 292 | hf->CacheStrategy = CacheStrategy; |
| 293 | return true; |
| 294 | } |
| 295 | } |
| 296 | |
| 297 | // Failed. This should never happen |
| 298 | assert(false); |
| 299 | return false; |
| 300 | } |
| 301 | |
| 302 | //----------------------------------------------------------------------------- |
| 303 | // Public functions |
no outgoing calls
no test coverage detected