ReactOS 0.4.16-dev-91-g764881a
IsValidInstallDirectory.c File Reference
#include "precomp.h"
Include dependency graph for IsValidInstallDirectory.c:

Go to the source code of this file.

Macros

#define BOOL_TO_STR(b)   ((b) ? "TRUE" : "FALSE")
 

Functions

 START_TEST (IsValidInstallDirectory)
 

Variables

pSpInfCloseInfFile SpInfCloseInfFile = NULL
 
pSpInfFindFirstLine SpInfFindFirstLine = NULL
 
pSpInfFindNextLine SpInfFindNextLine = NULL
 
pSpInfGetFieldCount SpInfGetFieldCount = NULL
 
pSpInfGetBinaryField SpInfGetBinaryField = NULL
 
pSpInfGetIntField SpInfGetIntField = NULL
 
pSpInfGetMultiSzField SpInfGetMultiSzField = NULL
 
pSpInfGetStringField SpInfGetStringField = NULL
 
pSpInfGetField SpInfGetField = NULL
 
pSpInfOpenInfFile SpInfOpenInfFile = NULL
 
BOOLEAN IsUnattendedSetup = FALSE
 
HANDLE ProcessHeap
 

Macro Definition Documentation

◆ BOOL_TO_STR

#define BOOL_TO_STR (   b)    ((b) ? "TRUE" : "FALSE")

Function Documentation

◆ START_TEST()

START_TEST ( IsValidInstallDirectory  )

Definition at line 29 of file IsValidInstallDirectory.c.

