37#ifndef PRF_VERIFYEXISTS
38 #define PRF_VERIFYEXISTS 0x01
39 #define PRF_EXECUTABLE 0x02
40 #define PRF_TRYPROGRAMEXTENSIONS (PRF_EXECUTABLE | PRF_VERIFYEXISTS)
41 #define PRF_FIRSTDIRDEF 0x04
42 #define PRF_DONTFINDLNK 0x08
44#ifndef PRF_REQUIREABSOLUTE
45 #define PRF_REQUIREABSOLUTE 0x10
50#define FLAGS1 PRF_VERIFYEXISTS
51#define FLAGS2 PRF_EXECUTABLE
52#define FLAGS3 PRF_TRYPROGRAMEXTENSIONS
53#define FLAGS4 (PRF_FIRSTDIRDEF | PRF_VERIFYEXISTS)
54#define FLAGS5 (PRF_FIRSTDIRDEF | PRF_EXECUTABLE)
55#define FLAGS6 (PRF_FIRSTDIRDEF | PRF_TRYPROGRAMEXTENSIONS)
56#define FLAGS7 (PRF_REQUIREABSOLUTE | PRF_VERIFYEXISTS)
57#define FLAGS8 (PRF_REQUIREABSOLUTE | PRF_EXECUTABLE)
58#define FLAGS9 (PRF_REQUIREABSOLUTE | PRF_TRYPROGRAMEXTENSIONS)
59#define FLAGS10 (PRF_REQUIREABSOLUTE | PRF_FIRSTDIRDEF | PRF_VERIFYEXISTS)
60#define FLAGS11 (PRF_REQUIREABSOLUTE | PRF_FIRSTDIRDEF | PRF_EXECUTABLE)
61#define FLAGS12 (PRF_REQUIREABSOLUTE | PRF_FIRSTDIRDEF | PRF_TRYPROGRAMEXTENSIONS)
62#define FLAGS13 0xFFFFFFFF
78#define EF_FULLPATH 0x01
79#define EF_TESTDATA 0x02
80#define EF_TYPE_MASK 0x0F
81#define EF_NAME_ONLY 0x10
82#define EF_APP_PATH 0x20
84#define RET_IGNORE 0x00BEF00D
87#define ERR_NO_CHANGE 0xBEEF
88#define ERR_DEAD 0xDEAD
89#define ERR_IGNORE 0x7F7F7F7F
589 CLSCTX_INPROC_SERVER, IID_IShellLinkW, (
LPVOID*)&psl);
592 psl->SetPath(pszTargetPathName);
596 hres = ppf->Save(pszLnkFileName,
TRUE);
616 wcscpy(
Buffer,
L"Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\");
622 trace(
"Section %d, Line %d: Could not create test key. Status: %lu\n",
629 trace(
"Section %d, Line %d: Could not set value of the test key. Status: %lu\n",
643 wcscpy(
Buffer,
L"Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\");
648 trace(
"Section %d, Line %d: Could not remove the test key. Status: %lu\n",
662 ZeroMemory(PathExpected,
sizeof(PathExpected));
711 skip(
"Section %d, Line %d: CreateRegAppPath failure\n", SectionNumber,
LineNumber);
739 "Section %d, Line %d: DeleteRegAppPath failed\n", SectionNumber,
LineNumber);
744 ok(Ret ==
pEntry->Ret,
"Section %d, Line %d: Ret expected %d, was %d.\n",
750 ok(
Error ==
pEntry->Error,
"Section %d, Line %d: last error expected %ld, was %ld.\n",
762 ok(
lstrcmpW(
Path, PathExpected) == 0,
"Section %d, Line %d: Path expected %s, was %s.\n",
771 WCHAR Saved[128], *pPathExtSaved;
778 pPathExtSaved = Saved;
780 pPathExtSaved =
NULL;
798 skip(
"SetEnvironmentVariableW failed\n");
811 skip(
"SetEnvironmentVariableW failed\n");
824 skip(
"SetEnvironmentVariableW failed\n");
843 skip(
"GetModuleFileName and/or wcsrchr are insane.\n");
852 skip(
"testdir is not found.\n");
887 "CreateShortcut(%s, %s) failed.\n",
894 skip(
"Unable to load shell32.\n");
902 skip(
"Unable to get PathResolve address.\n");
910 skip(
"Unable to get IsLFNDriveW address.\n");
static WCHAR s_LinkTarget[MAX_PATH]
static const TEST_ENTRY s_LFNEntries[]
static void TestMain_PathResolve(void)
static WCHAR s_LinkTargetWithBackslash[MAX_PATH]
static void DoEntry(INT SectionNumber, INT LineNumber, const TEST_ENTRY *pEntry)
static ISLFNDRIVEW s_pIsLFNDriveW
struct tagTEST_ENTRY * PTEST_ENTRY
static BOOL DeleteRegAppPath(INT SectionNumber, INT LineNumber, const WCHAR *Name)
static WCHAR s_LinkTargetDoubleBackslash[MAX_PATH]
BOOL(WINAPI * ISLFNDRIVEW)(LPCWSTR)
struct tagTEST_ENTRY TEST_ENTRY
int(WINAPI * PATHRESOLVE)(LPWSTR, LPWSTR *, UINT)
static BOOL CreateShortcut(LPCWSTR pszLnkFileName, LPCWSTR pszTargetPathName)
static PATHRESOLVE s_pPathResolve
static WCHAR s_TestDirWithBackslash[MAX_PATH]
static WCHAR s_ShortcutLongName[MAX_PATH]
static LPWSTR s_DirsWithBackslash[2]
static HINSTANCE s_hShell32
static WCHAR s_TestDir[MAX_PATH]
static BOOL CreateRegAppPath(INT SectionNumber, INT LineNumber, const WCHAR *Name, const WCHAR *Value)
PRTL_UNICODE_STRING_BUFFER Path
ACPI_BUFFER *RetBuffer ACPI_BUFFER *RetBuffer char ACPI_WALK_RESOURCE_CALLBACK void *Context ACPI_BUFFER *RetBuffer UINT16 ACPI_RESOURCE **ResourcePtr ACPI_GENERIC_ADDRESS *Reg UINT32 *ReturnValue UINT8 UINT8 *Slp_TypB ACPI_PHYSICAL_ADDRESS PhysicalAddress64 UINT32 UINT32 *TimeElapsed UINT32 LineNumber
#define RegCloseKey(hKey)
LONG WINAPI RegCreateKeyExW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey, _In_ DWORD Reserved, _In_opt_ LPWSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_opt_ LPDWORD lpdwDisposition)
LONG WINAPI RegDeleteKeyW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey)
LONG WINAPI RegSetValueW(HKEY hKeyOriginal, LPCWSTR lpSubKey, DWORD dwType, LPCWSTR lpData, DWORD cbData)
#define GetEnvironmentVariableW(x, y, z)
#define GetProcAddress(x, y)
BOOL WINAPI DECLSPEC_HOTPATCH SetEnvironmentVariableW(IN LPCWSTR lpName, IN LPCWSTR lpValue)
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
BOOL WINAPI CreateDirectoryW(IN LPCWSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
BOOL WINAPI RemoveDirectoryW(IN LPCWSTR lpPathName)
DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName)
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
BOOL WINAPI PathStripToRootW(LPWSTR lpszPath)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
static const WCHAR Cleanup[]
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
#define EXCEPTION_EXECUTE_HANDLER
_Check_return_ _CRTIMP FILE *__cdecl _wfopen(_In_z_ const wchar_t *_Filename, _In_z_ const wchar_t *_Mode)
_Check_return_opt_ _CRTIMP int __cdecl fclose(_Inout_ FILE *_File)
nsresult QueryInterface(nsIIDRef riid, void **result)
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
#define ERROR_FILE_NOT_FOUND
_In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _Reserved_ ULONG _In_opt_ PUNICODE_STRING _In_ ULONG _Out_opt_ PULONG Disposition
const GUID IID_IPersistFile
#define _SEH2_EXCEPT(...)
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
_CRTIMP wchar_t *__cdecl wcscat(_Inout_updates_z_(_String_length_(_Dest)+_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
#define INVALID_FILE_ATTRIBUTES
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
DWORD WINAPI GetLastError(void)
_In_ UINT _In_ UINT cEntries
#define HKEY_LOCAL_MACHINE
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO