MCPcopy Create free account
hub / github.com/bytecode77/r77-rootkit / ReadFileStringW

Function ReadFileStringW

r77api/r77win.c:442–463  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

440 return result;
441}
442BOOL ReadFileStringW(HANDLE file, PWCHAR str, DWORD length)
443{
444 BOOL result = FALSE;
445
446 for (DWORD count = 0; count < length; count++)
447 {
448 DWORD bytesRead;
449 if (!ReadFile(file, &str[count], sizeof(WCHAR), &bytesRead, NULL) || bytesRead != sizeof(WCHAR))
450 {
451 result = FALSE;
452 break;
453 }
454
455 if (str[count] == L'\0')
456 {
457 result = TRUE;
458 break;
459 }
460 }
461
462 return result;
463}
464BOOL WriteFileContent(LPCWSTR path, LPBYTE data, DWORD size)
465{
466 BOOL result = FALSE;

Callers 1

ControlCallbackFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected