51{
62
63#if 0
65 {
68 }
69#endif
70
72 {
75 }
76
78 if (((Sector == 0) && (endptr ==
argv[2])) ||
79 (Sector < 0))
80 {
83 }
84
86 if (pSectorBuffer ==
NULL)
87 {
89
90 goto done;
91 }
92
94 L"\\Device\\Harddisk%d\\Partition0",
98
101 0,
104
112 {
114 goto done;
115 }
116
123 (
PVOID)pSectorBuffer,
128 {
130 goto done;
131 }
132
134
135done:
138
139 RtlFreeHeap(RtlGetProcessHeap(), 0, pSectorBuffer);
140
142}
void ConResPuts(FILE *fp, UINT nID)
static VOID HexDump(_In_ UCHAR *addr, _In_ int len)
#define IDS_ERROR_INVALID_ARGS
#define IDS_SELECT_NO_DISK
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
_In_ PFCB _In_ LONGLONG FileOffset
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
#define NT_SUCCESS(StatCode)
_Must_inspect_result_ _In_opt_ PFLT_INSTANCE _Out_ PHANDLE FileHandle
#define FILE_SYNCHRONOUS_IO_NONALERT
#define InitializeObjectAttributes(p, n, a, r, s)
NTSYSAPI NTSTATUS NTAPI NtOpenFile(OUT PHANDLE phFile, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, OUT PIO_STATUS_BLOCK pIoStatusBlock, IN ULONG ShareMode, IN ULONG OpenMode)
#define FILE_READ_ATTRIBUTES
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
NTSTATUS NTAPI NtReadFile(HANDLE FileHandle, HANDLE Event, PIO_APC_ROUTINE ApcRoutine, PVOID ApcContext, PIO_STATUS_BLOCK IoStatusBlock, PVOID Buffer, ULONG Length, PLARGE_INTEGER ByteOffset, PULONG Key)
__int64 CDECL _wcstoi64(const wchar_t *nptr, wchar_t **endptr, int base)