ReactOS 0.4.16-dev-814-g656a5dc
custom.c
Go to the documentation of this file.
1/*
2 * FreeLoader
3 * Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19
20/* INCLUDES *******************************************************************/
21
22#include <freeldr.h>
23
24/* GLOBALS ********************************************************************/
25
26#if defined(_M_IX86) || defined(_M_AMD64)
27static const PCSTR BootSectorFilePrompt =
28 "Enter the boot sector file path.\n"
29 "Leave blank for booting a disk or partition.\n"
30 "\n"
31 "Examples:\n"
32 "\\BOOTSECT.DOS\n"
33 "/boot/bootsect.dos";
34static const PCSTR LinuxKernelPrompt =
35 "Enter the Linux kernel image path.\n"
36 "\n"
37 "Examples:\n"
38 "/vmlinuz\n"
39 "/boot/vmlinuz-2.4.18";
40static const PCSTR LinuxInitrdPrompt =
41 "Enter the initrd image path.\n"
42 "Leave blank for no initial ramdisk.\n"
43 "\n"
44 "Examples:\n"
45 "/initrd.gz\n"
46 "/boot/root.img.gz";
47static const PCSTR LinuxCommandLinePrompt =
48 "Enter the Linux kernel command line.\n"
49 "\n"
50 "Examples:\n"
51 "root=/dev/hda1\n"
52 "root=/dev/fd0 read-only\n"
53 "root=/dev/sdb1 init=/sbin/init";
54#endif /* _M_IX86 || _M_AMD64 */
55
56static const PCSTR BootDrivePrompt =
57 "Enter the boot drive.\n"
58 "\n"
59 "Examples:\n"
60 "fd0 - first floppy drive\n"
61 "hd0 - first hard drive\n"
62 "hd1 - second hard drive\n"
63 "cd0 - first CD-ROM drive.\n"
64 "\n"
65 "BIOS drive numbers may also be used:\n"
66 "0 - first floppy drive\n"
67 "0x80 - first hard drive\n"
68 "0x81 - second hard drive";
70 "Enter the boot partition.\n";
71 // "\n"
72 // "Enter 0 for the active (bootable) partition.";
73 /* NOTE: "Active"/bootable partition is a per-platform concept,
74 * and may not really exist. In addition, partition(0) in ARC
75 * means the whole disk (in non-partitioned access).
76 * Commit f2854a864 (r17736) and CORE-156 are thus inaccurate
77 * in this regard. */
78
79static const PCSTR ARCPathPrompt =
80 "Enter the boot ARC path.\n"
81 "\n"
82 "Examples:\n"
83 "multi(0)disk(0)rdisk(0)partition(1)\n"
84 "multi(0)disk(0)fdisk(0)";
85
87 "Enter the path to your ReactOS system directory.\n"
88 "\n"
89 "Examples:\n"
90 "\\REACTOS\n"
91 "\\ROS";
93 "Enter the load options you want passed to the kernel.\n"
94 "\n"
95 "Examples:\n"
96 "/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200\n"
97 "/FASTDETECT /SOS /NOGUIBOOT\n"
98 "/BASEVIDEO /MAXMEM=64\n"
99 "/KERNEL=NTKRNLMP.EXE /HAL=HALMPS.DLL";
101 "Enter additional load options you want passed to the ReactOS Setup.\n"
102 "These options will supplement those obtained from the TXTSETUP.SIF\n"
103 "file, unless you also specify the /SIFOPTIONSOVERRIDE option switch.\n"
104 "\n"
105 "Example:\n"
106 "/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200 /NOGUIBOOT";
107
109 "Press ENTER to boot your custom boot setup.";
110
111/* FUNCTIONS ******************************************************************/
112
113#ifdef HAS_OPTION_MENU_CUSTOM_BOOT
114
116{
117 PCSTR CustomBootMenuList[] = {
118#if defined(_M_IX86) || defined(_M_AMD64)
119 "Boot Sector (Disk/Partition/File)",
120 "Linux",
121#endif
122 "ReactOS",
123 "ReactOS Setup"
124 };
125 ULONG SelectedMenuItem;
126 OperatingSystemItem OperatingSystem;
127
128 if (!UiDisplayMenu("Please choose a boot method:", NULL,
129 CustomBootMenuList,
130 RTL_NUMBER_OF(CustomBootMenuList),
131 0, -1,
132 &SelectedMenuItem,
133 TRUE,
134 NULL, NULL))
135 {
136 /* The user pressed ESC */
137 return;
138 }
139
140 /* Initialize a new custom OS entry */
141 OperatingSystem.SectionId = 0;
142 switch (SelectedMenuItem)
143 {
144#if defined(_M_IX86) || defined(_M_AMD64)
145 case 0: // Boot Sector (Disk/Partition/File)
146 EditCustomBootSector(&OperatingSystem);
147 break;
148 case 1: // Linux
149 EditCustomBootLinux(&OperatingSystem);
150 break;
151 case 2: // ReactOS
152 EditCustomBootReactOS(&OperatingSystem, FALSE);
153 break;
154 case 3: // ReactOS Setup
155 EditCustomBootReactOS(&OperatingSystem, TRUE);
156 break;
157#else
158 case 0: // ReactOS
159 EditCustomBootReactOS(&OperatingSystem, FALSE);
160 break;
161 case 1: // ReactOS Setup
162 EditCustomBootReactOS(&OperatingSystem, TRUE);
163 break;
164#endif /* _M_IX86 || _M_AMD64 */
165 }
166
167 /* And boot it */
168 if (OperatingSystem.SectionId != 0)
169 {
171 LoadOperatingSystem(&OperatingSystem);
172 }
173}
174
175#endif // HAS_OPTION_MENU_CUSTOM_BOOT
176
177#if defined(_M_IX86) || defined(_M_AMD64)
178
179VOID
180EditCustomBootSector(
181 _Inout_ OperatingSystemItem* OperatingSystem)
182{
183 TIMEINFO* TimeInfo;
184 ULONG_PTR SectionId = OperatingSystem->SectionId;
185 CHAR SectionName[100];
186 /* This construct is a trick for saving some stack space */
187 union
188 {
189 struct
190 {
191 CHAR Guard1;
192 CHAR Drive[20];
193 CHAR Partition[20];
194 CHAR Guard2;
195 };
196 CHAR ArcPath[200];
197 } BootStrings;
198 CHAR BootSectorFile[200];
199
200 RtlZeroMemory(SectionName, sizeof(SectionName));
201 RtlZeroMemory(&BootStrings, sizeof(BootStrings));
202 RtlZeroMemory(BootSectorFile, sizeof(BootSectorFile));
203
204 if (SectionId != 0)
205 {
206 /* Load the settings */
207
208 /*
209 * Check whether we have a "BootPath" value (takes precedence
210 * over both "BootDrive" and "BootPartition").
211 */
212 *BootStrings.ArcPath = ANSI_NULL;
213 IniReadSettingByName(SectionId, "BootPath", BootStrings.ArcPath, sizeof(BootStrings.ArcPath));
214 if (!*BootStrings.ArcPath)
215 {
216 /* We don't, retrieve the boot drive and partition values instead */
217 IniReadSettingByName(SectionId, "BootDrive", BootStrings.Drive, sizeof(BootStrings.Drive));
218 IniReadSettingByName(SectionId, "BootPartition", BootStrings.Partition, sizeof(BootStrings.Partition));
219 }
220
221 /* Always load the file name; it will only be handled later if a partition has been specified */
222 IniReadSettingByName(SectionId, "BootSectorFile", BootSectorFile, sizeof(BootSectorFile));
223 }
224
225 if (!*BootStrings.ArcPath)
226 {
227 if (!UiEditBox(BootDrivePrompt, BootStrings.Drive, sizeof(BootStrings.Drive)))
228 return;
229
230 if (*BootStrings.Drive)
231 {
232 if (!UiEditBox(BootPartitionPrompt, BootStrings.Partition, sizeof(BootStrings.Partition)))
233 return;
234 }
235 }
236 if (!*BootStrings.Drive)
237 {
238 if (!UiEditBox(ARCPathPrompt, BootStrings.ArcPath, sizeof(BootStrings.ArcPath)))
239 return;
240 }
241
242 /* Edit the file name only if a partition has been specified */
243 if ((!*BootStrings.ArcPath && atoi(BootStrings.Partition) != 0) ||
244 (*BootStrings.ArcPath && !strstr(BootStrings.ArcPath, ")partition()") &&
245 !strstr(BootStrings.ArcPath, ")partition(0)")))
246 {
247 if (!UiEditBox(BootSectorFilePrompt, BootSectorFile, sizeof(BootSectorFile)))
248 return;
249 }
250
251
252 /* Modify the settings values and return if we were in edit mode */
253 if (SectionId != 0)
254 {
255 /* Modify the BootPath if we have one */
256 if (*BootStrings.ArcPath)
257 {
258 IniModifySettingValue(SectionId, "BootPath", BootStrings.ArcPath);
259 }
260 else if (*BootStrings.Drive)
261 {
262 /* Otherwise, modify the BootDrive and BootPartition */
263 IniModifySettingValue(SectionId, "BootDrive", BootStrings.Drive);
264 IniModifySettingValue(SectionId, "BootPartition", BootStrings.Partition);
265 }
266 else
267 {
268 /*
269 * Otherwise, reset all values: BootSectorFile
270 * will be relative to the default system partition.
271 */
272 IniModifySettingValue(SectionId, "BootPath", "");
273 IniModifySettingValue(SectionId, "BootDrive", "");
274 IniModifySettingValue(SectionId, "BootPartition", "");
275 }
276
277 /* Always write back the file name */
278 IniModifySettingValue(SectionId, "BootSectorFile", BootSectorFile);
279 return;
280 }
281
282 /* Generate a unique section name */
283 TimeInfo = ArcGetTime();
284 RtlStringCbPrintfA(SectionName, sizeof(SectionName),
285 "CustomBootSector%u%u%u%u%u%u",
286 TimeInfo->Year, TimeInfo->Day, TimeInfo->Month,
287 TimeInfo->Hour, TimeInfo->Minute, TimeInfo->Second);
288
289 /* Add the section */
290 if (!IniAddSection(SectionName, &SectionId))
291 return;
292
293 /* Add the BootType */
294 if (!IniAddSettingValueToSection(SectionId, "BootType", "BootSector"))
295 return;
296
297 /* Add the BootPath if we have one */
298 if (*BootStrings.ArcPath)
299 {
300 if (!IniAddSettingValueToSection(SectionId, "BootPath", BootStrings.ArcPath))
301 return;
302 }
303 else if (*BootStrings.Drive)
304 {
305 /* Otherwise, add the BootDrive and BootPartition */
306 if (!IniAddSettingValueToSection(SectionId, "BootDrive", BootStrings.Drive))
307 return;
308
309 if (!IniAddSettingValueToSection(SectionId, "BootPartition", BootStrings.Partition))
310 return;
311 }
312
313 /* Add the BootSectorFile if any */
314 if (*BootSectorFile)
315 {
316 if (!IniAddSettingValueToSection(SectionId, "BootSectorFile", BootSectorFile))
317 return;
318 }
319
320 OperatingSystem->SectionId = SectionId;
321 OperatingSystem->LoadIdentifier = NULL;
322}
323
324VOID
325EditCustomBootLinux(
326 IN OUT OperatingSystemItem* OperatingSystem)
327{
328 TIMEINFO* TimeInfo;
329 ULONG_PTR SectionId = OperatingSystem->SectionId;
330 CHAR SectionName[100];
331 /* This construct is a trick for saving some stack space */
332 union
333 {
334 struct
335 {
336 CHAR Guard1;
337 CHAR Drive[20];
338 CHAR Partition[20];
339 CHAR Guard2;
340 };
341 CHAR ArcPath[200];
342 } BootStrings;
343 CHAR LinuxKernelString[200];
344 CHAR LinuxInitrdString[200];
345 CHAR LinuxCommandLineString[200];
346
347 RtlZeroMemory(SectionName, sizeof(SectionName));
348 RtlZeroMemory(&BootStrings, sizeof(BootStrings));
349 RtlZeroMemory(LinuxKernelString, sizeof(LinuxKernelString));
350 RtlZeroMemory(LinuxInitrdString, sizeof(LinuxInitrdString));
351 RtlZeroMemory(LinuxCommandLineString, sizeof(LinuxCommandLineString));
352
353 if (SectionId != 0)
354 {
355 /* Load the settings */
356
357 /*
358 * Check whether we have a "BootPath" value (takes precedence
359 * over both "BootDrive" and "BootPartition").
360 */
361 *BootStrings.ArcPath = ANSI_NULL;
362 IniReadSettingByName(SectionId, "BootPath", BootStrings.ArcPath, sizeof(BootStrings.ArcPath));
363 if (!*BootStrings.ArcPath)
364 {
365 /* We don't, retrieve the boot drive and partition values instead */
366 IniReadSettingByName(SectionId, "BootDrive", BootStrings.Drive, sizeof(BootStrings.Drive));
367 IniReadSettingByName(SectionId, "BootPartition", BootStrings.Partition, sizeof(BootStrings.Partition));
368 }
369
370 IniReadSettingByName(SectionId, "Kernel", LinuxKernelString, sizeof(LinuxKernelString));
371 IniReadSettingByName(SectionId, "Initrd", LinuxInitrdString, sizeof(LinuxInitrdString));
372 IniReadSettingByName(SectionId, "CommandLine", LinuxCommandLineString, sizeof(LinuxCommandLineString));
373 }
374
375 if (!*BootStrings.ArcPath)
376 {
377 if (!UiEditBox(BootDrivePrompt, BootStrings.Drive, sizeof(BootStrings.Drive)))
378 return;
379
380 if (*BootStrings.Drive)
381 {
382 if (!UiEditBox(BootPartitionPrompt, BootStrings.Partition, sizeof(BootStrings.Partition)))
383 return;
384 }
385 }
386 if (!*BootStrings.Drive)
387 {
388 if (!UiEditBox(ARCPathPrompt, BootStrings.ArcPath, sizeof(BootStrings.ArcPath)))
389 return;
390 }
391
392 if (!UiEditBox(LinuxKernelPrompt, LinuxKernelString, sizeof(LinuxKernelString)))
393 return;
394
395 if (!UiEditBox(LinuxInitrdPrompt, LinuxInitrdString, sizeof(LinuxInitrdString)))
396 return;
397
398 if (!UiEditBox(LinuxCommandLinePrompt, LinuxCommandLineString, sizeof(LinuxCommandLineString)))
399 return;
400
401 /* Modify the settings values and return if we were in edit mode */
402 if (SectionId != 0)
403 {
404 /* Modify the BootPath if we have one */
405 if (*BootStrings.ArcPath)
406 {
407 IniModifySettingValue(SectionId, "BootPath", BootStrings.ArcPath);
408 }
409 else if (*BootStrings.Drive)
410 {
411 /* Otherwise, modify the BootDrive and BootPartition */
412 IniModifySettingValue(SectionId, "BootDrive", BootStrings.Drive);
413 IniModifySettingValue(SectionId, "BootPartition", BootStrings.Partition);
414 }
415 else
416 {
417 /*
418 * Otherwise, reset all values: the files will
419 * be relative to the default system partition.
420 */
421 IniModifySettingValue(SectionId, "BootPath", "");
422 IniModifySettingValue(SectionId, "BootDrive", "");
423 IniModifySettingValue(SectionId, "BootPartition", "");
424 }
425
426 IniModifySettingValue(SectionId, "Kernel", LinuxKernelString);
427 IniModifySettingValue(SectionId, "Initrd", LinuxInitrdString);
428 IniModifySettingValue(SectionId, "CommandLine", LinuxCommandLineString);
429 return;
430 }
431
432 /* Generate a unique section name */
433 TimeInfo = ArcGetTime();
434 RtlStringCbPrintfA(SectionName, sizeof(SectionName),
435 "CustomLinux%u%u%u%u%u%u",
436 TimeInfo->Year, TimeInfo->Day, TimeInfo->Month,
437 TimeInfo->Hour, TimeInfo->Minute, TimeInfo->Second);
438
439 /* Add the section */
440 if (!IniAddSection(SectionName, &SectionId))
441 return;
442
443 /* Add the BootType */
444 if (!IniAddSettingValueToSection(SectionId, "BootType", "Linux"))
445 return;
446
447 /* Add the BootPath if we have one */
448 if (*BootStrings.ArcPath)
449 {
450 if (!IniAddSettingValueToSection(SectionId, "BootPath", BootStrings.ArcPath))
451 return;
452 }
453 else if (*BootStrings.Drive)
454 {
455 /* Otherwise, add the BootDrive and BootPartition */
456 if (!IniAddSettingValueToSection(SectionId, "BootDrive", BootStrings.Drive))
457 return;
458
459 if (!IniAddSettingValueToSection(SectionId, "BootPartition", BootStrings.Partition))
460 return;
461 }
462
463 /* Add the Kernel */
464 if (!IniAddSettingValueToSection(SectionId, "Kernel", LinuxKernelString))
465 return;
466
467 /* Add the Initrd */
468 if (*LinuxInitrdString)
469 {
470 if (!IniAddSettingValueToSection(SectionId, "Initrd", LinuxInitrdString))
471 return;
472 }
473
474 /* Add the CommandLine */
475 if (!IniAddSettingValueToSection(SectionId, "CommandLine", LinuxCommandLineString))
476 return;
477
478 OperatingSystem->SectionId = SectionId;
479 OperatingSystem->LoadIdentifier = "Custom Linux Setup";
480}
481
482#endif /* _M_IX86 || _M_AMD64 */
483
484VOID
486 IN OUT OperatingSystemItem* OperatingSystem,
487 IN BOOLEAN IsSetup)
488{
489 TIMEINFO* TimeInfo;
490 ULONG_PTR SectionId = OperatingSystem->SectionId;
491 CHAR SectionName[100];
492 CHAR BootDriveString[20];
493 CHAR BootPartitionString[20];
494 CHAR ReactOSSystemPath[200];
495 CHAR ReactOSARCPath[200];
496 CHAR ReactOSOptions[200];
497
498 RtlZeroMemory(SectionName, sizeof(SectionName));
499 RtlZeroMemory(BootDriveString, sizeof(BootDriveString));
500 RtlZeroMemory(BootPartitionString, sizeof(BootPartitionString));
501 RtlZeroMemory(ReactOSSystemPath, sizeof(ReactOSSystemPath));
502 RtlZeroMemory(ReactOSARCPath, sizeof(ReactOSARCPath));
503 RtlZeroMemory(ReactOSOptions, sizeof(ReactOSOptions));
504
505 if (SectionId != 0)
506 {
507 /* Load the settings */
508 IniReadSettingByName(SectionId, "SystemPath", ReactOSARCPath, sizeof(ReactOSARCPath));
509 IniReadSettingByName(SectionId, "Options", ReactOSOptions, sizeof(ReactOSOptions));
510 }
511
512 if (SectionId == 0)
513 {
514 if (!UiEditBox(BootDrivePrompt, BootDriveString, sizeof(BootDriveString)))
515 return;
516
517 if (!UiEditBox(BootPartitionPrompt, BootPartitionString, sizeof(BootPartitionString)))
518 return;
519
520 if (!UiEditBox(ReactOSSystemPathPrompt, ReactOSSystemPath, sizeof(ReactOSSystemPath)))
521 return;
522 }
523 else
524 {
525 if (!UiEditBox(ReactOSSystemPathPrompt, ReactOSARCPath, sizeof(ReactOSARCPath)))
526 return;
527 }
528
529 if (!UiEditBox(IsSetup ? ReactOSSetupOptionsPrompt : ReactOSOptionsPrompt, ReactOSOptions, sizeof(ReactOSOptions)))
530 return;
531
532 /* Modify the settings values and return if we were in edit mode */
533 if (SectionId != 0)
534 {
535 IniModifySettingValue(SectionId, "SystemPath", ReactOSARCPath);
536 IniModifySettingValue(SectionId, "Options", ReactOSOptions);
537 return;
538 }
539
540 /* Generate a unique section name */
541 TimeInfo = ArcGetTime();
542 RtlStringCbPrintfA(SectionName, sizeof(SectionName),
543 "CustomReactOS%u%u%u%u%u%u",
544 TimeInfo->Year, TimeInfo->Day, TimeInfo->Month,
545 TimeInfo->Hour, TimeInfo->Minute, TimeInfo->Second);
546
547 /* Add the section */
548 if (!IniAddSection(SectionName, &SectionId))
549 return;
550
551 /* Add the BootType */
552 if (!IniAddSettingValueToSection(SectionId, "BootType", IsSetup ? "ReactOSSetup" : "Windows2003"))
553 return;
554
555 /* Construct the ReactOS ARC system path */
556 ConstructArcPath(ReactOSARCPath, ReactOSSystemPath,
557 DriveMapGetBiosDriveNumber(BootDriveString),
558 atoi(BootPartitionString));
559
560 /* Add the system path */
561 if (!IniAddSettingValueToSection(SectionId, "SystemPath", ReactOSARCPath))
562 return;
563
564 /* Add the CommandLine */
565 if (!IniAddSettingValueToSection(SectionId, "Options", ReactOSOptions))
566 return;
567
568 OperatingSystem->SectionId = SectionId;
569 OperatingSystem->LoadIdentifier = NULL;
570}
571
572#ifdef HAS_OPTION_MENU_REBOOT
573
575{
576 UiMessageBox("The system will now reboot.");
577 Reboot();
578}
579
580#endif // HAS_OPTION_MENU_REBOOT
unsigned char BOOLEAN
#define RTL_NUMBER_OF(x)
Definition: RtlRegistry.c:12
char * strstr(char *String1, char *String2)
Definition: utclib.c:653
TIMEINFO * ArcGetTime(VOID)
Definition: arcemul.c:27
PWCHAR Drive
Definition: chkdsk.c:73
@ Reboot
Definition: bl.h:891
VOID ConstructArcPath(PCHAR ArcPath, PCHAR SystemFolder, UCHAR Disk, ULONG Partition)
Definition: arcname.c:175
static const PCSTR BootPartitionPrompt
Definition: custom.c:69
VOID EditCustomBootReactOS(IN OUT OperatingSystemItem *OperatingSystem, IN BOOLEAN IsSetup)
Definition: custom.c:485
static const PCSTR ARCPathPrompt
Definition: custom.c:79
static const PCSTR ReactOSSetupOptionsPrompt
Definition: custom.c:100
static const PCSTR ReactOSSystemPathPrompt
Definition: custom.c:86
static const PCSTR BootDrivePrompt
Definition: custom.c:56
static const PCSTR CustomBootPrompt
Definition: custom.c:108
static const PCSTR ReactOSOptionsPrompt
Definition: custom.c:92
#define DriveMapGetBiosDriveNumber(DeviceName)
Definition: hardware.h:35
BOOLEAN UiEditBox(PCSTR MessageText, PCHAR EditTextBuffer, ULONG Length)
Definition: ui.c:633
BOOLEAN UiDisplayMenu(IN PCSTR MenuHeader, IN PCSTR MenuFooter OPTIONAL, IN PCSTR MenuItemList[], IN ULONG MenuItemCount, IN ULONG DefaultMenuItem, IN LONG MenuTimeOut, OUT PULONG SelectedMenuItem, IN BOOLEAN CanEscape, IN UiMenuKeyPressFilterCallback KeyPressFilter OPTIONAL, IN PVOID Context OPTIONAL)
Definition: ui.c:605
VOID UiMessageBox(_In_ PCSTR Format,...)
Definition: ui.c:359
VOID OptionMenuCustomBoot(VOID)
VOID OptionMenuReboot(VOID)
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
VOID LoadOperatingSystem(_In_ OperatingSystemItem *OperatingSystem)
Definition: bootmgr.c:283
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)
PINI_SECTION IniAddSection(_In_ PINICACHE Cache, _In_ PCWSTR Name)
Definition: inicache.c:838
BOOLEAN IniAddSettingValueToSection(ULONG_PTR SectionId, PCSTR SettingName, PCSTR SettingValue)
Definition: inifile.c:260
BOOLEAN IniModifySettingValue(ULONG_PTR SectionId, PCSTR SettingName, PCSTR SettingValue)
Definition: inifile.c:301
BOOLEAN IniReadSettingByName(ULONG_PTR SectionId, PCSTR SettingName, PCHAR Buffer, ULONG BufferSize)
Definition: inifile.c:154
#define _Inout_
Definition: no_sal2.h:162
#define ANSI_NULL
NTSTRSAFEVAPI RtlStringCbPrintfA(_Out_writes_bytes_(cbDest) _Always_(_Post_z_) NTSTRSAFE_PSTR pszDest, _In_ size_t cbDest, _In_ _Printf_format_string_ NTSTRSAFE_PCSTR pszFormat,...)
Definition: ntstrsafe.h:1148
Definition: fw.h:10
USHORT Month
Definition: fw.h:12
USHORT Day
Definition: fw.h:13
USHORT Minute
Definition: fw.h:15
USHORT Hour
Definition: fw.h:14
USHORT Second
Definition: fw.h:16
USHORT Year
Definition: fw.h:11
ULONG_PTR SectionId
Definition: oslist.h:26
const char * PCSTR
Definition: typedefs.h:52
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
char CHAR
Definition: xmlstorage.h:175