MCPcopy Create free account
hub / github.com/Norbyte/ositools / OnCreateFile

Method OnCreateFile

OsiInterface/CustomFunctions.cpp:400–417  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

398}
399
400void CustomFunctionInjector::OnCreateFile(LPCWSTR lpFileName,
401 DWORD dwDesiredAccess,
402 DWORD dwShareMode,
403 LPSECURITY_ATTRIBUTES lpSecurityAttributes,
404 DWORD dwCreationDisposition,
405 DWORD dwFlagsAndAttributes,
406 HANDLE hTemplateFile,
407 HANDLE hFile)
408{
409 if (!extendingStory_ && (dwDesiredAccess & GENERIC_WRITE)) {
410 auto length = wcslen(lpFileName);
411 if (length > 16 && wcscmp(&lpFileName[length - 16], L"story_header.div") == 0) {
412 Debug(L"CustomFunctionInjector::OnCreateFile: %s", lpFileName);
413 storyHeaderFile_ = hFile;
414 storyHeaderPath_ = lpFileName;
415 }
416 }
417}
418
419void CustomFunctionInjector::OnCloseHandle(HANDLE hFile, BOOL bSucceeded)
420{

Callers

nothing calls this directly

Calls 1

DebugFunction · 0.85

Tested by

no test coverage detected