MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / windows_log_handle_valid

Function windows_log_handle_valid

src/daemon/service.c:762–770  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

760}
761
762static bool windows_log_handle_valid(HANDLE file, LARGE_INTEGER *size_out) {
763 BY_HANDLE_FILE_INFORMATION info;
764 return file != INVALID_HANDLE_VALUE && GetFileType(file) == FILE_TYPE_DISK &&
765 GetFileInformationByHandle(file, &info) != 0 &&
766 (info.dwFileAttributes & (FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_REPARSE_POINT)) ==
767 0 &&
768 info.nNumberOfLinks == 1 && GetFileSizeEx(file, size_out) != 0 &&
769 size_out->QuadPart >= 0;
770}
771
772static HANDLE windows_log_open(const wchar_t *path, LARGE_INTEGER *size_out) {
773 /* windows_private_file_prepare creates or validates the file with IPC's

Callers 2

windows_log_openFunction · 0.85
windows_lock_openFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected