- DWORD err;
-
- memset(&attr, 0, sizeof(attr));
- attr.Length = sizeof(attr);
- attr.ObjectName = name;
-
- status = (*func_NtOpenFile)(&h, GENERIC_WRITE | SYNCHRONIZE, &attr,
- &iosb, FILE_SHARE_VALID_FLAGS,
- FILE_OPEN_FOR_BACKUP_INTENT |
- FILE_OPEN_REPARSE_POINT |
- FILE_SYNCHRONOUS_IO_NONALERT);
- if (!NT_SUCCESS(status)) {
- SetLastError((*func_RtlNtStatusToDosError)(status));
- goto fail;
- }