ReactOS 0.4.15-dev-7906-g1b85a5f
libsupp.c
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS NT User-Mode DLL
4 * FILE: lib/ntdll/rtl/libsup.c
5 * PURPOSE: RTL Support Routines
6 * PROGRAMMERS: Alex Ionescu (alex@relsoft.net)
7 * Gunnar Dalsnes
8 */
9
10/* INCLUDES *****************************************************************/
11
12#include <ntdll.h>
13
14#define NDEBUG
15#include <debug.h>
16
20
21/* FUNCTIONS ***************************************************************/
22
26{
27 /* Return the flag in the PEB */
28 return NtCurrentPeb()->BeingDebugged;
29}
30
34{
35 /* Check if it's already set and return TRUE if so */
36 if (NtCurrentTeb()->InDbgPrint) return TRUE;
37
38 /* Set it and return */
39 NtCurrentTeb()->InDbgPrint = TRUE;
40 return FALSE;
41}
42
43VOID
46{
47 /* Clear the flag */
48 NtCurrentTeb()->InDbgPrint = FALSE;
49}
50
54{
55 return UserMode;
56}
57
58/*
59 * @implemented
60 */
61PPEB
64{
65 return NtCurrentPeb();
66}
67
68/*
69 * @implemented
70 */
73{
76}
77
78/*
79 * @implemented
80 */
83{
86}
87
88/*
89* @implemented
90*/
94{
95 PPEB pPeb = NtCurrentPeb();
96 return pPeb->NtGlobalFlag;
97}
98
100NTAPI
102{
103 return RtlDeleteCriticalSection(&Lock->CriticalSection);
104}
105
107NTAPI
109{
111
112 return RtlEnterCriticalSection(&Lock->CriticalSection);
113}
114
116NTAPI
118{
120
121 return RtlTryEnterCriticalSection(&Lock->CriticalSection);
122}
123
125NTAPI
127{
128 return RtlInitializeCriticalSection(&(*Lock)->CriticalSection);
129}
130
132NTAPI
134{
135 return RtlLeaveCriticalSection(&Lock->CriticalSection);
136}
137
138PVOID
139NTAPI
141 ULONG Tag)
142{
144
145 return RtlAllocateHeap(RtlGetProcessHeap(),
146 0,
147 Bytes);
148}
149
150
151VOID
152NTAPI
154 ULONG Tag)
155{
157
158 RtlFreeHeap(RtlGetProcessHeap(),
159 0,
160 Mem);
161}
162
163
164#if DBG
166CHECK_PAGED_CODE_RTL(char *file, int line)
167{
168 /* meaningless in user mode */
169}
170#endif
171
172VOID
173NTAPI
175{
176 PPEB Peb;
177
178 /* Get PEB */
180
181 /* Apply defaults for non-set parameters */
182 if (!Parameters->SegmentCommit) Parameters->SegmentCommit = Peb->HeapSegmentCommit;
183 if (!Parameters->SegmentReserve) Parameters->SegmentReserve = Peb->HeapSegmentReserve;
184 if (!Parameters->DeCommitFreeBlockThreshold) Parameters->DeCommitFreeBlockThreshold = Peb->HeapDeCommitFreeBlockThreshold;
185 if (!Parameters->DeCommitTotalFreeThreshold) Parameters->DeCommitTotalFreeThreshold = Peb->HeapDeCommitTotalFreeThreshold;
186}
187
189NTAPI
191 IN ULONG_PTR RegistrationFrameEnd,
192 IN OUT PULONG_PTR StackLow,
193 IN OUT PULONG_PTR StackHigh)
194{
195 /* There's no such thing as a DPC stack in user-mode */
196 return FALSE;
197}
198
199VOID
200NTAPI
203 IN PVOID ContextData,
204 IN ULONG Size)
205{
206 /* Exception logging is not done in user-mode */
207}
208
210NTAPI
212 IN ULONG_PTR *StackBegin,
213 IN ULONG_PTR *StackEnd)
214{
215 /* FIXME: Verify */
216 *StackBegin = (ULONG_PTR)NtCurrentTeb()->NtTib.StackLimit;
217 *StackEnd = (ULONG_PTR)NtCurrentTeb()->NtTib.StackBase;
218 return TRUE;
219}
220
221#ifndef _M_AMD64
222/*
223 * @implemented
224 */
225ULONG
226NTAPI
228 IN ULONG Count,
229 IN ULONG Flags)
230{
231 ULONG_PTR Stack, NewStack, StackBegin, StackEnd = 0;
232 ULONG Eip;
233 BOOLEAN Result, StopSearch = FALSE;
234 ULONG i = 0;
235
236 /* Get current EBP */
237#if defined(_M_IX86)
238#if defined __GNUC__
239 __asm__("mov %%ebp, %0" : "=r" (Stack) : );
240#elif defined(_MSC_VER)
241 __asm mov Stack, ebp
242#endif
243#elif defined(_M_MIPS)
244 __asm__("move $sp, %0" : "=r" (Stack) : );
245#elif defined(_M_PPC)
246 __asm__("mr %0,1" : "=r" (Stack) : );
247#elif defined(_M_ARM)
248#if defined __GNUC__
249 __asm__("mov sp, %0" : "=r"(Stack) : );
250#elif defined(_MSC_VER)
251 // FIXME: Hack. Probably won't work if this ever actually manages to run someday.
253#endif
254#else
255#error Unknown architecture
256#endif
257
258 /* Set it as the stack begin limit as well */
259 StackBegin = (ULONG_PTR)Stack;
260
261 /* Check if we're called for non-logging mode */
262 if (!Flags)
263 {
264 /* Get the actual safe limits */
266 &StackBegin,
267 &StackEnd);
268 if (!Result) return 0;
269 }
270
271 /* Use a SEH block for maximum protection */
273 {
274 /* Loop the frames */
275 for (i = 0; i < Count; i++)
276 {
277 /*
278 * Leave if we're past the stack,
279 * if we're before the stack,
280 * or if we've reached ourselves.
281 */
282 if ((Stack >= StackEnd) ||
283 (!i ? (Stack < StackBegin) : (Stack <= StackBegin)) ||
284 ((StackEnd - Stack) < (2 * sizeof(ULONG_PTR))))
285 {
286 /* We're done or hit a bad address */
287 break;
288 }
289
290 /* Get new stack and EIP */
291 NewStack = *(PULONG_PTR)Stack;
292 Eip = *(PULONG_PTR)(Stack + sizeof(ULONG_PTR));
293
294 /* Check if the new pointer is above the oldone and past the end */
295 if (!((Stack < NewStack) && (NewStack < StackEnd)))
296 {
297 /* Stop searching after this entry */
298 StopSearch = TRUE;
299 }
300
301 /* Also make sure that the EIP isn't a stack address */
302 if ((StackBegin < Eip) && (Eip < StackEnd)) break;
303
304 /* FIXME: Check that EIP is inside a loaded module */
305
306 /* Save this frame */
307 Callers[i] = (PVOID)Eip;
308
309 /* Check if we should continue */
310 if (StopSearch)
311 {
312 /* Return the next index */
313 i++;
314 break;
315 }
316
317 /* Move to the next stack */
318 Stack = NewStack;
319 }
320 }
322 {
323 /* No index */
324 i = 0;
325 }
326 _SEH2_END;
327
328 /* Return frames parsed */
329 return i;
330}
331#endif
332
333VOID
334NTAPI
336 OUT PULONG_PTR LowLimit,
338{
339 *LowLimit = (ULONG_PTR)NtCurrentTeb()->NtTib.StackLimit;
340 *HighLimit = (ULONG_PTR)NtCurrentTeb()->NtTib.StackBase;
341}
342
344NTAPI
346{
348}
349
350/* RTL Atom Tables ************************************************************/
351
352typedef struct _RTL_ATOM_HANDLE
353{
357
360{
361 RtlInitializeCriticalSection(&AtomTable->CriticalSection);
362 return STATUS_SUCCESS;
363}
364
365
366VOID
368{
369 RtlDeleteCriticalSection(&AtomTable->CriticalSection);
370}
371
372
375{
376 RtlEnterCriticalSection(&AtomTable->CriticalSection);
377 return TRUE;
378}
379
380
381VOID
383{
384 RtlLeaveCriticalSection(&AtomTable->CriticalSection);
385}
386
387
388/* handle functions */
389
392{
394 sizeof(RTL_ATOM_HANDLE),
395 &AtomTable->RtlHandleTable);
396
397 return TRUE;
398}
399
400VOID
402{
403 RtlDestroyHandleTable(&AtomTable->RtlHandleTable);
404}
405
408{
409 return (PRTL_ATOM_TABLE)RtlAllocateHeap(RtlGetProcessHeap(),
411 Size);
412}
413
414VOID
416{
417 RtlFreeHeap(RtlGetProcessHeap(),
418 0,
419 AtomTable);
420}
421
424{
425 return (PRTL_ATOM_TABLE_ENTRY)RtlAllocateHeap(RtlGetProcessHeap(),
427 Size);
428}
429
430VOID
432{
433 RtlFreeHeap(RtlGetProcessHeap(),
434 0,
435 Entry);
436}
437
438VOID
440{
441 PRTL_HANDLE_TABLE_ENTRY RtlHandleEntry;
442
443 if (RtlIsValidIndexHandle(&AtomTable->RtlHandleTable,
444 (ULONG)Entry->HandleIndex,
445 &RtlHandleEntry))
446 {
447 RtlFreeHandle(&AtomTable->RtlHandleTable,
448 RtlHandleEntry);
449 }
450}
451
454{
455 ULONG HandleIndex;
456 PRTL_HANDLE_TABLE_ENTRY RtlHandle;
457
458 RtlHandle = RtlAllocateHandle(&AtomTable->RtlHandleTable,
459 &HandleIndex);
460 if (RtlHandle != NULL)
461 {
462 PRTL_ATOM_HANDLE AtomHandle = (PRTL_ATOM_HANDLE)RtlHandle;
463
464 /* FIXME - Handle Indexes >= 0xC000 ?! */
465 if (HandleIndex < 0xC000)
466 {
467 Entry->HandleIndex = (USHORT)HandleIndex;
468 Entry->Atom = 0xC000 + (USHORT)HandleIndex;
469
470 AtomHandle->AtomEntry = Entry;
471 AtomHandle->Handle.Flags = RTL_HANDLE_VALID;
472
473 return TRUE;
474 }
475 else
476 {
477 /* set the valid flag, otherwise RtlFreeHandle will fail! */
478 AtomHandle->Handle.Flags = RTL_HANDLE_VALID;
479
480 RtlFreeHandle(&AtomTable->RtlHandleTable,
481 RtlHandle);
482 }
483 }
484
485 return FALSE;
486}
487
490{
491 PRTL_HANDLE_TABLE_ENTRY RtlHandle;
492
493 if (RtlIsValidIndexHandle(&AtomTable->RtlHandleTable,
494 Index,
495 &RtlHandle))
496 {
497 PRTL_ATOM_HANDLE AtomHandle = (PRTL_ATOM_HANDLE)RtlHandle;
498
499 return AtomHandle->AtomEntry;
500 }
501
502 return NULL;
503}
504
505/* Ldr SEH-Protected access to IMAGE_NT_HEADERS */
506
507/* Rtl SEH-Free version of this */
509NTAPI
514 _Out_ PIMAGE_NT_HEADERS *OutHeaders);
515
516
517/*
518 * @implemented
519 * @note: This is here, so that we do not drag SEH into rosload, freeldr and bootmgfw
520 */
522NTAPI
527 _Out_ PIMAGE_NT_HEADERS *OutHeaders)
528{
530
531 /* Assume failure. This is also done in RtlpImageNtHeaderEx, but this is guarded by SEH. */
532 if (OutHeaders != NULL)
533 *OutHeaders = NULL;
534
536 {
537 Status = RtlpImageNtHeaderEx(Flags, Base, Size, OutHeaders);
538 }
540 {
541 /* Fail with the SEH error */
543 }
544 _SEH2_END;
545
546 return Status;
547}
548
549/*
550 * Ldr Resource support code
551 */
552
554 LPCWSTR name, void *root,
555 int want_dir );
557 WORD id, void *root, int want_dir );
559 void *root, int want_dir );
561
562/**********************************************************************
563 * find_entry
564 *
565 * Find a resource entry
566 */
568 ULONG level, void **ret, int want_dir )
569{
570 ULONG size;
571 void *root;
572 IMAGE_RESOURCE_DIRECTORY *resdirptr;
573 USHORT list[9]; /* list of languages to try */
574 int i, pos = 0;
575 LCID user_lcid, system_lcid;
576
579 if (size < sizeof(*resdirptr)) return STATUS_RESOURCE_DATA_NOT_FOUND;
580 resdirptr = root;
581
582 if (!level--) goto done;
583 if (!(*ret = find_entry_by_name( resdirptr, (LPCWSTR)info->Type, root, want_dir || level )))
585 if (!level--) return STATUS_SUCCESS;
586
587 resdirptr = *ret;
588 if (!(*ret = find_entry_by_name( resdirptr, (LPCWSTR)info->Name, root, want_dir || level )))
590 if (!level--) return STATUS_SUCCESS;
591 if (level) return STATUS_INVALID_PARAMETER; /* level > 3 */
592
593 /* 1. specified language */
594 pos = push_language( list, pos, info->Language );
595
596 /* 2. specified language with neutral sublanguage */
598
599 /* 3. neutral language with neutral sublanguage */
601
602 /* if no explicitly specified language, try some defaults */
603 if (PRIMARYLANGID(info->Language) == LANG_NEUTRAL)
604 {
605 /* user defaults, unless SYS_DEFAULT sublanguage specified */
606 if (SUBLANGID(info->Language) != SUBLANG_SYS_DEFAULT)
607 {
608 /* 4. current thread locale language */
609 pos = push_language( list, pos, LANGIDFROMLCID(NtCurrentTeb()->CurrentLocale) );
610
611 if (NT_SUCCESS(NtQueryDefaultLocale(TRUE, &user_lcid)))
612 {
613 /* 5. user locale language */
614 pos = push_language( list, pos, LANGIDFROMLCID(user_lcid) );
615
616 /* 6. user locale language with neutral sublanguage */
618 }
619 }
620
621 /* now system defaults */
622
623 if (NT_SUCCESS(NtQueryDefaultLocale(FALSE, &system_lcid)))
624 {
625 /* 7. system locale language */
626 pos = push_language( list, pos, LANGIDFROMLCID( system_lcid ) );
627
628 /* 8. system locale language with neutral sublanguage */
630 }
631
632 /* 9. English */
634 }
635
636 resdirptr = *ret;
637 for (i = 0; i < pos; i++)
638 if ((*ret = find_entry_by_id( resdirptr, list[i], root, want_dir ))) return STATUS_SUCCESS;
639
640 /* if no explicitly specified language, return the first entry */
641 if (PRIMARYLANGID(info->Language) == LANG_NEUTRAL)
642 {
643 if ((*ret = find_first_entry( resdirptr, root, want_dir ))) return STATUS_SUCCESS;
644 }
646
647done:
648 *ret = resdirptr;
649 return STATUS_SUCCESS;
650}
651
652/*
653 * @implemented
654 */
657 PVOID* BaseOfImage)
658{
662 PVOID ImageBase = NULL;
663
665 ModuleListHead = &NtCurrentPeb()->Ldr->InLoadOrderModuleList;
667 while (Entry != ModuleListHead)
668 {
669 Module = CONTAINING_RECORD(Entry, LDR_DATA_TABLE_ENTRY, InLoadOrderLinks);
670
671 if ((ULONG_PTR)PcValue >= (ULONG_PTR)Module->DllBase &&
672 (ULONG_PTR)PcValue < (ULONG_PTR)Module->DllBase + Module->SizeOfImage)
673 {
674 ImageBase = Module->DllBase;
675 break;
676 }
677 Entry = Entry->Flink;
678 }
680
681 *BaseOfImage = ImageBase;
682 return ImageBase;
683}
684
685NTSTATUS get_buffer(LPWSTR *buffer, SIZE_T needed, PUNICODE_STRING CallerBuffer, BOOLEAN bAllocateBuffer)
686{
687 WCHAR *p;
688
689 if (CallerBuffer && CallerBuffer->MaximumLength > needed)
690 {
691 p = CallerBuffer->Buffer;
692 CallerBuffer->Length = needed - sizeof(WCHAR);
693 }
694 else
695 {
696 if (!bAllocateBuffer)
698
699 if (CallerBuffer)
700 CallerBuffer->Buffer[0] = 0;
701
702 p = RtlAllocateHeap(RtlGetProcessHeap(), 0, needed );
703 if (!p)
704 return STATUS_NO_MEMORY;
705 }
706 *buffer = p;
707
708 return STATUS_SUCCESS;
709}
710
711/* NOTE: Remove this one once our actctx support becomes better */
713{
714 static const WCHAR winsxsW[] = {'\\','w','i','n','s','x','s','\\'};
715 static const WCHAR dotManifestW[] = {'.','m','a','n','i','f','e','s','t',0};
716
717 ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION *info;
718 ACTCTX_SECTION_KEYED_DATA data;
720 SIZE_T needed, size = 1024;
721 WCHAR *p;
722
723 data.cbSize = sizeof(data);
724 status = RtlFindActivationContextSectionString( FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX, NULL,
725 ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION,
726 pnameW, &data );
727 if (status != STATUS_SUCCESS)
728 {
729 //DPRINT1("RtlFindActivationContextSectionString returned 0x%x for %wZ\n", status, pnameW);
730 return status;
731 }
732
733 for (;;)
734 {
735 if (!(info = RtlAllocateHeap( RtlGetProcessHeap(), 0, size )))
736 {
738 goto done;
739 }
740 status = RtlQueryInformationActivationContext( 0, data.hActCtx, &data.ulAssemblyRosterIndex,
741 AssemblyDetailedInformationInActivationContext,
742 info, size, &needed );
743 if (status == STATUS_SUCCESS) break;
744 if (status != STATUS_BUFFER_TOO_SMALL) goto done;
745 RtlFreeHeap( RtlGetProcessHeap(), 0, info );
746 size = needed;
747 }
748
749 DPRINT("manifestpath === %S\n", info->lpAssemblyManifestPath);
750 DPRINT("DirectoryName === %S\n", info->lpAssemblyDirectoryName);
751 if (!info->lpAssemblyManifestPath /*|| !info->lpAssemblyDirectoryName*/)
752 {
754 goto done;
755 }
756
757 if ((p = wcsrchr( info->lpAssemblyManifestPath, '\\' )))
758 {
759 DWORD dirlen = info->ulAssemblyDirectoryNameLength / sizeof(WCHAR);
760
761 p++;
762 if (!info->lpAssemblyDirectoryName || _wcsnicmp( p, info->lpAssemblyDirectoryName, dirlen ) || wcsicmp( p + dirlen, dotManifestW ))
763 {
764 /* manifest name does not match directory name, so it's not a global
765 * windows/winsxs manifest; use the manifest directory name instead */
766 dirlen = p - info->lpAssemblyManifestPath;
767 needed = (dirlen + 1) * sizeof(WCHAR) + pnameW->Length;
768
769 status = get_buffer(fullname, needed, CallerBuffer, bAllocateBuffer);
770 if (!NT_SUCCESS(status))
771 goto done;
772
773 p = *fullname;
774
775 memcpy( p, info->lpAssemblyManifestPath, dirlen * sizeof(WCHAR) );
776 p += dirlen;
777 memcpy( p, pnameW->Buffer, pnameW->Length);
778 p += (pnameW->Length / sizeof(WCHAR));
779 *p = L'\0';
780
781 goto done;
782 }
783 }
784
785 needed = (wcslen(SharedUserData->NtSystemRoot) * sizeof(WCHAR) +
786 sizeof(winsxsW) + info->ulAssemblyDirectoryNameLength + pnameW->Length + 2*sizeof(WCHAR));
787
788 status = get_buffer(fullname, needed, CallerBuffer, bAllocateBuffer);
789 if (!NT_SUCCESS(status))
790 goto done;
791
792 p = *fullname;
793
794 wcscpy( p, SharedUserData->NtSystemRoot );
795 p += wcslen(p);
796 memcpy( p, winsxsW, sizeof(winsxsW) );
797 p += sizeof(winsxsW) / sizeof(WCHAR);
798 memcpy( p, info->lpAssemblyDirectoryName, info->ulAssemblyDirectoryNameLength );
799 p += info->ulAssemblyDirectoryNameLength / sizeof(WCHAR);
800 *p++ = L'\\';
801 memcpy( p, pnameW->Buffer, pnameW->Length);
802 p += (pnameW->Length / sizeof(WCHAR));
803 *p = L'\0';
804
805done:
806 RtlFreeHeap( RtlGetProcessHeap(), 0, info );
808 DPRINT("%S\n", fullname);
809 return status;
810}
811
812/*
813 * @unimplemented
814 */
817NTAPI
819 IN PUNICODE_STRING OriginalName,
824 IN PULONG NewFlags,
825 IN PSIZE_T FileNameSize,
827{
831 UNICODE_STRING localStr, localStr2, *pstrParam;
832 WCHAR *p;
833 BOOLEAN GotExtension;
834 WCHAR c;
835 C_ASSERT(sizeof(UNICODE_NULL) == sizeof(WCHAR));
836
837
838 /* Check for invalid parameters */
839 if (!OriginalName)
840 {
842 }
843
845 {
847 }
848
849 if ((DynamicString) && (StaticString) && !(NewName))
850 {
852 }
853
854 if (!OriginalName->Buffer || OriginalName->Length == 0)
855 {
857 }
858
859 if (StaticString && (OriginalName == StaticString || OriginalName->Buffer == StaticString->Buffer))
860 {
862 }
863
864 if (NtCurrentPeb()->ProcessParameters &&
865 (NtCurrentPeb()->ProcessParameters->Flags & RTL_USER_PROCESS_PARAMETERS_PRIVATE_DLL_PATH))
866 {
867 UNICODE_STRING RealName, LocalName;
868 WCHAR RealNameBuf[MAX_PATH], LocalNameBuf[MAX_PATH];
869
870 RtlInitEmptyUnicodeString(&RealName, RealNameBuf, sizeof(RealNameBuf));
871 RtlInitEmptyUnicodeString(&LocalName, LocalNameBuf, sizeof(LocalNameBuf));
872
873 Status = RtlComputePrivatizedDllName_U(OriginalName, &RealName, &LocalName);
874 if (!NT_SUCCESS(Status))
875 {
876 DPRINT1("RtlComputePrivatizedDllName_U failed for %wZ: 0x%lx\n", OriginalName, Status);
877 return Status;
878 }
879
880 if (RtlDoesFileExists_UStr(&LocalName))
881 {
883 if (NT_SUCCESS(Status))
884 {
885 RtlCopyMemory(fullname, LocalName.Buffer, LocalName.Length + sizeof(UNICODE_NULL));
886 }
887 else
888 {
889 DPRINT1("Error while retrieving buffer for %wZ: 0x%lx\n", OriginalName, Status);
890 }
891 }
892 else if (RtlDoesFileExists_UStr(&RealName))
893 {
895 if (NT_SUCCESS(Status))
896 {
897 RtlCopyMemory(fullname, RealName.Buffer, RealName.Length + sizeof(UNICODE_NULL));
898 }
899 else
900 {
901 DPRINT1("Error while retrieving buffer for %wZ: 0x%lx\n", OriginalName, Status);
902 }
903 }
904 else
905 {
907 }
908
909 if (RealName.Buffer != RealNameBuf)
910 RtlFreeUnicodeString(&RealName);
911 if (LocalName.Buffer != LocalNameBuf)
912 RtlFreeUnicodeString(&LocalName);
913
914 if (NT_SUCCESS(Status))
915 {
916 DPRINT("Redirecting %wZ to %S\n", OriginalName, fullname);
918 {
921 }
922 else
923 {
925 }
926 return Status;
927 }
928 }
929
930 pstrParam = OriginalName;
931
932 /* Get the file name with an extension */
933 p = OriginalName->Buffer + OriginalName->Length / sizeof(WCHAR) - 1;
934 GotExtension = FALSE;
935 while (p >= OriginalName->Buffer)
936 {
937 c = *p--;
938 if (c == L'.')
939 {
940 GotExtension = TRUE;
941 }
942 else if (c == L'\\')
943 {
944 localStr.Buffer = p + 2;
945 localStr.Length = OriginalName->Length - ((ULONG_PTR)localStr.Buffer - (ULONG_PTR)OriginalName->Buffer);
946 localStr.MaximumLength = OriginalName->MaximumLength - ((ULONG_PTR)localStr.Buffer - (ULONG_PTR)OriginalName->Buffer);
947 pstrParam = &localStr;
948 break;
949 }
950 }
951
952 if (!GotExtension)
953 {
954 if (!Extension)
955 {
957 }
958
959 if (pstrParam->Length + Extension->Length > sizeof(buffer))
960 {
961 //FIXME!
962 return STATUS_NO_MEMORY;
963 }
964
965 RtlInitEmptyUnicodeString(&localStr2, buffer, sizeof(buffer));
966 RtlAppendUnicodeStringToString(&localStr2, pstrParam);
968 pstrParam = &localStr2;
969 }
970
971 /* Use wine's function as long as we use wine's sxs implementation in ntdll */
973 if (!NT_SUCCESS(Status))
974 {
975 return Status;
976 }
977
978 DPRINT("Redirecting %wZ to %S\n", OriginalName, fullname);
979
981 {
984 }
985 else
986 {
988 }
989
990 return Status;
991}
992
993/*
994 * @implemented
995 */
998NTAPI
999RtlWow64EnableFsRedirection(IN BOOLEAN Wow64FsEnableRedirection)
1000{
1001 /* This is what Windows returns on x86 */
1003}
1004
1005/*
1006 * @implemented
1007 */
1010NTAPI
1011RtlWow64EnableFsRedirectionEx(IN PVOID Wow64FsEnableRedirection,
1012 OUT PVOID *OldFsRedirectionLevel)
1013{
1014 /* This is what Windows returns on x86 */
1016}
1017
1018/*
1019 * @unimplemented
1020 */
1023NTAPI
1025 OUT PCHAR Hash,
1026 IN ULONG ImportTableHashSize)
1027{
1030}
1031
1033NTAPI
1038{
1039 _SEH2_TRY
1040 {
1042 }
1044 {
1046 }
1047 _SEH2_END;
1048
1049 return STATUS_SUCCESS;
1050}
1051
1052/* FIXME: code duplication with kernel32/client/time.c */
1053ULONG
1054NTAPI
1056{
1057 ULARGE_INTEGER TickCount;
1058
1059#ifdef _WIN64
1060 TickCount.QuadPart = *((volatile ULONG64*)&SharedUserData->TickCount);
1061#else
1062 while (TRUE)
1063 {
1064 TickCount.HighPart = (ULONG)SharedUserData->TickCount.High1Time;
1065 TickCount.LowPart = SharedUserData->TickCount.LowPart;
1066
1067 if (TickCount.HighPart == (ULONG)SharedUserData->TickCount.High2Time)
1068 break;
1069
1071 }
1072#endif
1073
1074 return (ULONG)((UInt32x32To64(TickCount.LowPart,
1075 SharedUserData->TickCountMultiplier) >> 24) +
1076 UInt32x32To64((TickCount.HighPart << 8) & 0xFFFFFFFF,
1077 SharedUserData->TickCountMultiplier));
1078}
1079
1080/* EOF */
#define NtCurrentPeb()
Definition: FLS.c:22
unsigned char BOOLEAN
IN PUNICODE_STRING StaticString
IN PUNICODE_STRING IN PUNICODE_STRING DynamicString
unsigned int dir
Definition: maze.c:112
LONG NTSTATUS
Definition: precomp.h:26
#define DPRINT1
Definition: precomp.h:8
NTSTATUS NTAPI RtlImageNtHeaderEx(_In_ ULONG Flags, _In_ PVOID Base, _In_ ULONG64 Size, _Out_ PIMAGE_NT_HEADERS *OutHeaders)
Definition: libsupp.c:32
NTSTATUS NTAPI RtlpImageNtHeaderEx(_In_ ULONG Flags, _In_ PVOID Base, _In_ ULONG64 Size, _Out_ PIMAGE_NT_HEADERS *OutHeaders)
Definition: image.c:140
#define UNIMPLEMENTED
Definition: debug.h:115
#define NTSYSAPI
Definition: ntoskrnl.h:12
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
NTSTATUS NTAPI RtlpSafeCopyMemory(_Out_writes_bytes_all_(Length) VOID UNALIGNED *Destination, _In_reads_bytes_(Length) CONST VOID UNALIGNED *Source, _In_ SIZE_T Length)
Definition: libsupp.c:52
PVOID NTAPI RtlpAllocateMemory(ULONG Bytes, ULONG Tag)
Definition: libsupp.c:35
VOID NTAPI RtlpFreeMemory(PVOID Mem, ULONG Tag)
Definition: libsupp.c:44
PVOID MmHighestUserAddress
Definition: libsupp.c:23
struct _root root
Definition: list.h:37
#define UNALIGNED
Definition: crtdefs.h:144
#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:32
BOOLEAN NTAPI RtlpCheckForActiveDebugger(VOID)
Definition: libsupp.c:25
NTSYSAPI NTSTATUS NTAPI RtlWow64EnableFsRedirection(IN BOOLEAN Wow64FsEnableRedirection)
Definition: libsupp.c:999
NTSTATUS NTAPI RtlInitializeHeapLock(IN OUT PHEAP_LOCK *Lock)
Definition: libsupp.c:126
VOID NTAPI RtlpCheckLogException(IN PEXCEPTION_RECORD ExceptionRecord, IN PCONTEXT ContextRecord, IN PVOID ContextData, IN ULONG Size)
Definition: libsupp.c:201
IMAGE_RESOURCE_DIRECTORY * find_entry_by_id(IMAGE_RESOURCE_DIRECTORY *dir, WORD id, void *root, int want_dir)
Definition: res.c:95
BOOLEAN NTAPI RtlIsThreadWithinLoaderCallout(VOID)
Definition: libsupp.c:345
PRTL_ATOM_TABLE_ENTRY RtlpAllocAtomTableEntry(ULONG Size)
Definition: libsupp.c:423
NTSTATUS NTAPI RtlEnterHeapLock(IN OUT PHEAP_LOCK Lock, IN BOOLEAN Exclusive)
Definition: libsupp.c:108
VOID NTAPI RtlpClearInDbgPrint(VOID)
Definition: libsupp.c:45
IMAGE_RESOURCE_DIRECTORY * find_entry_by_name(IMAGE_RESOURCE_DIRECTORY *dir, LPCWSTR name, void *root, int want_dir)
Definition: res.c:130
BOOLEAN RtlpLockAtomTable(PRTL_ATOM_TABLE AtomTable)
Definition: libsupp.c:374
NTSTATUS get_buffer(LPWSTR *buffer, SIZE_T needed, PUNICODE_STRING CallerBuffer, BOOLEAN bAllocateBuffer)
Definition: libsupp.c:685
ULONG NTAPI RtlWalkFrameChain(OUT PVOID *Callers, IN ULONG Count, IN ULONG Flags)
Definition: libsupp.c:227
KPROCESSOR_MODE NTAPI RtlpGetMode(VOID)
Definition: libsupp.c:53
BOOLEAN NTAPI RtlpSetInDbgPrint(VOID)
Definition: libsupp.c:33
int push_language(USHORT *list, ULONG pos, WORD lang)
Definition: res.c:61
BOOLEAN NTAPI RtlpHandleDpcStackException(IN PEXCEPTION_REGISTRATION_RECORD RegistrationFrame, IN ULONG_PTR RegistrationFrameEnd, IN OUT PULONG_PTR StackLow, IN OUT PULONG_PTR StackHigh)
Definition: libsupp.c:190
VOID NTAPI RtlpSetHeapParameters(IN PRTL_HEAP_PARAMETERS Parameters)
Definition: libsupp.c:174
PTEB LdrpTopLevelDllBeingLoadedTeb
Definition: libsupp.c:18
struct _RTL_ATOM_HANDLE RTL_ATOM_HANDLE
ULONG NTAPI RtlGetTickCount(VOID)
Definition: libsupp.c:1055
BOOLEAN NTAPI RtlTryEnterHeapLock(IN OUT PHEAP_LOCK Lock, IN BOOLEAN Exclusive)
Definition: libsupp.c:117
NTSTATUS NTAPI RtlDeleteHeapLock(IN OUT PHEAP_LOCK Lock)
Definition: libsupp.c:101
PVOID NTAPI RtlPcToFileHeader(IN PVOID PcValue, PVOID *BaseOfImage)
Definition: libsupp.c:656
VOID RtlpFreeAtomTable(PRTL_ATOM_TABLE AtomTable)
Definition: libsupp.c:415
VOID RtlpDestroyAtomHandleTable(PRTL_ATOM_TABLE AtomTable)
Definition: libsupp.c:401
struct _RTL_ATOM_HANDLE * PRTL_ATOM_HANDLE
BOOLEAN RtlpCreateAtomHandleTable(PRTL_ATOM_TABLE AtomTable)
Definition: libsupp.c:391
NTSYSAPI NTSTATUS NTAPI RtlDosApplyFileIsolationRedirection_Ustr(IN ULONG Flags, IN PUNICODE_STRING OriginalName, IN PUNICODE_STRING Extension, IN OUT PUNICODE_STRING StaticString, IN OUT PUNICODE_STRING DynamicString, IN OUT PUNICODE_STRING *NewName, IN PULONG NewFlags, IN PSIZE_T FileNameSize, IN PSIZE_T RequiredLength)
Definition: libsupp.c:818
NTSYSAPI NTSTATUS NTAPI RtlComputeImportTableHash(IN HANDLE FileHandle, OUT PCHAR Hash, IN ULONG ImportTableHashSize)
Definition: libsupp.c:1024
VOID RtlpUnlockAtomTable(PRTL_ATOM_TABLE AtomTable)
Definition: libsupp.c:382
NTSTATUS RtlpInitAtomTableLock(PRTL_ATOM_TABLE AtomTable)
Definition: libsupp.c:359
VOID RtlpDestroyAtomTableLock(PRTL_ATOM_TABLE AtomTable)
Definition: libsupp.c:367
VOID RtlpFreeAtomTableEntry(PRTL_ATOM_TABLE_ENTRY Entry)
Definition: libsupp.c:431
IMAGE_RESOURCE_DIRECTORY * find_first_entry(IMAGE_RESOURCE_DIRECTORY *dir, void *root, int want_dir)
Definition: res.c:75
NTSTATUS find_entry(PVOID BaseAddress, LDR_RESOURCE_INFO *info, ULONG level, void **ret, int want_dir)
Definition: libsupp.c:567
PRTL_ATOM_TABLE RtlpAllocAtomTable(ULONG Size)
Definition: libsupp.c:407
PRTL_ATOM_TABLE_ENTRY RtlpGetAtomEntry(PRTL_ATOM_TABLE AtomTable, ULONG Index)
Definition: libsupp.c:489
NTSTATUS NTAPI RtlLeaveHeapLock(IN OUT PHEAP_LOCK Lock)
Definition: libsupp.c:133
BOOLEAN RtlpCreateAtomHandle(PRTL_ATOM_TABLE AtomTable, PRTL_ATOM_TABLE_ENTRY Entry)
Definition: libsupp.c:453
NTSYSAPI NTSTATUS NTAPI RtlWow64EnableFsRedirectionEx(IN PVOID Wow64FsEnableRedirection, OUT PVOID *OldFsRedirectionLevel)
Definition: libsupp.c:1011
VOID RtlpFreeAtomHandle(PRTL_ATOM_TABLE AtomTable, PRTL_ATOM_TABLE_ENTRY Entry)
Definition: libsupp.c:439
BOOLEAN NTAPI RtlpCaptureStackLimits(IN ULONG_PTR Ebp, IN ULONG_PTR *StackBegin, IN ULONG_PTR *StackEnd)
Definition: libsupp.c:211
NTSTATUS find_actctx_dll(PUNICODE_STRING pnameW, LPWSTR *fullname, PUNICODE_STRING CallerBuffer, BOOLEAN bAllocateBuffer)
Definition: libsupp.c:712
SIZE_T RtlpAllocDeallocQueryBufferSize
Definition: libsupp.c:17
VOID NTAPI RtlpGetStackLimits(OUT PULONG_PTR LowLimit, OUT PULONG_PTR HighLimit)
Definition: libsupp.c:335
#define wcsrchr
Definition: compat.h:16
#define RtlImageDirectoryEntryToData
Definition: compat.h:809
#define MAX_PATH
Definition: compat.h:34
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
#define wcsicmp
Definition: compat.h:15
PPEB Peb
Definition: dllmain.c:27
static int Hash(const char *)
Definition: reader.c:2257
#define ULONG_PTR
Definition: config.h:101
#define PAGE_SIZE
Definition: env_spec_w32.h:49
#define _SEH2_END
Definition: filesup.c:22
#define _SEH2_TRY
Definition: filesup.c:19
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
_Inout_opt_ PUNICODE_STRING Extension
Definition: fltkernel.h:1092
_Must_inspect_result_ _In_opt_ PFLT_INSTANCE _Out_ PHANDLE FileHandle
Definition: fltkernel.h:1231
__in PWDFDEVICE_INIT __in BOOLEAN Exclusive
Status
Definition: gdiplustypes.h:25
GLint level
Definition: gl.h:1546
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLsizeiptr size
Definition: glext.h:5919
GLuint buffer
Definition: glext.h:5915
const GLubyte * c
Definition: glext.h:8905
GLfloat GLfloat p
Definition: glext.h:8902
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
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
NTSYSAPI void WINAPI RtlReleasePebLock(void)
Definition: libsupp.c:82
NTSYSAPI BOOLEAN WINAPI RtlIsValidIndexHandle(const RTL_HANDLE_TABLE *, ULONG Index, RTL_HANDLE **)
NTSYSAPI NTSTATUS WINAPI RtlFindActivationContextSectionString(ULONG, const GUID *, ULONG, const UNICODE_STRING *, PVOID)
Definition: actctx.c:5815
NTSYSAPI void WINAPI RtlAcquirePebLock(void)
Definition: libsupp.c:72
NTSYSAPI void WINAPI RtlReleaseActivationContext(HANDLE)
Definition: actctx.c:5344
NTSYSAPI PEB *WINAPI RtlGetCurrentPeb(void)
Definition: libsupp.c:63
NTSYSAPI NTSTATUS WINAPI RtlQueryInformationActivationContext(ULONG, HANDLE, PVOID, ULONG, PVOID, SIZE_T, SIZE_T *)
Definition: actctx.c:5515
NTSYSAPI ULONG WINAPI RtlGetNtGlobalFlags(void)
Definition: libsupp.c:93
#define UInt32x32To64(a, b)
Definition: intsafe.h:252
#define C_ASSERT(e)
Definition: intsafe.h:73
#define NtCurrentTeb
LIST_ENTRY * ModuleListHead
Definition: kdpacket.c:23
#define c
Definition: ke_i.h:80
if(dx< 0)
Definition: linetemp.h:194
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
_In_ UINT Bytes
Definition: mmcopy.h:9
unsigned __int64 ULONG64
Definition: imports.h:198
const char * fullname
Definition: shader.c:1766
struct atom_table ** PRTL_ATOM_TABLE
Definition: atom.c:43
#define _In_reads_bytes_(size)
Definition: ms_sal.h:321
#define _Out_writes_bytes_all_(size)
Definition: ms_sal.h:362
#define _Out_
Definition: ms_sal.h:345
#define _In_
Definition: ms_sal.h:308
unsigned int UINT
Definition: ndis.h:50
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
Definition: ndis.h:3169
#define UserMode
Definition: asm.h:35
#define MI_HIGHEST_USER_ADDRESS
Definition: mmtypes.h:43
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID * BaseAddress
Definition: mmfuncs.h:404
NTSYSAPI NTSTATUS NTAPI RtlDeleteCriticalSection(_In_ PRTL_CRITICAL_SECTION CriticalSection)
NTSYSAPI VOID NTAPI RtlInitializeHandleTable(_In_ ULONG TableSize, _In_ ULONG HandleSize, _In_ PRTL_HANDLE_TABLE HandleTable)
NTSYSAPI BOOLEAN NTAPI RtlTryEnterCriticalSection(_In_ PRTL_CRITICAL_SECTION CriticalSection)
NTSYSAPI BOOLEAN NTAPI RtlFreeHandle(_In_ PRTL_HANDLE_TABLE HandleTable, _In_ PRTL_HANDLE_TABLE_ENTRY Handle)
NTSYSAPI VOID NTAPI RtlDestroyHandleTable(_Inout_ PRTL_HANDLE_TABLE HandleTable)
NTSYSAPI PRTL_HANDLE_TABLE_ENTRY NTAPI RtlAllocateHandle(_In_ PRTL_HANDLE_TABLE HandleTable, _Inout_ PULONG Index)
_In_ PUNICODE_STRING _Inout_ PUNICODE_STRING Destination
Definition: rtlfuncs.h:3004
NTSYSAPI NTSTATUS NTAPI RtlEnterCriticalSection(_In_ PRTL_CRITICAL_SECTION CriticalSection)
_In_opt_ ULONG Base
Definition: rtlfuncs.h:2439
NTSYSAPI NTSTATUS NTAPI RtlLeaveCriticalSection(_In_ PRTL_CRITICAL_SECTION CriticalSection)
NTSYSAPI NTSTATUS NTAPI RtlInitializeCriticalSection(_In_ PRTL_CRITICAL_SECTION CriticalSection)
NTSYSAPI NTSTATUS NTAPI RtlComputePrivatizedDllName_U(_In_ PUNICODE_STRING DllName, _Inout_ PUNICODE_STRING RealName, _Inout_ PUNICODE_STRING LocalName)
Definition: path.c:586
#define RTL_HANDLE_VALID
Definition: rtltypes.h:376
#define RTL_USER_PROCESS_PARAMETERS_PRIVATE_DLL_PATH
Definition: rtltypes.h:52
int Count
Definition: noreturn.cpp:7
NTSYSAPI NTSTATUS NTAPI RtlAppendUnicodeStringToString(PUNICODE_STRING Destination, PUNICODE_STRING Source)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define FASTCALL
Definition: nt_native.h:50
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
_IRQL_requires_same_ _In_ PVOID _Inout_ struct _CONTEXT * ContextRecord
Definition: ntbasedef.h:654
#define UNICODE_NULL
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
BOOLEAN NTAPI RtlDoesFileExists_UStr(IN PUNICODE_STRING FileName)
Definition: path.c:1503
NTSTATUS NTAPI NtQueryDefaultLocale(IN BOOLEAN UserProfile, OUT PLCID DefaultLocaleId)
Definition: locale.c:396
#define STATUS_RESOURCE_LANG_NOT_FOUND
Definition: ntstatus.h:648
#define STATUS_RESOURCE_NAME_NOT_FOUND
Definition: ntstatus.h:375
#define STATUS_NO_MEMORY
Definition: ntstatus.h:260
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:239
#define STATUS_RESOURCE_TYPE_NOT_FOUND
Definition: ntstatus.h:374
#define STATUS_RESOURCE_DATA_NOT_FOUND
Definition: ntstatus.h:373
#define STATUS_SXS_KEY_NOT_FOUND
Definition: ntstatus.h:1389
#define L(x)
Definition: ntvdm.h:50
#define CONST
Definition: pedump.c:81
unsigned short USHORT
Definition: pedump.c:61
#define IMAGE_DIRECTORY_ENTRY_RESOURCE
Definition: pedump.c:261
#define _SEH2_GetExceptionCode()
Definition: pseh2_64.h:159
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:34
__asm__(".p2align 4, 0x90\n" ".seh_proc __seh2_global_filter_func\n" "__seh2_global_filter_func:\n" "\tpush %rbp\n" "\t.seh_pushreg %rbp\n" "\tsub $32, %rsp\n" "\t.seh_stackalloc 32\n" "\t.seh_endprologue\n" "\tmov %rdx, %rbp\n" "\tjmp *%rax\n" "__seh2_global_filter_func_exit:\n" "\t.p2align 4\n" "\tadd $32, %rsp\n" "\tpop %rbp\n" "\tret\n" "\t.seh_endproc")
#define _SEH2_YIELD(__stmt)
Definition: pseh2_64.h:162
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
_Check_return_ _CRTIMP int __cdecl _wcsnicmp(_In_reads_or_z_(_MaxCount) const wchar_t *_Str1, _In_reads_or_z_(_MaxCount) const wchar_t *_Str2, _In_ size_t _MaxCount)
#define LANG_NEUTRAL
Definition: nls.h:22
#define MAKELANGID(p, s)
Definition: nls.h:15
#define SUBLANGID(l)
Definition: nls.h:17
#define LANG_ENGLISH
Definition: nls.h:52
#define LANGIDFROMLCID(l)
Definition: nls.h:18
#define SUBLANG_NEUTRAL
Definition: nls.h:167
#define SUBLANG_DEFAULT
Definition: nls.h:168
DWORD LCID
Definition: nls.h:13
#define PRIMARYLANGID(l)
Definition: nls.h:16
#define SUBLANG_SYS_DEFAULT
Definition: nls.h:169
#define YieldProcessor
Definition: ke.h:48
#define SharedUserData
static const WCHAR dotManifestW[]
Definition: actctx.c:760
#define STATUS_SUCCESS
Definition: shellext.h:65
#define STATUS_NOT_FOUND
Definition: shellext.h:72
#define STATUS_BUFFER_TOO_SMALL
Definition: shellext.h:69
#define DPRINT
Definition: sndvol32.h:71
base of all file and directory entries
Definition: entries.h:83
Definition: btrfs_drv.h:1876
ULONG SizeOfImage
Definition: ldrtypes.h:143
PVOID DllBase
Definition: btrfs_drv.h:1880
Definition: typedefs.h:120
struct _LIST_ENTRY * Flink
Definition: typedefs.h:121
ULONG HeapDeCommitTotalFreeThreshold
Definition: ntddk_ex.h:277
ULONG HeapSegmentCommit
Definition: ntddk_ex.h:276
ULONG HeapSegmentReserve
Definition: ntddk_ex.h:275
PVOID FastPebLock
Definition: ntddk_ex.h:250
ULONG NtGlobalFlag
Definition: ntddk_ex.h:270
ULONG HeapDeCommitFreeBlockThreshold
Definition: ntddk_ex.h:278
RTL_HANDLE_TABLE_ENTRY Handle
Definition: libsupp.c:354
PRTL_ATOM_TABLE_ENTRY AtomEntry
Definition: libsupp.c:355
Definition: rtltypes.h:1672
Definition: rtltypes.h:1247
ULONG Flags
Definition: rtltypes.h:1250
Definition: compat.h:836
$ULONG LowPart
Definition: ntbasedef.h:569
ULONGLONG QuadPart
Definition: ms-dtyp.idl:185
$ULONG HighPart
Definition: ntbasedef.h:570
USHORT MaximumLength
Definition: env_spec_w32.h:370
Definition: fci.c:127
Definition: parser.c:49
Definition: name.c:39
Definition: ps.c:97
ecx edi movl ebx edx edi decl ecx esi eax jecxz decl eax andl eax esi movl edx movl TEMP incl eax andl eax ecx incl ebx testl eax jnz xchgl ecx incl TEMP esp ecx subl ebx pushl ecx ecx edx ecx shrl ecx mm0 mm4 mm0 mm4 mm1 mm5 mm1 mm5 mm2 mm6 mm2 mm6 mm3 mm7 mm3 mm7 paddd mm0 paddd mm4 paddd mm0 paddd mm4 paddd mm0 paddd mm4 movq mm1 movq mm5 psrlq mm1 psrlq mm5 paddd mm0 paddd mm4 psrad mm0 psrad mm4 packssdw mm0 packssdw mm4 mm1 punpckldq mm0 pand mm1 pand mm0 por mm1 movq edi esi edx edi decl ecx jnz popl ecx andl ecx jecxz mm0 mm0 mm1 mm1 mm2 mm2 mm3 mm3 paddd mm0 paddd mm0 paddd mm0 movq mm1 psrlq mm1 paddd mm0 psrad mm0 packssdw mm0 movd eax movw edi esi edx esi movl ecx mm0 mm4 mm0 mm4 mm1 mm5 mm1 mm5 mm2 mm6 mm2 mm6 mm3 mm7 mm3 mm7 paddd mm0 paddd mm4 paddd mm0 paddd mm4 paddd mm0 paddd mm4 movq mm1 movq mm5 psrlq mm1 psrlq mm5 paddd mm1 paddd mm5 psrad mm1 psrad mm5 packssdw mm1 packssdw mm5 psubd mm0 psubd mm4 psubsw mm0 psubsw mm4 mm1 punpckldq mm0 pand mm1 pand mm0 por mm1 movq edi subl esi addl edx edi decl ecx jnz mm0 mm0 mm1 mm1 mm2 mm2 mm3 mm3 paddd mm0 paddd mm0 paddd mm0 movq mm1 psrlq mm1 paddd mm1 psrad mm1 packssdw mm1 psubd mm0 psubsw mm0 movd eax movw edi emms popl ebx popl esi popl edi mov ebp
Definition: synth_sse3d.h:266
ULONG_PTR * PSIZE_T
Definition: typedefs.h:80
uint32_t * PULONG_PTR
Definition: typedefs.h:65
uint32_t * PULONG
Definition: typedefs.h:59
#define NTAPI
Definition: typedefs.h:36
void * PVOID
Definition: typedefs.h:50
ULONG_PTR SIZE_T
Definition: typedefs.h:80
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define IN
Definition: typedefs.h:39
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
char * PCHAR
Definition: typedefs.h:51
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
static const WCHAR lang[]
Definition: wbemdisp.c:287
int ret
_In_ WDFCOLLECTION _In_ ULONG Index
_Must_inspect_result_ _In_ WDFDEVICE _In_ BOOLEAN _In_opt_ PVOID Tag
Definition: wdfdevice.h:4065
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533
_Must_inspect_result_ _In_ WDFQUEUE _In_opt_ WDFREQUEST _In_opt_ WDFFILEOBJECT _Inout_opt_ PWDF_REQUEST_PARAMETERS Parameters
Definition: wdfio.h:869
_In_ WDFREQUEST _In_ PIO_STACK_LOCATION Stack
Definition: wdfrequest.h:639
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFWAITLOCK * Lock
Definition: wdfsync.h:127
_In_ ULONG _Out_opt_ PULONG RequiredLength
Definition: wmifuncs.h:30
_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
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
_Out_ PULONG_PTR HighLimit
Definition: iofuncs.h:2885
CCHAR KPROCESSOR_MODE
Definition: ketypes.h:7
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
_In_ PUNICODE_STRING NewName
Definition: zwfuncs.h:1203