19{
24#if 0
27#endif
31
33 {
36 }
37
39 {
42 }
44 {
45 CREATE_DISK DiskInfo;
47
50
53 {
54 DPRINT1(
"CreateDisk() failed!\n");
56 }
57
60
62 }
63
65 {
67 {
68
69 DPRINT(
"Size : %s\n", pszSuffix);
70
73 {
76 }
77 }
79 {
80
81 DPRINT(
"Offset : %s\n", pszSuffix);
83#if 0
86 {
89 }
90#endif
91 }
93 {
94
95 DPRINT(
"Align : %s\n", pszSuffix);
97#if 0
99#endif
100 }
102 {
103
104 DPRINT(
"NoErr\n", pszSuffix);
106#if 0
108#endif
109 }
110 else
111 {
114 }
115 }
116
117 DPRINT1(
"Size: %I64u\n", ullSize);
118#if 0
119 DPRINT1(
"Offset: %I64u\n", ullOffset);
120#endif
121
123 {
126 }
127
129 {
130 ConPuts(
StdOut,
L"We already have an extended partition on this disk!\n");
132 }
133
134 if (ullSize != 0)
136 else
137 ullSectorCount = 0;
138
139 DPRINT1(
"SectorCount: %I64u\n", ullSectorCount);
140
142
145 {
146 ConPuts(
StdOut,
L"No disk space left for an extended partition!\n");
148 }
149
150 if (ullSectorCount == 0)
151 {
157
160 }
161 else
162 {
164 {
170
173 }
175 {
177 if (NewPartEntry ==
NULL)
178 {
181 }
182
184
187
194
197
199
202 }
203 }
204
208 {
212 }
213
215
217}
void ConPuts(FILE *fp, LPCWSTR psz)
void ConResPuts(FILE *fp, UINT nID)
#define IDS_CREATE_PARTITION_INVALID_STYLE
#define IDS_CREATE_PARTITION_FAIL
#define IDS_ERROR_INVALID_ARGS
#define IDS_SELECT_NO_DISK
#define IDS_CREATE_PARTITION_SUCCESS
#define PARTITION_EXTENDED
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
VOID UpdateMbrDiskLayout(_In_ PDISKENTRY DiskEntry)
BOOL HasPrefix(_In_ PWSTR pszString, _In_ PWSTR pszPrefix, _Out_opt_ PWSTR *pszSuffix)
NTSTATUS WriteMbrPartitions(_In_ PDISKENTRY DiskEntry)
VOID ScanForUnpartitionedMbrDiskSpace(PDISKENTRY DiskEntry)
VOID CreateSignature(_Out_ PDWORD pSignature)
#define NT_SUCCESS(StatCode)
#define InsertTailList(ListHead, Entry)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
#define GetPrimaryPartitionCount(DiskEntry)
ULARGE_INTEGER SectorCount
PPARTENTRY ExtendedPartition
ULARGE_INTEGER StartSector
LIST_ENTRY PrimaryPartListHead
struct _LIST_ENTRY * Blink
ULARGE_INTEGER SectorCount
struct _DISKENTRY * DiskEntry
ULARGE_INTEGER StartSector
NTSTATUS CreateDisk(_In_ ULONG DiskNumber, _In_ PCREATE_DISK DiskInfo)
#define CONTAINING_RECORD(address, type, field)
static PPARTENTRY CurrentPartition
unsigned __int64 CDECL _wcstoui64(const wchar_t *nptr, wchar_t **endptr, int base)