ReactOS  0.4.14-dev-115-g4576127
advpack.c File Reference
#include <stdio.h>
#include <stdarg.h>
#include <windows.h>
#include <advpub.h>
#include <assert.h>
#include "wine/test.h"
Include dependency graph for advpack.c:

Go to the source code of this file.

Macros

#define TEST_STRING1   "\\Application Name"
 
#define TEST_STRING2   "%49001%\\Application Name"
 
#define GUID_KEY   "SOFTWARE\\Microsoft\\Active Setup\\Installed Components\\guid"
 
#define REG_VAL_EXISTS(key, value)   !RegQueryValueExA(key, value, NULL, NULL, NULL, NULL)
 
#define OPEN_GUID_KEY()   !RegOpenKeyA(HKEY_LOCAL_MACHINE, GUID_KEY, &guid)
 

Functions

static HRESULT (WINAPI *pCloseINFEngine)(HINF)
 
static void get_progfiles_dir (void)
 
static BOOL init_function_pointers (void)
 
static void version_test (void)
 
static void delnode_test (void)
 
static void append_str (char **str, const char *data,...)
 
static void create_inf_file (void)
 
static void translateinfstring_test (void)
 
static void translateinfstringex_test (void)
 
static BOOL check_reg_str (HKEY hkey, LPCSTR name, LPCSTR value)
 
static BOOL check_reg_dword (HKEY hkey, LPCSTR name, DWORD value)
 
static void setperusersecvalues_test (void)
 
 START_TEST (advpack)
 

Variables

static HMODULE hAdvPack
 
static DWORD
 
static LPDWORD
 
static BOOL
 
static PCSTR
 
static HINF PVOID
 
static LPCSTR
 
static LPSTR
 
static LPVOID
 
static PSTR
 
static PDWORD
 
static CHAR inf_file [MAX_PATH]
 
static CHAR PROG_FILES_ROOT [MAX_PATH]
 
static CHAR PROG_FILES [MAX_PATH]
 
static CHAR APP_PATH [MAX_PATH]
 
static DWORD APP_PATH_LEN
 

Macro Definition Documentation

◆ GUID_KEY

#define GUID_KEY   "SOFTWARE\\Microsoft\\Active Setup\\Installed Components\\guid"

Definition at line 34 of file advpack.c.

◆ OPEN_GUID_KEY

#define OPEN_GUID_KEY ( )    !RegOpenKeyA(HKEY_LOCAL_MACHINE, GUID_KEY, &guid)

Definition at line 36 of file advpack.c.

◆ REG_VAL_EXISTS

#define REG_VAL_EXISTS (   key,
  value 
)    !RegQueryValueExA(key, value, NULL, NULL, NULL, NULL)

Definition at line 35 of file advpack.c.

◆ TEST_STRING1

#define TEST_STRING1   "\\Application Name"

Definition at line 30 of file advpack.c.

◆ TEST_STRING2

#define TEST_STRING2   "%49001%\\Application Name"

Definition at line 31 of file advpack.c.

Function Documentation

◆ append_str()

static void append_str ( char **  str,
const char data,
  ... 
)
static

Definition at line 192 of file advpack.c.

193 {
194  va_list valist;
195 
196  va_start(valist, data);
197  vsprintf(*str, data, valist);
198  *str += strlen(*str);
199  va_end(valist);
200 }
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
#define va_end(ap)
Definition: acmsvcex.h:90
const WCHAR * str
char * va_list
Definition: acmsvcex.h:78
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
int __cdecl vsprintf(char *_Dest, const char *_Format, va_list _Args)
Definition: sprintf.c:733
#define va_start(ap, A)
Definition: acmsvcex.h:91
static __ms_va_list valist
Definition: printf.c:59

Referenced by create_inf_file(), and translateinfstringex_test().

◆ check_reg_dword()

static BOOL check_reg_dword ( HKEY  hkey,
LPCSTR  name,
DWORD  value 
)
static

Definition at line 560 of file advpack.c.

561 {
562  DWORD size = sizeof(DWORD);
563  DWORD check;
564 
565  if (RegQueryValueExA(hkey, name, NULL, NULL, (LPBYTE)&check, &size))
566  return FALSE;
567 
568  return (check == value);
569 }
LONG WINAPI RegQueryValueExA(_In_ HKEY hkeyorg, _In_ LPCSTR name, _In_ LPDWORD reserved, _Out_opt_ LPDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ LPDWORD count)
Definition: reg.c:4023
unsigned char * LPBYTE
Definition: typedefs.h:52
static DWORD
Definition: advpack.c:40
smooth NULL
Definition: ftsmooth.c:416
GLsizeiptr size
Definition: glext.h:5919
unsigned long DWORD
Definition: ntddk_ex.h:95
void check(CONTEXT *pContext)
Definition: NtContinue.c:61
Definition: name.c:36

Referenced by setperusersecvalues_test().

◆ check_reg_str()

static BOOL check_reg_str ( HKEY  hkey,
LPCSTR  name,
LPCSTR  value 
)
static

Definition at line 549 of file advpack.c.