30{
31 static const struct
32 {
35 } tests[] =
36 {
37 { L"", FALSE },
38 { L" ", FALSE },
39 { L"\\", FALSE },
40 { L"\\\\", FALSE },
41 { L".", FALSE },
42 { L"..", FALSE },
43 { L"...", FALSE },
44 { L"....", FALSE },
45 { L" WINNT", FALSE },
46 { L"WINNT ", FALSE },
47 { L".WINNT", FALSE },
48 { L"..WINNT", FALSE },
49 { L"W.INNT", FALSE },
50 { L"WI.NNT", TRUE },
51 { L"WIN.NT", TRUE },
52 { L"WINNT.", TRUE },
53 { L"WINNT..", FALSE },
54 { L"WINNT. ", FALSE },
55 { L"WINNT.e e", FALSE },
56 { L"WIN^`NT", FALSE },
57
58 { L"WINNT", TRUE },
59 { L"\\WINNT", TRUE },
60 { L"\\WINNT\\", TRUE },
61 { L"\\WINNT\\.", FALSE },
62 { L"WIN\\NT", TRUE },
63 { L"WIN\\NT.", TRUE },
64 { L"\\WIN\\NT\\", TRUE },
65 { L"\\WIN\\NT.\\", TRUE },
66 { L"\\WIN.\\NT52", TRUE },
67 { L"\\WIN\\.\\NT52", FALSE },
68 { L"\\WIN\\..\\NT52", FALSE },
69 { L"\\WIN\\...\\NT52", FALSE },
70 { L"\\WIN\\....\\NT52", FALSE },
71
72 { L"win.nt.5", FALSE },
73 { L"win.ntX5", FALSE },
74 { L"winn.tX5", TRUE },
75 { L"winnt.X5", TRUE },
76 { L"winntX.5", TRUE },
77 { L"winntX5.", TRUE },
78 { L"filenamee.xte", FALSE },
79 { L"filenamee.xt", FALSE },
80 { L"filename.ext", TRUE },
81 { L"file.ame.ext", FALSE },
82 { L"filenam.eext", FALSE },
83
84 { L"1 3 5 7 .abc", FALSE },
85 { L"12345678. c", FALSE },
86 { L"123456789.a", FALSE },
87 { L"12345.abcd", FALSE },
88 { L"12345.ab d", FALSE },
89 { L".abc", FALSE },
90 { L"12.abc.d", FALSE },
91 { L"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", FALSE },
92 };
93
94#define BOOL_TO_STR(b) ((b) ? "TRUE" : "FALSE")
95
97
98 UINT i;
99 for (i = 0; i < _countof(tests); ++i)
100 {
102 ok(ret == tests[i].result,
103 "Unexpected result for '%S', got %s, expected %s\n",
105 }
106
107#undef BOOL_TO_STR
108}
HANDLE ProcessHeap
#define BOOL_TO_STR(b)
unsigned char BOOLEAN
#define ok(value,...)
Definition: atltest.h:57
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define GetProcessHeap()
Definition: compat.h:736
GLuint64EXT * result
Definition: glext.h:11304
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
Definition: glfuncs.h:248
static struct test_info tests[]
unsigned int UINT
Definition: ndis.h:50
#define L(x)
Definition: ntvdm.h:50
BOOLEAN IsValidInstallDirectory(_In_ PCWSTR InstallDir)
Verify whether the given directory is suitable for ReactOS installation. Each path component must be ...
Definition: setuplib.c:713
#define _countof(array)
Definition: sndvol32.h:70
const uint16_t * PCWSTR
Definition: typedefs.h:57
int ret

Variable Documentation

◆ IsUnattendedSetup

◆ ProcessHeap

HANDLE ProcessHeap
  • Internal Headers *‍/

Definition at line 26 of file IsValidInstallDirectory.c.

Referenced by add_entry(), AddBootStoreEntry(), AddDiskToList(), AddNTOSInstallation(), AddPartitionToDisk(), AddProvider(), AppendGenericListEntry(), calloc(), ChangeListViewText(), CloseIniBootLoaderStore(), CommandDumpSector(), CommandPartInfo(), ConsoleCreateFileHandler(), CreateDialogProc(), CreateEditWindow(), CreateFileSystemList(), CreateGenericList(), CreateInsertBlankRegion(), CreateMainWindow(), CreatePartitionList(), CreateProgressBarEx(), DefaultProcessEntry(), DeleteDialogProc(), DeletePartition(), DestroyFileSystemList(), DestroyGenericList(), DestroyPartitionList(), DestroyProgressBar(), DestroyRegion(), DeviceInstallThread(), DismountPartition(), do_reg_operation(), EnumerateBiosDiskEntries(), free(), FreeBootCode(), FreeLdrEnumerateBootEntries(), FreeMemory(), freep(), FreeServiceList(), GetServiceDescription(), GetServiceList(), GetStringFromDialog(), INF_FreeData(), INF_GetDataField(), IniCacheAddKeyAorW(), IniCacheAddSectionAorW(), IniCacheCreate(), IniCacheDestroy(), IniCacheFreeKey(), IniCacheFreeSection(), IniCacheLoadByHandle(), IniCacheSaveByHandle(), IniFindClose(), IniFindFirstValue(), InitDialog(), InitGeneralPage(), InitVolume(), InstallDevice(), MainWndProc(), malloc(), MSZipAlloc(), MSZipFree(), NtLdrEnumerateBootEntries(), OpenIniBootLoaderStore(), OpenPropSheet(), PnpEventThread(), ProcessLangEntry(), ReadBootCodeByHandle(), ReAllocateLayoutBuffer(), RtlDestroyHeap(), RtlpFreeDebugInfo(), SaveDlgInfo(), SetConsoleOutputCP(), SetStartupType(), SetupCloseFileQueue(), SetupDeleteQueueEntry(), SetupOpenFileQueue(), SetupQueueCopyWithCab(), SetupQueueDeleteW(), SetupQueueRenameW(), split(), START_TEST(), SystemConfigurationDataQueryRoutine(), TV1_GetDependants(), TV2_GetDependants(), WriteConsoleOutputCharacterA(), and WriteConsoleOutputCharacterW().

◆ SpInfCloseInfFile

◆ SpInfFindFirstLine

◆ SpInfFindNextLine

◆ SpInfGetBinaryField

pSpInfGetBinaryField SpInfGetBinaryField = NULL

Definition at line 18 of file IsValidInstallDirectory.c.

Referenced by do_reg_operation().

◆ SpInfGetField

pSpInfGetField SpInfGetField = NULL

Definition at line 22 of file IsValidInstallDirectory.c.

Referenced by INF_GetDataField().

◆ SpInfGetFieldCount

pSpInfGetFieldCount SpInfGetFieldCount = NULL

Definition at line 17 of file IsValidInstallDirectory.c.

Referenced by do_reg_operation(), and INF_GetData().

◆ SpInfGetIntField

pSpInfGetIntField SpInfGetIntField = NULL

Definition at line 19 of file IsValidInstallDirectory.c.

Referenced by CheckUnattendedSetup(), LoadSetupInf(), and registry_callback().

◆ SpInfGetMultiSzField

pSpInfGetMultiSzField SpInfGetMultiSzField = NULL

Definition at line 20 of file IsValidInstallDirectory.c.

Referenced by do_reg_operation().

◆ SpInfGetStringField

pSpInfGetStringField SpInfGetStringField = NULL

Definition at line 21 of file IsValidInstallDirectory.c.

Referenced by do_reg_operation(), INF_GetDataField(), and registry_callback().

◆ SpInfOpenInfFile