| 473 | return NULL; |
| 474 | } |
| 475 | uint64_t CFileWriteStreamOpen(const char* FileName) |
| 476 | { |
| 477 | if (!Steam_Config::RemoteStorage) |
| 478 | return NULL; |
| 479 | |
| 480 | // Variables |
| 481 | char* FStreamName = nullptr; |
| 482 | int SLength = std::strlen(FileName); |
| 483 | MyFileStream stream; |
| 484 | |
| 485 | ++GlobalStream; |
| 486 | FStreamName = (char*)VirtualAlloc(nullptr, SLength, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); |
| 487 | if (!FStreamName) { |
| 488 | return NULL; |
| 489 | } |
| 490 | |
| 491 | std::strcpy(FStreamName, FileName); |
| 492 | stream.Buffer = nullptr; |
| 493 | stream.FileNameS = FStreamName; |
| 494 | stream.lastbuffersize = 0; |
| 495 | |
| 496 | Streams.insert(std::make_pair(GlobalStream, stream)); |
| 497 | return GlobalStream; |
| 498 | } |
| 499 | int32_t CFileWriteStreamWriteChunk(uint64_t hStream, const void* pvData, int32_t cubData) |
| 500 | { |
| 501 | if (!Steam_Config::RemoteStorage) |
no outgoing calls