550 {
551  DWORD size = MAX_PATH;
552  char check[MAX_PATH];
553 
554  if (RegQueryValueExA(hkey, name, NULL, NULL, (LPBYTE)check, &size))
555  return FALSE;
556 
557  return !lstrcmpA(check, value);
558 }
LONG WINAPI RegQueryValueExA(_In_ HKEY hkeyorg, _In_ LPCSTR name, _In_ LPDWORD reserved, _Out_opt_ LPDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ LPDWORD count)
Definition: reg.c:4023
int WINAPI lstrcmpA(LPCSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:18
unsigned char * LPBYTE
Definition: typedefs.h:52
smooth NULL
Definition: ftsmooth.c:416
GLsizeiptr size
Definition: glext.h:5919
#define MAX_PATH
Definition: compat.h:26
unsigned long DWORD
Definition: ntddk_ex.h:95
void check(CONTEXT *pContext)
Definition: NtContinue.c:61
Definition: name.c:36

Referenced by setperusersecvalues_test().

◆ create_inf_file()

static void create_inf_file ( void  )
static

Definition at line 202 of file advpack.c.

203 {
204  char data[1024];
205  char *ptr = data;
206  DWORD dwNumberOfBytesWritten;
209 
210  append_str(&ptr, "[Version]\n");
211  append_str(&ptr, "Signature=\"$Chicago$\"\n");
212  append_str(&ptr, "[CustInstDestSection]\n");
213  append_str(&ptr, "49001=ProgramFilesDir\n");
214  append_str(&ptr, "49010=DestA,1\n");
215  append_str(&ptr, "49020=DestB\n");
216  append_str(&ptr, "49030=DestC\n");
217  append_str(&ptr, "[ProgramFilesDir]\n");
218  append_str(&ptr, "HKLM,\"Software\\Microsoft\\Windows\\CurrentVersion\",");
219  append_str(&ptr, "\"ProgramFilesDir\",,\"%%24%%\\%%LProgramF%%\"\n");
220  append_str(&ptr, "[section]\n");
221  append_str(&ptr, "NotACustomDestination=Version\n");
222  append_str(&ptr, "CustomDestination=CustInstDestSection\n");
223  append_str(&ptr, "[Options.NTx86]\n");
224  append_str(&ptr, "49001=ProgramFilesDir\n");
225  append_str(&ptr, "InstallDir=%%49001%%\\%%DefaultAppPath%%\n");
226  append_str(&ptr, "Result1=%%49010%%\n");
227  append_str(&ptr, "Result2=%%49020%%\n");
228  append_str(&ptr, "Result3=%%49030%%\n");
229  append_str(&ptr, "CustomHDestination=CustInstDestSection\n");
230  append_str(&ptr, "[Strings]\n");
231  append_str(&ptr, "DefaultAppPath=\"Application Name\"\n");
232  append_str(&ptr, "LProgramF=\"%s\"\n", PROG_FILES);
233  append_str(&ptr, "[DestA]\n");
234  append_str(&ptr, "HKLM,\"Software\\Garbage\",\"ProgramFilesDir\",,'%%24%%\\%%LProgramF%%'\n");
235  append_str(&ptr, "[DestB]\n");
236  append_str(&ptr, "'HKLM','Software\\Microsoft\\Windows\\CurrentVersion',");
237  append_str(&ptr, "'ProgramFilesDir',,\"%%24%%\"\n");
238  append_str(&ptr, "[DestC]\n");
239  append_str(&ptr, "HKLM,\"Software\\Garbage\",\"ProgramFilesDir\",,'%%24%%'\n");
240 
241  WriteFile(hf, data, ptr - data, &dwNumberOfBytesWritten, NULL);
242  CloseHandle(hf);
243 }
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
Definition: rw.c:24
#define CloseHandle
Definition: compat.h:398
static CHAR PROG_FILES[MAX_PATH]
Definition: advpack.c:49
#define GENERIC_WRITE
Definition: nt_native.h:90
static PVOID ptr
Definition: dispmode.c:27
smooth NULL
Definition: ftsmooth.c:416
unsigned long DWORD
Definition: ntddk_ex.h:95
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
#define FILE_ATTRIBUTE_NORMAL
Definition: compat.h:126
#define CREATE_ALWAYS
Definition: disk.h:72
static void append_str(char **str, const char *data,...)
Definition: advpack.c:192
#define CreateFileA(a, b, c, d, e, f, g)
Definition: compat.h:399
Definition: inf.c:48

Referenced by translateinfstring_test(), and translateinfstringex_test().

◆ delnode_test()

static void delnode_test ( void  )
static

Definition at line 128 of file advpack.c.

129 {
130  HRESULT hr;
131  HANDLE hn;
132  CHAR currDir[MAX_PATH];
133  UINT currDirLen;
134 
135  /* Native DelNode apparently does not support relative paths, so we use
136  absolute paths for testing */
137  currDirLen = GetCurrentDirectoryA(ARRAY_SIZE(currDir), currDir);
138  assert(currDirLen > 0 && currDirLen < ARRAY_SIZE(currDir));
139 
140  if(currDir[currDirLen - 1] == '\\')
141  currDir[--currDirLen] = 0;
142 
143  /* Simple tests; these should fail. */
144  hr = pDelNode(NULL, 0);
145  ok (hr == E_FAIL, "DelNode called with NULL pathname should return E_FAIL\n");
146  hr = pDelNode("", 0);
147  ok (hr == E_FAIL, "DelNode called with empty pathname should return E_FAIL\n");
148 
149  /* Test deletion of a file. */
150  hn = CreateFileA("DelNodeTestFile1", GENERIC_WRITE, 0, NULL,
153  CloseHandle(hn);
154  hr = pDelNode(lstrcatA(currDir, "\\DelNodeTestFile1"), 0);
155  ok (hr == S_OK, "DelNode failed deleting a single file\n");
156  currDir[currDirLen] = '\0';
157 
158  /* Test deletion of an empty directory. */
159  CreateDirectoryA("DelNodeTestDir", NULL);
160  hr = pDelNode(lstrcatA(currDir, "\\DelNodeTestDir"), 0);
161  ok (hr == S_OK, "DelNode failed deleting an empty directory\n");
162  currDir[currDirLen] = '\0';
163 
164  /* Test deletion of a directory containing one file. */
165  CreateDirectoryA("DelNodeTestDir", NULL);
166  hn = CreateFileA("DelNodeTestDir\\DelNodeTestFile1", GENERIC_WRITE, 0, NULL,
169  CloseHandle(hn);
170  hr = pDelNode(lstrcatA(currDir, "\\DelNodeTestDir"), 0);
171  ok (hr == S_OK, "DelNode failed deleting a directory containing one file\n");
172  currDir[currDirLen] = '\0';
173 
174  /* Test deletion of a directory containing multiple files. */
175  CreateDirectoryA("DelNodeTestDir", NULL);
176  hn = CreateFileA("DelNodeTestDir\\DelNodeTestFile1", GENERIC_WRITE, 0, NULL,
179  CloseHandle(hn);
180  hn = CreateFileA("DelNodeTestDir\\DelNodeTestFile2", GENERIC_WRITE, 0, NULL,
183  CloseHandle(hn);
184  hn = CreateFileA("DelNodeTestDir\\DelNodeTestFile3", GENERIC_WRITE, 0, NULL,
187  CloseHandle(hn);
188  hr = pDelNode(lstrcatA(currDir, "\\DelNodeTestDir"), 0);
189  ok (hr == S_OK, "DelNode failed deleting a directory containing multiple files\n");
190 }
#define CloseHandle
Definition: compat.h:398
HRESULT hr
Definition: shlfolder.c:183
char CHAR
Definition: xmlstorage.h:175
#define INVALID_HANDLE_VALUE
Definition: compat.h:391
#define assert(x)
Definition: debug.h:53
#define E_FAIL
Definition: ddrawi.h:102
#define GENERIC_WRITE
Definition: nt_native.h:90
BOOL WINAPI CreateDirectoryA(IN LPCSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
Definition: dir.c:37
smooth NULL
Definition: ftsmooth.c:416
LPSTR WINAPI lstrcatA(LPSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:123
LONG HRESULT
Definition: typedefs.h:77
#define MAX_PATH
Definition: compat.h:26
#define FILE_ATTRIBUTE_NORMAL
Definition: compat.h:126
#define S_OK
Definition: intsafe.h:59
#define CREATE_ALWAYS
Definition: disk.h:72
#define ARRAY_SIZE(a)
Definition: main.h:24
#define ok(value,...)
Definition: atltest.h:57
DWORD WINAPI GetCurrentDirectoryA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
Definition: path.c:2145
unsigned int UINT
Definition: ndis.h:50
#define CreateFileA(a, b, c, d, e, f, g)
Definition: compat.h:399

Referenced by START_TEST().

◆ get_progfiles_dir()

static void get_progfiles_dir ( void  )
static

Definition at line 53 of file advpack.c.

54 {
55  HKEY hkey;
57 
58  RegOpenKeyA(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion", &hkey);
59  RegQueryValueExA(hkey, "ProgramFilesDir", NULL, NULL, (LPBYTE)PROG_FILES_ROOT, &size);
60  RegCloseKey(hkey);
61 
62  lstrcpyA(PROG_FILES, PROG_FILES_ROOT + 3); /* skip C:\ */
66 }
LONG WINAPI RegOpenKeyA(HKEY hKey, LPCSTR lpSubKey, PHKEY phkResult)
Definition: reg.c:3257
LONG WINAPI RegQueryValueExA(_In_ HKEY hkeyorg, _In_ LPCSTR name, _In_ LPDWORD reserved, _Out_opt_ LPDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ LPDWORD count)
Definition: reg.c:4023
static CHAR PROG_FILES[MAX_PATH]
Definition: advpack.c:49
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
unsigned char * LPBYTE
Definition: typedefs.h:52
smooth NULL
Definition: ftsmooth.c:416
LPSTR WINAPI lstrcatA(LPSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:123
GLsizeiptr size
Definition: glext.h:5919
#define MAX_PATH
Definition: compat.h:26
unsigned long DWORD
Definition: ntddk_ex.h:95
LPSTR WINAPI lstrcpyA(LPSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:100
int WINAPI lstrlenA(LPCSTR lpString)
Definition: lstring.c:145
static CHAR APP_PATH[MAX_PATH]
Definition: advpack.c:50
#define TEST_STRING1
Definition: advpack.c:30
static CHAR PROG_FILES_ROOT[MAX_PATH]
Definition: advpack.c:48
static DWORD APP_PATH_LEN
Definition: advpack.c:51
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12

Referenced by START_TEST().

◆ HRESULT()

static HRESULT ( WINAPI pCloseINFEngine)
static

◆ init_function_pointers()

static BOOL init_function_pointers ( void  )
static

Definition at line 68 of file advpack.c.

69 {
70  hAdvPack = LoadLibraryA("advpack.dll");
71 
72  if (!hAdvPack)
73  return FALSE;
74 
75  pCloseINFEngine = (void*)GetProcAddress(hAdvPack, "CloseINFEngine");
76  pDelNode = (void *)GetProcAddress(hAdvPack, "DelNode");
77  pGetVersionFromFile = (void *)GetProcAddress(hAdvPack, "GetVersionFromFile");
78  pOpenINFEngine = (void*)GetProcAddress(hAdvPack, "OpenINFEngine");
79  pSetPerUserSecValues = (void*)GetProcAddress(hAdvPack, "SetPerUserSecValues");
80  pTranslateInfString = (void *)GetProcAddress(hAdvPack, "TranslateInfString");
81  pTranslateInfStringEx = (void*)GetProcAddress(hAdvPack, "TranslateInfStringEx");
82 
83  if (!pCloseINFEngine || !pDelNode || !pGetVersionFromFile ||
84  !pOpenINFEngine || !pSetPerUserSecValues || !pTranslateInfString)
85  {
86  win_skip("Needed functions are not available\n");
88  return FALSE;
89  }
90 
91  return TRUE;
92 }
#define TRUE
Definition: types.h:120
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
Definition: loader.c:111
#define FreeLibrary(x)
Definition: compat.h:405
static HMODULE hAdvPack
Definition: advpack.c:38
#define GetProcAddress(x, y)
Definition: compat.h:410
#define win_skip
Definition: test.h:141

Referenced by START_TEST().

◆ setperusersecvalues_test()

static void setperusersecvalues_test ( void  )
static

Definition at line 571 of file advpack.c.

572 {
573  PERUSERSECTIONA peruser;
574  HRESULT hr;
575  HKEY guid;
576 
577  lstrcpyA(peruser.szDispName, "displayname");
578  lstrcpyA(peruser.szLocale, "locale");
579  lstrcpyA(peruser.szStub, "stub");
580  lstrcpyA(peruser.szVersion, "1,1,1,1");
581  lstrcpyA(peruser.szCompID, "compid");
582  peruser.dwIsInstalled = 1;
583  peruser.bRollback = FALSE;
584 
585  /* try a NULL pPerUser */
586  if (0)
587  {
588  /* This crashes on systems with IE7 */
589  hr = pSetPerUserSecValues(NULL);
590  todo_wine
591  ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
592  ok(!OPEN_GUID_KEY(), "Expected guid key to not exist\n");
593  }
594 
595  /* at the very least, szGUID must be valid */
596  peruser.szGUID[0] = '\0';
597  hr = pSetPerUserSecValues(&peruser);
598  ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
599  ok(!OPEN_GUID_KEY(), "Expected guid key to not exist\n");
600 
601  /* set initial values */
602  lstrcpyA(peruser.szGUID, "guid");
603  hr = pSetPerUserSecValues(&peruser);
604  if (hr == E_FAIL)
605  {
606  skip("SetPerUserSecValues is broken\n");
607  return;
608  }
609  ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
610  ok(OPEN_GUID_KEY(), "Expected guid key to exist\n");
611  ok(check_reg_str(guid, NULL, "displayname"), "Expected displayname\n");
612  ok(check_reg_str(guid, "ComponentID", "compid"), "Expected compid\n");
613  ok(check_reg_str(guid, "Locale", "locale"), "Expected locale\n");
614  ok(check_reg_str(guid, "StubPath", "stub"), "Expected stub\n");
615  ok(check_reg_str(guid, "Version", "1,1,1,1"), "Expected 1,1,1,1\n");
616  ok(check_reg_dword(guid, "IsInstalled", 1), "Expected 1\n");
617  ok(!REG_VAL_EXISTS(guid, "OldDisplayName"), "Expected OldDisplayName to not exist\n");
618  ok(!REG_VAL_EXISTS(guid, "OldLocale"), "Expected OldLocale to not exist\n");
619  ok(!REG_VAL_EXISTS(guid, "OldStubPath"), "Expected OldStubPath to not exist\n");
620  ok(!REG_VAL_EXISTS(guid, "OldVersion"), "Expected OldVersion to not exist\n");
621  ok(!REG_VAL_EXISTS(guid, "RealStubPath"), "Expected RealStubPath to not exist\n");
622 
623  /* raise the version, but bRollback is FALSE, so vals not saved */
624  lstrcpyA(peruser.szVersion, "2,1,1,1");
625  hr = pSetPerUserSecValues(&peruser);
626  ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
627  ok(check_reg_str(guid, NULL, "displayname"), "Expected displayname\n");
628  ok(check_reg_str(guid, "ComponentID", "compid"), "Expected compid\n");
629  ok(check_reg_str(guid, "Locale", "locale"), "Expected locale\n");
630  ok(check_reg_str(guid, "StubPath", "stub"), "Expected stub\n");
631  ok(check_reg_str(guid, "Version", "2,1,1,1"), "Expected 2,1,1,1\n");
632  ok(check_reg_dword(guid, "IsInstalled", 1), "Expected 1\n");
633  ok(!REG_VAL_EXISTS(guid, "OldDisplayName"), "Expected OldDisplayName to not exist\n");
634  ok(!REG_VAL_EXISTS(guid, "OldLocale"), "Expected OldLocale to not exist\n");
635  ok(!REG_VAL_EXISTS(guid, "OldStubPath"), "Expected OldStubPath to not exist\n");
636  ok(!REG_VAL_EXISTS(guid, "OldVersion"), "Expected OldVersion to not exist\n");
637  ok(!REG_VAL_EXISTS(guid, "RealStubPath"), "Expected RealStubPath to not exist\n");
638 
639  /* raise the version again, bRollback is TRUE so vals are saved */
640  peruser.bRollback = TRUE;
641  lstrcpyA(peruser.szVersion, "3,1,1,1");
642  hr = pSetPerUserSecValues(&peruser);
643  ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
644  ok(check_reg_str(guid, NULL, "displayname"), "Expected displayname\n");
645  ok(check_reg_str(guid, "ComponentID", "compid"), "Expected compid\n");
646  ok(check_reg_str(guid, "Locale", "locale"), "Expected locale\n");
647  ok(check_reg_dword(guid, "IsInstalled", 1), "Expected 1\n");
648  ok(check_reg_str(guid, "Version", "3,1,1,1"), "Expected 3,1,1,1\n");
649  todo_wine
650  {
651  ok(check_reg_str(guid, "OldDisplayName", "displayname"), "Expected displayname\n");
652  ok(check_reg_str(guid, "OldLocale", "locale"), "Expected locale\n");
653  ok(check_reg_str(guid, "RealStubPath", "stub"), "Expected stub\n");
654  ok(check_reg_str(guid, "OldStubPath", "stub"), "Expected stub\n");
655  ok(check_reg_str(guid, "OldVersion", "2,1,1,1"), "Expected 2,1,1,1\n");
656  ok(check_reg_str(guid, "StubPath",
657  "rundll32.exe advpack.dll,UserInstStubWrapper guid"),
658  "Expected real stub\n");
659  }
660 
662 }
#define TRUE
Definition: types.h:120
CHAR szCompID[128]
Definition: advpub.h:60
HRESULT hr
Definition: shlfolder.c:183
CHAR szStub[MAX_PATH *4]
Definition: advpub.h:58
static BOOL check_reg_str(HKEY hkey, LPCSTR name, LPCSTR value)
Definition: advpack.c:549
#define E_FAIL
Definition: ddrawi.h:102
CHAR szGUID[39+20]
Definition: advpub.h:55
const GUID * guid
CHAR szDispName[128]
Definition: advpub.h:56
smooth NULL
Definition: ftsmooth.c:416
CHAR szVersion[32]
Definition: advpub.h:59
LONG HRESULT
Definition: typedefs.h:77
#define GUID_KEY
Definition: advpack.c:34
#define REG_VAL_EXISTS(key, value)
Definition: advpack.c:35
#define OPEN_GUID_KEY()
Definition: advpack.c:36
LPSTR WINAPI lstrcpyA(LPSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:100
#define todo_wine
Definition: test.h:154
LONG WINAPI RegDeleteKeyA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey)
Definition: reg.c:1222
BOOL bRollback
Definition: advpub.h:62
#define S_OK
Definition: intsafe.h:59
#define ok(value,...)
Definition: atltest.h:57
CHAR szLocale[10]
Definition: advpub.h:57
#define skip(...)
Definition: atltest.h:64
DWORD dwIsInstalled
Definition: advpub.h:61
static BOOL check_reg_dword(HKEY hkey, LPCSTR name, DWORD value)
Definition: advpack.c:560
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12

Referenced by START_TEST().

◆ START_TEST()

START_TEST ( advpack  )

Definition at line 664 of file advpack.c.

665 {
666  if (!init_function_pointers())
667  return;
668 
669  /* Make sure we create the temporary file in a directory
670  * where we have adequate rights
671  */
673  lstrcatA(inf_file,"test.inf");
674 
676 
677  version_test();
678  delnode_test();
682 
684 }
static void delnode_test(void)
Definition: advpack.c:128
static BOOL init_function_pointers(void)
Definition: advpack.c:68
static void translateinfstringex_test(void)
Definition: advpack.c:325
static void version_test(void)
Definition: advpack.c:94
LPSTR WINAPI lstrcatA(LPSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:123
#define FreeLibrary(x)
Definition: compat.h:405
static void get_progfiles_dir(void)
Definition: advpack.c:53
static void translateinfstring_test(void)
Definition: advpack.c:245
#define MAX_PATH
Definition: compat.h:26
static void setperusersecvalues_test(void)
Definition: advpack.c:571
static HMODULE hAdvPack
Definition: advpack.c:38
DWORD WINAPI GetTempPathA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
Definition: path.c:2053
Definition: inf.c:48

◆ translateinfstring_test()

static void translateinfstring_test ( void  )
static

Definition at line 245 of file advpack.c.

246 {
247  HRESULT hr;
248  char buffer[MAX_PATH];
249  DWORD dwSize;
250 
251  create_inf_file();
252 
253  /* pass in a couple invalid parameters */
254  hr = pTranslateInfString(NULL, NULL, NULL, NULL, buffer, MAX_PATH, &dwSize, NULL);
255  ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got 0x%08x\n", (UINT)hr);
256 
257  /* try to open an inf file that doesn't exist */
258  hr = pTranslateInfString("c:\\a.inf", "Options.NTx86", "Options.NTx86",
259  "InstallDir", buffer, MAX_PATH, &dwSize, NULL);
262  "Expected E_INVALIDARG, 0x80070002 or 0x8007007e, got 0x%08x\n", (UINT)hr);
263 
265  {
266  win_skip("WinNT 3.51 detected. Skipping tests for TranslateInfString()\n");
267  return;
268  }
269 
270  /* try a nonexistent section */
271  buffer[0] = 0;
272  hr = pTranslateInfString(inf_file, "idontexist", "Options.NTx86",
273  "InstallDir", buffer, MAX_PATH, &dwSize, NULL);
274  if (hr == E_ACCESSDENIED)
275  {
276  skip("TranslateInfString is broken\n");
277  return;
278  }
279  ok(hr == S_OK, "Expected S_OK, got 0x%08x\n", (UINT)hr);
280  ok(!strcmp(buffer, TEST_STRING2), "Expected %s, got %s\n", TEST_STRING2, buffer);
281  ok(dwSize == 25, "Expected size 25, got %d\n", dwSize);
282 
283  buffer[0] = 0;
284  /* try other nonexistent section */
285  hr = pTranslateInfString(inf_file, "Options.NTx86", "idontexist",
286  "InstallDir", buffer, MAX_PATH, &dwSize, NULL);
288  "Expected SPAPI_E_LINE_NOT_FOUND or E_INVALIDARG, got 0x%08x\n", (UINT)hr);
289 
290  buffer[0] = 0;
291  /* try nonexistent key */
292  hr = pTranslateInfString(inf_file, "Options.NTx86", "Options.NTx86",
293  "notvalid", buffer, MAX_PATH, &dwSize, NULL);
295  "Expected SPAPI_E_LINE_NOT_FOUND or E_INVALIDARG, got 0x%08x\n", (UINT)hr);
296 
297  buffer[0] = 0;
298  /* test the behavior of pszInstallSection */
299  hr = pTranslateInfString(inf_file, "section", "Options.NTx86",
300  "InstallDir", buffer, MAX_PATH, &dwSize, NULL);
301  ok(hr == ERROR_SUCCESS || hr == E_FAIL,
302  "Expected ERROR_SUCCESS or E_FAIL, got 0x%08x\n", (UINT)hr);
303 
304  if(hr == ERROR_SUCCESS)
305  {
306  ok(!strcmp(buffer, APP_PATH), "Expected '%s', got '%s'\n", APP_PATH, buffer);
307  ok(dwSize == APP_PATH_LEN, "Expected size %d, got %d\n", APP_PATH_LEN, dwSize);
308  }
309 
310  buffer[0] = 0;
311  /* try without a pszInstallSection */
312  hr = pTranslateInfString(inf_file, NULL, "Options.NTx86",
313  "InstallDir", buffer, MAX_PATH, &dwSize, NULL);
314  ok(hr == S_OK, "Expected S_OK, got 0x%08x\n", (UINT)hr);
315  todo_wine
316  {
317  ok(!strcmp(buffer, TEST_STRING2), "Expected %s, got %s\n", TEST_STRING2, buffer);
318  ok(dwSize == 25, "Expected size 25, got %d\n", dwSize);
319  }
320 
321  DeleteFileA("c:\\a.inf");
323 }
#define E_ACCESSDENIED
Definition: winerror.h:2849
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
#define ERROR_SUCCESS
Definition: deptool.c:10
HRESULT hr
Definition: shlfolder.c:183
GLuint buffer
Definition: glext.h:5915
#define E_FAIL
Definition: ddrawi.h:102
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
Definition: delete.c:24
#define ERROR_FILE_NOT_FOUND
Definition: disk.h:79
LONG HRESULT
Definition: typedefs.h:77
#define MAX_PATH
Definition: compat.h:26
unsigned long DWORD
Definition: ntddk_ex.h:95
#define todo_wine
Definition: test.h:154
static void create_inf_file(void)
Definition: advpack.c:202
#define SPAPI_E_LINE_NOT_FOUND
Definition: winerror.h:3144
#define S_OK
Definition: intsafe.h:59
#define ok(value,...)
Definition: atltest.h:57
static CHAR APP_PATH[MAX_PATH]
Definition: advpack.c:50
unsigned int UINT
Definition: ndis.h:50
#define skip(...)
Definition: atltest.h:64
#define ERROR_MOD_NOT_FOUND
Definition: compat.h:94
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
static DWORD APP_PATH_LEN
Definition: advpack.c:51
#define win_skip
Definition: test.h:141
#define TEST_STRING2
Definition: advpack.c:31
Definition: inf.c:48
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
Definition: env.c:54

Referenced by START_TEST().

◆ translateinfstringex_test()

static void translateinfstringex_test ( void  )
static

Definition at line 325 of file advpack.c.

326 {
327  HINF hinf;
328  HRESULT hr;
329  char buffer[MAX_PATH];
330  DWORD size = MAX_PATH;
331 
332  hr = pOpenINFEngine(inf_file, NULL, 0, &hinf, NULL);
333  if (hr == E_UNEXPECTED)
334  {
335  win_skip("Skipping tests on win9x because of brokenness\n");
336  return;
337  }
338 
339  create_inf_file();
340 
341  /* need to see if there are any flags */
342 
343  /* try a NULL filename */
344  hr = pOpenINFEngine(NULL, "Options.NTx86", 0, &hinf, NULL);
345  ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr);
346 
347  /* try an empty filename */
348  hr = pOpenINFEngine("", "Options.NTx86", 0, &hinf, NULL);
350  hr == HRESULT_FROM_WIN32(E_UNEXPECTED) /* 9x */,
351  "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND or E_UNEXPECTED), got %08x\n", hr);
352 
353  /* try a NULL hinf */
354  hr = pOpenINFEngine(inf_file, "Options.NTx86", 0, NULL, NULL);
355  ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr);
356 
357  /* open the INF without the Install section specified */
358  hr = pOpenINFEngine(inf_file, NULL, 0, &hinf, NULL);
359  ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
360 
361  /* try a NULL hinf */
362  hr = pTranslateInfStringEx(NULL, inf_file, "Options.NTx86", "InstallDir",
363  buffer, size, &size, NULL);
364  ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr);
365 
366  /* try a NULL filename */
367  hr = pTranslateInfStringEx(hinf, NULL, "Options.NTx86", "InstallDir",
368  buffer, size, &size, NULL);
369  ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr);
370 
371  /* try an empty filename */
372  memset(buffer, 'a', 25);
373  buffer[24] = '\0';
374  size = MAX_PATH;
375  hr = pTranslateInfStringEx(hinf, "", "Options.NTx86", "InstallDir",
376  buffer, size, &size, NULL);
377  ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
378  todo_wine
379  {
380  ok(!strcmp(buffer, TEST_STRING2), "Expected %s, got %s\n", TEST_STRING2, buffer);
381  ok(size == 25, "Expected size 25, got %d\n", size);
382  }
383 
384  /* try a NULL translate section */
385  hr = pTranslateInfStringEx(hinf, inf_file, NULL, "InstallDir",
386  buffer, size, &size, NULL);
387  ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr);
388 
389  /* try an empty translate section */
390  hr = pTranslateInfStringEx(hinf, inf_file, "", "InstallDir",
391  buffer, size, &size, NULL);
392  ok(hr == SPAPI_E_LINE_NOT_FOUND, "Expected SPAPI_E_LINE_NOT_FOUND, got %08x\n", hr);
393 
394  /* try a NULL translate key */
395  hr = pTranslateInfStringEx(hinf, inf_file, "Options.NTx86", NULL,
396  buffer, size, &size, NULL);
397  ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr);
398 
399  /* try an empty translate key */
400  hr = pTranslateInfStringEx(hinf, inf_file, "Options.NTx86", "",
401  buffer, size, &size, NULL);
402  ok(hr == SPAPI_E_LINE_NOT_FOUND, "Expected SPAPI_E_LINE_NOT_FOUND, got %08x\n", hr);
403 
404  /* successfully translate the string */
405  memset(buffer, 'a', 25);
406  buffer[24] = '\0';
407  size = MAX_PATH;
408  hr = pTranslateInfStringEx(hinf, inf_file, "Options.NTx86", "InstallDir",
409  buffer, size, &size, NULL);
410  ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
411  todo_wine
412  {
413  ok(!strcmp(buffer, TEST_STRING2), "Expected %s, got %s\n", TEST_STRING2, buffer);
414  ok(size == 25, "Expected size 25, got %d\n", size);
415  }
416 
417  /* try a NULL hinf */
418  hr = pCloseINFEngine(NULL);
419  ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr);
420 
421  /* successfully close the hinf */
422  hr = pCloseINFEngine(hinf);
423  ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
424 
425  /* open the inf with the install section */
426  hr = pOpenINFEngine(inf_file, "section", 0, &hinf, NULL);
427  if (hr == E_FAIL)
428  {
429  skip("can't open engine with install section (needs admin rights)\n");
431  return;
432  }
433  ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
434 
435  /* translate the string with the install section specified */
436  memset(buffer, 'a', APP_PATH_LEN);
437  buffer[APP_PATH_LEN - 1] = '\0';
438  size = MAX_PATH;
439  hr = pTranslateInfStringEx(hinf, inf_file, "Options.NTx86", "InstallDir",
440  buffer, size, &size, NULL);
441  ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
442  ok(!strcmp(buffer, APP_PATH), "Expected %s, got %s\n", APP_PATH, buffer);
443  ok(size == APP_PATH_LEN, "Expected size %d, got %d\n", APP_PATH_LEN, size);
444 
445  /* Single quote test (Note size includes null on return from call) */
446  memset(buffer, 'a', APP_PATH_LEN);
447  buffer[APP_PATH_LEN - 1] = '\0';
448  size = MAX_PATH;
449  hr = pTranslateInfStringEx(hinf, inf_file, "Options.NTx86", "Result1",
450  buffer, size, &size, NULL);
451  ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
453  "Expected %s, got %s\n", PROG_FILES_ROOT, buffer);
454  ok(size == strlen(PROG_FILES_ROOT)+1, "Expected size %d, got %d\n",
456 
457  memset(buffer, 'a', APP_PATH_LEN);
458  buffer[APP_PATH_LEN - 1] = '\0';
459  size = MAX_PATH;
460  hr = pTranslateInfStringEx(hinf, inf_file, "Options.NTx86", "Result2",
461  buffer, size, &size, NULL);
462  ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
464  "Expected %s, got %s\n", PROG_FILES_ROOT, buffer);
465  ok(size == strlen(PROG_FILES_ROOT)+1, "Expected size %d, got %d\n",
467 
468  {
469  char drive[MAX_PATH];
471  drive[3] = 0x00; /* Just keep the system drive plus '\' */
472 
473  memset(buffer, 'a', APP_PATH_LEN);
474  buffer[APP_PATH_LEN - 1] = '\0';
475  size = MAX_PATH;
476  hr = pTranslateInfStringEx(hinf, inf_file, "Options.NTx86", "Result3",
477  buffer, size, &size, NULL);
478  ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
480  "Expected %s, got %s\n", drive, buffer);
481  ok(size == strlen(drive)+1, "Expected size %d, got %d\n",
482  lstrlenA(drive)+1, size);
483  }
484 
485  /* close the INF again */
486  hr = pCloseINFEngine(hinf);
487  ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
488 
490 
491  /* Create another .inf file which is just here to trigger a wine bug */
492  {
493  char data[1024];
494  char *ptr = data;
495  DWORD dwNumberOfBytesWritten;
498 
499  append_str(&ptr, "[Version]\n");
500  append_str(&ptr, "Signature=\"$Chicago$\"\n");
501  append_str(&ptr, "[section]\n");
502  append_str(&ptr, "NotACustomDestination=Version\n");
503  append_str(&ptr, "CustomDestination=CustInstDestSection\n");
504  append_str(&ptr, "[CustInstDestSection]\n");
505  append_str(&ptr, "49010=DestA,1\n");
506  append_str(&ptr, "49020=DestB\n");
507  append_str(&ptr, "49030=DestC\n");
508  append_str(&ptr, "49040=DestD\n");
509  append_str(&ptr, "[Options.NTx86]\n");
510  append_str(&ptr, "Result2=%%49030%%\n");
511  append_str(&ptr, "[DestA]\n");
512  append_str(&ptr, "HKLM,\"Software\\Garbage\",\"ProgramFilesDir\",,'%%24%%'\n");
513  /* The point of this test is to have HKCU just before the quoted HKLM */
514  append_str(&ptr, "[DestB]\n");
515  append_str(&ptr, "HKCU,\"Software\\Garbage\",\"ProgramFilesDir\",,'%%24%%'\n");
516  append_str(&ptr, "[DestC]\n");
517  append_str(&ptr, "'HKLM','Software\\Microsoft\\Windows\\CurrentVersion',");
518  append_str(&ptr, "'ProgramFilesDir',,\"%%24%%\"\n");
519  append_str(&ptr, "[DestD]\n");
520  append_str(&ptr, "HKLM,\"Software\\Garbage\",\"ProgramFilesDir\",,'%%24%%'\n");
521 
522  WriteFile(hf, data, ptr - data, &dwNumberOfBytesWritten, NULL);
523  CloseHandle(hf);
524  }
525 
526  /* open the inf with the install section */
527  hr = pOpenINFEngine(inf_file, "section", 0, &hinf, NULL);
528  ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
529 
530  /* Single quote test (Note size includes null on return from call) */
531  memset(buffer, 'a', APP_PATH_LEN);
532  buffer[APP_PATH_LEN - 1] = '\0';
533  size = MAX_PATH;
534  hr = pTranslateInfStringEx(hinf, inf_file, "Options.NTx86", "Result2",
535  buffer, size, &size, NULL);
536  ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
538  "Expected %s, got %s\n", PROG_FILES_ROOT, buffer);
539  ok(size == strlen(PROG_FILES_ROOT)+1, "Expected size %d, got %d\n",
541 
542  /* close the INF again */
543  hr = pCloseINFEngine(hinf);
544  ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
545 
547 }
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
Definition: rw.c:24
#define CloseHandle
Definition: compat.h:398
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
int WINAPI lstrcmpiA(LPCSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:42
HRESULT hr
Definition: shlfolder.c:183
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
GLuint buffer
Definition: glext.h:5915
#define E_FAIL
Definition: ddrawi.h:102
#define GENERIC_WRITE
Definition: nt_native.h:90
static PVOID ptr
Definition: dispmode.c:27
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
Definition: delete.c:24
#define ERROR_FILE_NOT_FOUND
Definition: disk.h:79
GLsizeiptr size
Definition: glext.h:5919
LONG HRESULT
Definition: typedefs.h:77
#define MAX_PATH
Definition: compat.h:26
unsigned long DWORD
Definition: ntddk_ex.h:95
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
LPSTR WINAPI lstrcpyA(LPSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:100
#define FILE_ATTRIBUTE_NORMAL
Definition: compat.h:126
#define todo_wine
Definition: test.h:154
static void create_inf_file(void)
Definition: advpack.c:202
#define SPAPI_E_LINE_NOT_FOUND
Definition: winerror.h:3144
#define S_OK
Definition: intsafe.h:59
#define CREATE_ALWAYS
Definition: disk.h:72
int WINAPI lstrlenA(LPCSTR lpString)
Definition: lstring.c:145
#define ok(value,...)
Definition: atltest.h:57
static CHAR APP_PATH[MAX_PATH]
Definition: advpack.c:50
#define E_UNEXPECTED
Definition: winerror.h:2456
#define skip(...)
Definition: atltest.h:64
static void append_str(char **str, const char *data,...)
Definition: advpack.c:192
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
#define CreateFileA(a, b, c, d, e, f, g)
Definition: compat.h:399
static CHAR PROG_FILES_ROOT[MAX_PATH]
Definition: advpack.c:48
#define memset(x, y, z)
Definition: compat.h:39
static DWORD APP_PATH_LEN
Definition: advpack.c:51
#define win_skip
Definition: test.h:141
#define TEST_STRING2
Definition: advpack.c:31
Definition: inf.c:48

Referenced by START_TEST().

◆ version_test()

static void version_test ( void  )
static

Definition at line 94 of file advpack.c.

95 {
96  HRESULT hr;
97  DWORD major, minor;
98 
99  major = minor = 0;
100  hr = pGetVersionFromFile("kernel32.dll", &major, &minor, FALSE);
101  ok (hr == S_OK, "GetVersionFromFileEx(kernel32.dll) failed, returned "
102  "0x%08x\n", hr);
103  trace("kernel32.dll Language ID: 0x%08x, Codepage ID: 0x%08x\n",
104  major, minor);
105 
106  major = minor = 0;
107  hr = pGetVersionFromFile("kernel32.dll", &major, &minor, TRUE);
108  ok (hr == S_OK, "GetVersionFromFileEx(kernel32.dll) failed, returned "
109  "0x%08x\n", hr);
110  trace("kernel32.dll version: %d.%d.%d.%d\n", HIWORD(major), LOWORD(major),
111  HIWORD(minor), LOWORD(minor));
112 
113  major = minor = 0;
114  hr = pGetVersionFromFile("advpack.dll", &major, &minor, FALSE);
115  ok (hr == S_OK, "GetVersionFromFileEx(advpack.dll) failed, returned "
116  "0x%08x\n", hr);
117  trace("advpack.dll Language ID: 0x%08x, Codepage ID: 0x%08x\n",
118  major, minor);
119 
120  major = minor = 0;
121  hr = pGetVersionFromFile("advpack.dll", &major, &minor, TRUE);
122  ok (hr == S_OK, "GetVersionFromFileEx(advpack.dll) failed, returned "
123  "0x%08x\n", hr);
124  trace("advpack.dll version: %d.%d.%d.%d\n", HIWORD(major), LOWORD(major),
125  HIWORD(minor), LOWORD(minor));
126 }
#define TRUE
Definition: types.h:120
HRESULT hr
Definition: shlfolder.c:183
#define trace
Definition: atltest.h:70
LONG HRESULT
Definition: typedefs.h:77
unsigned long DWORD
Definition: ntddk_ex.h:95
#define S_OK
Definition: intsafe.h:59
#define major(rdev)
Definition: propsheet.cpp:879
#define ok(value,...)
Definition: atltest.h:57
#define HIWORD(l)
Definition: typedefs.h:246
#define minor(rdev)
Definition: propsheet.cpp:880
#define LOWORD(l)
Definition: pedump.c:82

Referenced by START_TEST().

Variable Documentation

◆ APP_PATH

CHAR APP_PATH[MAX_PATH]
static

Definition at line 50 of file advpack.c.

Referenced by get_progfiles_dir(), translateinfstring_test(), and translateinfstringex_test().

◆ APP_PATH_LEN

DWORD APP_PATH_LEN
static

Definition at line 51 of file advpack.c.

Referenced by get_progfiles_dir(), translateinfstring_test(), and translateinfstringex_test().

◆ BOOL

Definition at line 41 of file advpack.c.

◆ DWORD

Definition at line 40 of file advpack.c.

Referenced by check_reg_dword().

◆ hAdvPack

HMODULE hAdvPack
static

Definition at line 38 of file advpack.c.

Referenced by init_function_pointers(), and START_TEST().

◆ inf_file

Definition at line 47 of file advpack.c.

◆ LPCSTR

Definition at line 44 of file advpack.c.

◆ LPDWORD

Definition at line 41 of file advpack.c.

◆ LPSTR

Definition at line 44 of file advpack.c.

◆ LPVOID

Definition at line 44 of file advpack.c.

◆ PCSTR

Definition at line 42 of file advpack.c.

◆ PDWORD

Definition at line 45 of file advpack.c.

◆ PROG_FILES

CHAR PROG_FILES[MAX_PATH]
static

Definition at line 49 of file advpack.c.

Referenced by create_inf_file(), and get_progfiles_dir().

◆ PROG_FILES_ROOT

CHAR PROG_FILES_ROOT[MAX_PATH]
static

Definition at line 48 of file advpack.c.

Referenced by get_progfiles_dir(), and translateinfstringex_test().

◆ PSTR

Definition at line 45 of file advpack.c.

◆ PVOID

Definition at line 42 of file advpack.c.