ReactOS 0.4.16-dev-237-gd6eebaa
vista.c
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS system libraries
4 * PURPOSE: Vista functions
5 * PROGRAMMER: Thomas Weidenmueller <w3seek@reactos.com>
6 */
7
8/* INCLUDES *******************************************************************/
9
10#include <k32_vista.h>
11
12#if _WIN32_WINNT != _WIN32_WINNT_VISTA
13#error "This file must be compiled with _WIN32_WINNT == _WIN32_WINNT_VISTA"
14#endif
15
16// This is defined only in ntifs.h
17#define REPARSE_DATA_BUFFER_HEADER_SIZE FIELD_OFFSET(REPARSE_DATA_BUFFER, GenericReparseBuffer)
18
19#define NDEBUG
20#include <debug.h>
21
22/* PUBLIC FUNCTIONS ***********************************************************/
23
24/*
25 * @implemented
26 */
27BOOL
32 PDWORD pdwSize)
33{
34 BYTE Buffer[sizeof(UNICODE_STRING) + MAX_PATH * sizeof(WCHAR)];
38 DWORD Needed;
39
42 Buffer,
43 sizeof(Buffer) - sizeof(WCHAR),
44 &Needed);
46 {
47 DynamicBuffer = RtlAllocateHeap(RtlGetProcessHeap(), 0, Needed + sizeof(WCHAR));
48 if (!DynamicBuffer)
49 {
51 return FALSE;
52 }
53
57 Needed,
58 &Needed);
60 }
62
63 if (!NT_SUCCESS(Status)) goto Cleanup;
64
65 if (Result->Length / sizeof(WCHAR) + 1 > *pdwSize)
66 {
68 goto Cleanup;
69 }
70
71 *pdwSize = Result->Length / sizeof(WCHAR);
72 memcpy(lpExeName, Result->Buffer, Result->Length);
73 lpExeName[*pdwSize] = 0;
74
76 RtlFreeHeap(RtlGetProcessHeap(), 0, DynamicBuffer);
77
78 if (!NT_SUCCESS(Status))
79 {
81 }
82
83 return !Status;
84}
85
86
87/*
88 * @implemented
89 */
90BOOL
95 PDWORD pdwSize)
96{
97 DWORD pdwSizeW = *pdwSize;
99 LPWSTR lpExeNameW;
100
101 lpExeNameW = RtlAllocateHeap(RtlGetProcessHeap(),
103 *pdwSize * sizeof(WCHAR));
104 if (!lpExeNameW)
105 {
107 return FALSE;
108 }
109
110 Result = QueryFullProcessImageNameW(hProcess, dwFlags, lpExeNameW, &pdwSizeW);
111
112 if (Result)
114 lpExeNameW,
115 -1,
116 lpExeName,
117 *pdwSize,
118 NULL, NULL));
119
120 if (Result)
121 *pdwSize = strlen(lpExeName);
122
123 RtlFreeHeap(RtlGetProcessHeap(), 0, lpExeNameW);
124 return Result;
125}
126
127
128/*
129 * @unimplemented
130 */
132WINAPI
134 OUT APPLICATION_RECOVERY_CALLBACK* pRecoveryCallback,
135 OUT PVOID* ppvParameter,
136 PDWORD dwPingInterval,
138{
140 return E_FAIL;
141}
142
143
144/*
145 * @unimplemented
146 */
148WINAPI
150 OUT PWSTR pwzCommandline OPTIONAL,
151 IN OUT PDWORD pcchSize,
152 OUT PDWORD pdwFlags OPTIONAL)
153{
155 return E_FAIL;
156}
157
158
159/*
160 * @unimplemented
161 */
162VOID
163WINAPI
165{
167}
168
169
170/*
171 * @unimplemented
172 */
174WINAPI
176{
178 return E_FAIL;
179}
180
181
182/*
183 * @unimplemented
184 */
186WINAPI
187RegisterApplicationRecoveryCallback(IN APPLICATION_RECOVERY_CALLBACK pRecoveryCallback,
188 IN PVOID pvParameter OPTIONAL,
189 DWORD dwPingInterval,
191{
193 return E_FAIL;
194}
195
196
197/*
198 * @unimplemented
199 */
201WINAPI
204{
206 return E_FAIL;
207}
208
209
210/*
211 * @implemented
212 */
214WINAPI
216 IN LPCWSTR lpTargetFileName,
218{
221 HANDLE hSymlink = NULL;
222 UNICODE_STRING SymlinkFileName = { 0, 0, NULL };
223 UNICODE_STRING TargetFileName = { 0, 0, NULL };
224 BOOLEAN bAllocatedTarget = FALSE, bRelativePath = FALSE;
225 LPWSTR lpTargetFullFileName = NULL;
226 SIZE_T cbPrintName;
227 SIZE_T cbReparseData;
228 PREPARSE_DATA_BUFFER pReparseData = NULL;
229 PBYTE pBufTail;
231 ULONG dwCreateOptions;
232 DWORD dwErr;
233
234 if(!lpSymlinkFileName || !lpTargetFileName || (dwFlags | SYMBOLIC_LINK_FLAG_DIRECTORY) != SYMBOLIC_LINK_FLAG_DIRECTORY)
235 {
237 return FALSE;
238 }
239
240 if(dwFlags & SYMBOLIC_LINK_FLAG_DIRECTORY)
241 dwCreateOptions = FILE_DIRECTORY_FILE;
242 else
243 dwCreateOptions = FILE_NON_DIRECTORY_FILE;
244
245 switch(RtlDetermineDosPathNameType_U(lpTargetFileName))
246 {
250 bRelativePath = TRUE;
251 RtlInitUnicodeString(&TargetFileName, lpTargetFileName);
252 break;
253
255 {
256 LPWSTR FilePart;
257 SIZE_T cchTargetFullFileName;
258
259 cchTargetFullFileName = GetFullPathNameW(lpTargetFileName, 0, NULL, &FilePart);
260
261 if(cchTargetFullFileName == 0)
262 {
264 goto Cleanup;
265 }
266
267 lpTargetFullFileName = RtlAllocateHeap(RtlGetProcessHeap(), 0, cchTargetFullFileName * sizeof(WCHAR));
268
269 if(lpTargetFullFileName == NULL)
270 {
272 goto Cleanup;
273 }
274
275 if(GetFullPathNameW(lpTargetFileName, cchTargetFullFileName, lpTargetFullFileName, &FilePart) == 0)
276 {
278 goto Cleanup;
279 }
280 }
281
282 lpTargetFileName = lpTargetFullFileName;
283
284 // fallthrough
285
290 default:
291 if(!RtlDosPathNameToNtPathName_U(lpTargetFileName, &TargetFileName, NULL, NULL))
292 {
293 bAllocatedTarget = TRUE;
295 goto Cleanup;
296 }
297 }
298
299 cbPrintName = wcslen(lpTargetFileName) * sizeof(WCHAR);
300 cbReparseData = FIELD_OFFSET(REPARSE_DATA_BUFFER, SymbolicLinkReparseBuffer.PathBuffer) + TargetFileName.Length + cbPrintName;
301 pReparseData = RtlAllocateHeap(RtlGetProcessHeap(), 0, cbReparseData);
302
303 if(pReparseData == NULL)
304 {
306 goto Cleanup;
307 }
308
309 pBufTail = (PBYTE)(pReparseData->SymbolicLinkReparseBuffer.PathBuffer);
310
311 pReparseData->ReparseTag = (ULONG)IO_REPARSE_TAG_SYMLINK;
312 pReparseData->ReparseDataLength = (USHORT)cbReparseData - REPARSE_DATA_BUFFER_HEADER_SIZE;
313 pReparseData->Reserved = 0;
314
315 pReparseData->SymbolicLinkReparseBuffer.SubstituteNameOffset = 0;
316 pReparseData->SymbolicLinkReparseBuffer.SubstituteNameLength = TargetFileName.Length;
317 pBufTail += pReparseData->SymbolicLinkReparseBuffer.SubstituteNameOffset;
318 RtlCopyMemory(pBufTail, TargetFileName.Buffer, TargetFileName.Length);
319
320 pReparseData->SymbolicLinkReparseBuffer.PrintNameOffset = pReparseData->SymbolicLinkReparseBuffer.SubstituteNameLength;
321 pReparseData->SymbolicLinkReparseBuffer.PrintNameLength = (USHORT)cbPrintName;
322 pBufTail += pReparseData->SymbolicLinkReparseBuffer.PrintNameOffset;
323 RtlCopyMemory(pBufTail, lpTargetFileName, cbPrintName);
324
325 pReparseData->SymbolicLinkReparseBuffer.Flags = 0;
326
327 if(bRelativePath)
328 pReparseData->SymbolicLinkReparseBuffer.Flags |= 1; // TODO! give this lone flag a name
329
330 if(!RtlDosPathNameToNtPathName_U(lpSymlinkFileName, &SymlinkFileName, NULL, NULL))
331 {
333 goto Cleanup;
334 }
335
337
339 (
340 &hSymlink,
344 NULL,
346 0,
349 NULL,
350 0
351 );
352
353 if(!NT_SUCCESS(Status))
354 {
356 goto Cleanup;
357 }
358
360 (
361 hSymlink,
362 NULL,
363 NULL,
364 NULL,
367 pReparseData,
368 cbReparseData,
369 NULL,
370 0
371 );
372
373 if(!NT_SUCCESS(Status))
374 {
376 DispInfo.DeleteFile = TRUE;
377 NtSetInformationFile(hSymlink, &IoStatusBlock, &DispInfo, sizeof(DispInfo), FileDispositionInformation);
378
380 goto Cleanup;
381 }
382
383 dwErr = NO_ERROR;
384
385Cleanup:
386 if(hSymlink)
387 NtClose(hSymlink);
388
389 RtlFreeUnicodeString(&SymlinkFileName);
390 if (bAllocatedTarget)
391 {
392 RtlFreeHeap(RtlGetProcessHeap(),
393 0,
394 TargetFileName.Buffer);
395 }
396
397 if(lpTargetFullFileName)
398 RtlFreeHeap(RtlGetProcessHeap(), 0, lpTargetFullFileName);
399
400 if(pReparseData)
401 RtlFreeHeap(RtlGetProcessHeap(), 0, pReparseData);
402
403 if(dwErr)
404 {
406 return FALSE;
407 }
408
409 return TRUE;
410}
411
412
413/*
414 * @implemented
415 */
417NTAPI
418CreateSymbolicLinkA(IN LPCSTR lpSymlinkFileName,
419 IN LPCSTR lpTargetFileName,
421{
422 PWCHAR SymlinkW, TargetW;
423 BOOLEAN Ret;
424
425 if(!lpSymlinkFileName || !lpTargetFileName)
426 {
428 return FALSE;
429 }
430
431 if (!(SymlinkW = FilenameA2W(lpSymlinkFileName, FALSE)))
432 return FALSE;
433
434 if (!(TargetW = FilenameA2W(lpTargetFileName, TRUE)))
435 return FALSE;
436
437 Ret = CreateSymbolicLinkW(SymlinkW,
438 TargetW,
439 dwFlags);
440
441 RtlFreeHeap(RtlGetProcessHeap(), 0, SymlinkW);
442 RtlFreeHeap(RtlGetProcessHeap(), 0, TargetW);
443
444 return Ret;
445}
446
447
448/*
449 * @unimplemented
450 */
451DWORD
452WINAPI
454 OUT LPWSTR lpszFilePath,
455 IN DWORD cchFilePath,
457{
458 if (dwFlags & ~(VOLUME_NAME_DOS | VOLUME_NAME_GUID | VOLUME_NAME_NT |
459 VOLUME_NAME_NONE | FILE_NAME_NORMALIZED | FILE_NAME_OPENED))
460 {
462 return 0;
463 }
464
466 return 0;
467}
468
469
470/*
471 * @implemented
472 */
473DWORD
474WINAPI
476 OUT LPSTR lpszFilePath,
477 IN DWORD cchFilePath,
479{
480 WCHAR FilePathW[MAX_PATH];
481 UNICODE_STRING FilePathU;
482 DWORD PrevLastError;
483 DWORD Ret = 0;
484
485 if (cchFilePath != 0 &&
486 cchFilePath > sizeof(FilePathW) / sizeof(FilePathW[0]))
487 {
488 FilePathU.Length = 0;
489 FilePathU.MaximumLength = (USHORT)cchFilePath * sizeof(WCHAR);
490 FilePathU.Buffer = RtlAllocateHeap(RtlGetProcessHeap(),
491 0,
492 FilePathU.MaximumLength);
493 if (FilePathU.Buffer == NULL)
494 {
496 return 0;
497 }
498 }
499 else
500 {
501 FilePathU.Length = 0;
502 FilePathU.MaximumLength = sizeof(FilePathW);
503 FilePathU.Buffer = FilePathW;
504 }
505
506 /* save the last error code */
507 PrevLastError = GetLastError();
509
510 /* call the unicode version that does all the work */
512 FilePathU.Buffer,
513 cchFilePath,
514 dwFlags);
515
517 {
518 /* no error, restore the last error code and convert the string */
519 SetLastError(PrevLastError);
520
521 Ret = FilenameU2A_FitOrFail(lpszFilePath,
522 cchFilePath,
523 &FilePathU);
524 }
525
526 /* free allocated memory if necessary */
527 if (FilePathU.Buffer != FilePathW)
528 {
529 RtlFreeHeap(RtlGetProcessHeap(),
530 0,
531 FilePathU.Buffer);
532 }
533
534 return Ret;
535}
536
537
538/*
539 * @unimplemented
540 */
541BOOL
542WINAPI
544 IN DWORD nPeriodMilliseconds,
545 IN DWORD nBytesPerPeriod,
546 IN BOOL bDiscardable,
547 OUT LPDWORD lpTransferSize,
548 OUT LPDWORD lpNumOutstandingRequests)
549{
551 return FALSE;
552}
553
554
555/*
556 * @unimplemented
557 */
558BOOL
559WINAPI
561 OUT LPDWORD lpPeriodMilliseconds,
562 OUT LPDWORD lpBytesPerPeriod,
563 OUT LPBOOL pDiscardable,
564 OUT LPDWORD lpTransferSize,
565 OUT LPDWORD lpNumOutstandingRequests)
566{
568 return FALSE;
569}
570
571
572/*
573 * @unimplemented
574 */
575HANDLE
576WINAPI
578 IN LPFILE_ID_DESCRIPTOR lpFileID,
579 IN DWORD dwDesiredAccess,
580 IN DWORD dwShareMode,
581 IN LPSECURITY_ATTRIBUTES lpSecurityAttributes OPTIONAL,
583{
586}
587
588
589
590/*
591 Vista+ MUI support functions
592
593 References:
594 Evolution of MUI Support across Windows Versions: http://msdn.microsoft.com/en-US/library/ee264317.aspx
595 Comparing Windows XP Professional Multilingual Options: http://technet.microsoft.com/en-us/library/bb457045.aspx
596
597 More info:
598 http://msdn.microsoft.com/en-us/goglobal/bb978454.aspx
599 http://msdn.microsoft.com/en-us/library/dd319074.aspx
600*/
601
602/* FUNCTIONS *****************************************************************/
603
604BOOL
605WINAPI
608 PCWSTR pcwszFilePath,
609 PFILEMUIINFO pFileMUIInfo,
610 DWORD *pcbFileMUIInfo)
611{
612 DPRINT1("%x %p %p %p\n", dwFlags, pcwszFilePath, pFileMUIInfo, pcbFileMUIInfo);
614 return FALSE;
615}
616
617/*
618 * @unimplemented
619 */
620BOOL
621WINAPI
624 PCWSTR pcwszFilePath,
625 PWSTR pwszLanguage,
626 PULONG pcchLanguage,
627 PWSTR pwszFileMUIPath,
628 PULONG pcchFileMUIPath,
629 PULONGLONG pululEnumerator)
630{
631 DPRINT1("%x %p %p %p %p %p\n", dwFlags, pcwszFilePath, pwszLanguage, pwszFileMUIPath, pcchFileMUIPath, pululEnumerator);
633 return FALSE;
634}
635
636/*
637 * @unimplemented
638 */
639#if 0 // This is Windows 7+
640BOOL
641WINAPI
642GetProcessPreferredUILanguages(
644 PULONG pulNumLanguages,
645 PZZWSTR pwszLanguagesBuffer,
646 PULONG pcchLanguagesBuffer)
647{
648 DPRINT1("%x %p %p %p\n", dwFlags, pulNumLanguages, pwszLanguagesBuffer, pcchLanguagesBuffer);
650 return FALSE;
651}
652#endif
653
654/*
655* @unimplemented
656*/
657BOOL
658WINAPI
661 PULONG pulNumLanguages,
662 PZZWSTR pwszLanguagesBuffer,
663 PULONG pcchLanguagesBuffer)
664{
665 DPRINT1("%x %p %p %p\n", dwFlags, pulNumLanguages, pwszLanguagesBuffer, pcchLanguagesBuffer);
667 return FALSE;
668}
669
670/*
671 * @unimplemented
672 */
673BOOL
674WINAPI
677 PULONG pulNumLanguages,
678 PZZWSTR pwszLanguagesBuffer,
679 PULONG pcchLanguagesBuffer)
680{
681 DPRINT1("%x %p %p %p\n", dwFlags, pulNumLanguages, pwszLanguagesBuffer, pcchLanguagesBuffer);
683 return FALSE;
684}
685
686/*
687 * @unimplemented
688 */
689LANGID
690WINAPI
692{
695 return 0;
696}
697
698/*
699 * @unimplemented
700 */
701BOOL
702WINAPI
705 PCZZWSTR pwmszLanguage,
706 PZZWSTR pwszFallbackLanguages,
707 PDWORD pcchFallbackLanguages,
708 PDWORD pdwAttributes)
709{
710 DPRINT1("%x %p %p %p %p\n", dwFlags, pwmszLanguage, pwszFallbackLanguages, pcchFallbackLanguages, pdwAttributes);
712 return FALSE;
713}
714
715
716/*
717 * @unimplemented
718 */
719BOOL
720WINAPI
723 PULONG pulNumLanguages,
724 PZZWSTR pwszLanguagesBuffer,
725 PULONG pcchLanguagesBuffer)
726{
727 DPRINT1("%x %p %p %p\n", dwFlags, pulNumLanguages, pwszLanguagesBuffer, pcchLanguagesBuffer);
729 return FALSE;
730}
731
732/*
733 * @unimplemented
734 */
735#if 0 // Tis is Windows 7+
736BOOL
737WINAPI
738SetProcessPreferredUILanguages(
740 PCZZWSTR pwszLanguagesBuffer,
741 PULONG pulNumLanguages)
742{
743 DPRINT1("%x %p %p\n", dwFlags, pwszLanguagesBuffer, pulNumLanguages);
745 return FALSE;
746}
747#endif
748
749/*
750 * @unimplemented
751 */
752BOOL
753WINAPI
756 PCZZWSTR pwszLanguagesBuffer,
757 PULONG pulNumLanguages
758 )
759{
760 DPRINT1("%x %p %p\n", dwFlags, pwszLanguagesBuffer, pulNumLanguages);
762 return FALSE;
763}
764
unsigned char BOOLEAN
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
LONG NTSTATUS
Definition: precomp.h:26
#define FILE_DIRECTORY_FILE
Definition: constants.h:491
#define FILE_NON_DIRECTORY_FILE
Definition: constants.h:492
#define DPRINT1
Definition: precomp.h:8
DWORD dwErr
Definition: service.c:36
#define UNIMPLEMENTED
Definition: ntoskrnl.c:15
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
Definition: heap.c:590
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
Definition: heap.c:608
Definition: bufpool.h:45
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:36
#define STATUS_NO_MEMORY
Definition: d3dkmdt.h:51
#define ERROR_NOT_ENOUGH_MEMORY
Definition: dderror.h:7
#define NO_ERROR
Definition: dderror.h:5
#define E_FAIL
Definition: ddrawi.h:102
#define ERROR_SUCCESS
Definition: deptool.c:10
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:102
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define CP_ACP
Definition: compat.h:109
#define SetLastError(x)
Definition: compat.h:752
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define MAX_PATH
Definition: compat.h:34
#define FILE_ATTRIBUTE_NORMAL
Definition: compat.h:137
#define WideCharToMultiByte
Definition: compat.h:111
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
PWCHAR FilenameA2W(LPCSTR NameA, BOOL alloc)
Definition: fileutils.c:18
DWORD FilenameU2A_FitOrFail(LPSTR DestA, INT destLen, PUNICODE_STRING SourceU)
Definition: fileutils.c:56
DWORD WINAPI GetFullPathNameW(IN LPCWSTR lpFileName, IN DWORD nBufferLength, OUT LPWSTR lpBuffer, OUT LPWSTR *lpFilePart)
Definition: path.c:1106
static const WCHAR Cleanup[]
Definition: register.c:80
static BOOLEAN bSuccess
Definition: drive.cpp:477
UNICODE_STRING * PUNICODE_STRING
Definition: env_spec_w32.h:373
struct _UNICODE_STRING UNICODE_STRING
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
@ FileDispositionInformation
Definition: from_kernel.h:74
#define FILE_CREATE
Definition: from_kernel.h:55
#define FILE_OPEN_REPARSE_POINT
Definition: from_kernel.h:46
#define FILE_SYNCHRONOUS_IO_NONALERT
Definition: from_kernel.h:31
Status
Definition: gdiplustypes.h:25
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define OBJ_CASE_INSENSITIVE
Definition: winternl.h:228
@ ProcessImageFileName
Definition: winternl.h:397
NTSYSAPI ULONG WINAPI RtlNtStatusToDosError(NTSTATUS)
HRESULT WINAPI RegisterApplicationRecoveryCallback(IN APPLICATION_RECOVERY_CALLBACK pRecoveryCallback, IN PVOID pvParameter OPTIONAL, DWORD dwPingInterval, DWORD dwFlags)
Definition: vista.c:187
BOOL WINAPI QueryFullProcessImageNameA(HANDLE hProcess, DWORD dwFlags, LPSTR lpExeName, PDWORD pdwSize)
Definition: vista.c:92
HANDLE WINAPI OpenFileById(IN HANDLE hFile, IN LPFILE_ID_DESCRIPTOR lpFileID, IN DWORD dwDesiredAccess, IN DWORD dwShareMode, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes OPTIONAL, IN DWORD dwFlags)
Definition: vista.c:577
BOOLEAN WINAPI CreateSymbolicLinkW(IN LPCWSTR lpSymlinkFileName, IN LPCWSTR lpTargetFileName, IN DWORD dwFlags)
Definition: vista.c:215
BOOL WINAPI SetFileBandwidthReservation(IN HANDLE hFile, IN DWORD nPeriodMilliseconds, IN DWORD nBytesPerPeriod, IN BOOL bDiscardable, OUT LPDWORD lpTransferSize, OUT LPDWORD lpNumOutstandingRequests)
Definition: vista.c:543
HRESULT WINAPI RegisterApplicationRestart(IN PCWSTR pwzCommandline OPTIONAL, IN DWORD dwFlags)
Definition: vista.c:202
HRESULT WINAPI GetApplicationRestart(IN HANDLE hProcess, OUT PWSTR pwzCommandline OPTIONAL, IN OUT PDWORD pcchSize, OUT PDWORD pdwFlags OPTIONAL)
Definition: vista.c:149
BOOL WINAPI GetUserPreferredUILanguages(DWORD dwFlags, PULONG pulNumLanguages, PZZWSTR pwszLanguagesBuffer, PULONG pcchLanguagesBuffer)
Definition: vista.c:721
BOOL WINAPI GetThreadPreferredUILanguages(DWORD dwFlags, PULONG pulNumLanguages, PZZWSTR pwszLanguagesBuffer, PULONG pcchLanguagesBuffer)
Definition: vista.c:675
BOOL WINAPI GetSystemPreferredUILanguages(DWORD dwFlags, PULONG pulNumLanguages, PZZWSTR pwszLanguagesBuffer, PULONG pcchLanguagesBuffer)
Definition: vista.c:659
BOOL WINAPI GetFileMUIPath(DWORD dwFlags, PCWSTR pcwszFilePath, PWSTR pwszLanguage, PULONG pcchLanguage, PWSTR pwszFileMUIPath, PULONG pcchFileMUIPath, PULONGLONG pululEnumerator)
Definition: vista.c:622
BOOL WINAPI SetThreadPreferredUILanguages(DWORD dwFlags, PCZZWSTR pwszLanguagesBuffer, PULONG pulNumLanguages)
Definition: vista.c:754
BOOL WINAPI GetUILanguageInfo(DWORD dwFlags, PCZZWSTR pwmszLanguage, PZZWSTR pwszFallbackLanguages, PDWORD pcchFallbackLanguages, PDWORD pdwAttributes)
Definition: vista.c:703
DWORD WINAPI GetFinalPathNameByHandleW(IN HANDLE hFile, OUT LPWSTR lpszFilePath, IN DWORD cchFilePath, IN DWORD dwFlags)
Definition: vista.c:453
HRESULT WINAPI GetApplicationRecoveryCallback(IN HANDLE hProcess, OUT APPLICATION_RECOVERY_CALLBACK *pRecoveryCallback, OUT PVOID *ppvParameter, PDWORD dwPingInterval, PDWORD dwFlags)
Definition: vista.c:133
BOOL WINAPI GetFileMUIInfo(DWORD dwFlags, PCWSTR pcwszFilePath, PFILEMUIINFO pFileMUIInfo, DWORD *pcbFileMUIInfo)
Definition: vista.c:606
LANGID WINAPI GetThreadUILanguage(VOID)
Definition: vista.c:691
VOID WINAPI ApplicationRecoveryFinished(IN BOOL bSuccess)
Definition: vista.c:164
BOOLEAN NTAPI CreateSymbolicLinkA(IN LPCSTR lpSymlinkFileName, IN LPCSTR lpTargetFileName, IN DWORD dwFlags)
Definition: vista.c:418
BOOL WINAPI GetFileBandwidthReservation(IN HANDLE hFile, OUT LPDWORD lpPeriodMilliseconds, OUT LPDWORD lpBytesPerPeriod, OUT LPBOOL pDiscardable, OUT LPDWORD lpTransferSize, OUT LPDWORD lpNumOutstandingRequests)
Definition: vista.c:560
BOOL WINAPI QueryFullProcessImageNameW(HANDLE hProcess, DWORD dwFlags, LPWSTR lpExeName, PDWORD pdwSize)
Definition: vista.c:29
#define REPARSE_DATA_BUFFER_HEADER_SIZE
Definition: vista.c:17
DWORD WINAPI GetFinalPathNameByHandleA(IN HANDLE hFile, OUT LPSTR lpszFilePath, IN DWORD cchFilePath, IN DWORD dwFlags)
Definition: vista.c:475
HRESULT WINAPI ApplicationRecoveryInProgress(OUT PBOOL pbCancelled)
Definition: vista.c:175
USHORT LANGID
Definition: mui.h:9
_In_ BOOL _In_ HANDLE hProcess
Definition: mapping.h:71
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
static LPFILE_ID_DESCRIPTOR
Definition: file.c:37
static DWORD LPSTR lpExeName
Definition: process.c:72
static OUT PIO_STATUS_BLOCK IoStatusBlock
Definition: pipe.c:75
#define InitializeObjectAttributes(p, n, a, r, s)
Definition: reg.c:106
_In_ HANDLE hFile
Definition: mswsock.h:90
NTSYSAPI RTL_PATH_TYPE NTAPI RtlDetermineDosPathNameType_U(_In_ PCWSTR Path)
NTSYSAPI BOOLEAN NTAPI RtlDosPathNameToNtPathName_U(_In_opt_z_ PCWSTR DosPathName, _Out_ PUNICODE_STRING NtPathName, _Out_opt_ PCWSTR *NtFileNamePart, _Out_opt_ PRTL_RELATIVE_NAME_U DirectoryInfo)
@ RtlPathTypeRootLocalDevice
Definition: rtltypes.h:478
@ RtlPathTypeDriveRelative
Definition: rtltypes.h:474
@ RtlPathTypeRelative
Definition: rtltypes.h:476
@ RtlPathTypeUncAbsolute
Definition: rtltypes.h:472
@ RtlPathTypeRooted
Definition: rtltypes.h:475
@ RtlPathTypeLocalDevice
Definition: rtltypes.h:477
@ RtlPathTypeDriveAbsolute
Definition: rtltypes.h:473
@ RtlPathTypeUnknown
Definition: rtltypes.h:471
#define SYNCHRONIZE
Definition: nt_native.h:61
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
NTSYSAPI NTSTATUS NTAPI NtSetInformationFile(IN HANDLE hFile, OUT PIO_STATUS_BLOCK pIoStatusBlock, IN PVOID FileInformationBuffer, IN ULONG FileInformationBufferLength, IN FILE_INFORMATION_CLASS FileInfoClass)
Definition: iofunc.c:3096
#define FILE_WRITE_ATTRIBUTES
Definition: nt_native.h:649
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
Definition: obhandle.c:3402
#define DELETE
Definition: nt_native.h:57
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
NTSTATUS NTAPI NtCreateFile(OUT PHANDLE FileHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, OUT PIO_STATUS_BLOCK IoStatusBlock, IN PLARGE_INTEGER AllocationSize OPTIONAL, IN ULONG FileAttributes, IN ULONG ShareAccess, IN ULONG CreateDisposition, IN ULONG CreateOptions, IN PVOID EaBuffer OPTIONAL, IN ULONG EaLength)
NTSYSAPI NTSTATUS NTAPI NtFsControlFile(IN HANDLE hFile, IN HANDLE hEvent OPTIONAL, IN PIO_APC_ROUTINE IoApcRoutine OPTIONAL, IN PVOID IoApcContext OPTIONAL, OUT PIO_STATUS_BLOCK pIoStatusBlock, IN ULONG DeviceIoControlCode, IN PVOID InBuffer OPTIONAL, IN ULONG InBufferLength, OUT PVOID OutBuffer OPTIONAL, IN ULONG OutBufferLength)
__GNU_EXTENSION typedef unsigned __int64 * PULONGLONG
Definition: ntbasedef.h:383
_NullNull_terminated_ WCHAR * PZZWSTR
Definition: ntbasedef.h:420
_NullNull_terminated_ CONST WCHAR * PCZZWSTR
Definition: ntbasedef.h:421
NTSTATUS NTAPI NtQueryInformationProcess(_In_ HANDLE ProcessHandle, _In_ PROCESSINFOCLASS ProcessInformationClass, _Out_ PVOID ProcessInformation, _In_ ULONG ProcessInformationLength, _Out_opt_ PULONG ReturnLength)
Definition: query.c:59
BYTE * PBYTE
Definition: pedump.c:66
DWORD * PDWORD
Definition: pedump.c:68
unsigned short USHORT
Definition: pedump.c:61
#define FSCTL_SET_REPARSE_POINT
Definition: winioctl.h:747
DWORD BaseSetLastNTError(IN NTSTATUS Status)
Definition: reactos.cpp:167
#define STATUS_BUFFER_TOO_SMALL
Definition: shellext.h:69
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
WCHAR PathBuffer[1]
Definition: shellext.h:176
struct _REPARSE_DATA_BUFFER::@312::@314 SymbolicLinkReparseBuffer
USHORT ReparseDataLength
Definition: shellext.h:166
USHORT MaximumLength
Definition: env_spec_w32.h:370
uint16_t * PWSTR
Definition: typedefs.h:56
uint32_t * PULONG
Definition: typedefs.h:59
const uint16_t * PCWSTR
Definition: typedefs.h:57
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
unsigned char * LPBYTE
Definition: typedefs.h:53
#define NTAPI
Definition: typedefs.h:36
ULONG_PTR SIZE_T
Definition: typedefs.h:80
uint32_t * LPDWORD
Definition: typedefs.h:59
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
#define IN
Definition: typedefs.h:39
uint16_t * PWCHAR
Definition: typedefs.h:56
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
#define STATUS_INFO_LENGTH_MISMATCH
Definition: udferr_usr.h:133
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
BOOL * LPBOOL
Definition: windef.h:162
BOOL * PBOOL
Definition: windef.h:161
#define WINAPI
Definition: msvc.h:6
#define ERROR_PATH_NOT_FOUND
Definition: winerror.h:106
_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
Definition: wsk.h:409
#define IO_REPARSE_TAG_SYMLINK
Definition: iotypes.h:7240
const char * LPCSTR
Definition: xmlstorage.h:183
char * LPSTR
Definition: xmlstorage.h:182
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
unsigned char BYTE
Definition: xxhash.c:193