@@ -633,13 +633,11 @@ BOOLEAN OpenDotNetPublicControlBlock_V4(
633
633
{
634
634
PVOID ntdll ;
635
635
636
- if (ntdll = PhGetDllHandle (L"ntdll.dll" ))
637
- {
638
- NtOpenPrivateNamespace_I = PhGetProcedureAddress (ntdll , "NtOpenPrivateNamespace" , 0 );
639
- RtlCreateBoundaryDescriptor_I = PhGetProcedureAddress (ntdll , "RtlCreateBoundaryDescriptor" , 0 );
640
- RtlDeleteBoundaryDescriptor_I = PhGetProcedureAddress (ntdll , "RtlDeleteBoundaryDescriptor" , 0 );
641
- RtlAddSIDToBoundaryDescriptor_I = PhGetProcedureAddress (ntdll , "RtlAddSIDToBoundaryDescriptor" , 0 );
642
- }
636
+ ntdll = PhGetDllHandle (L"ntdll.dll" );
637
+ NtOpenPrivateNamespace_I = PhGetProcedureAddress (ntdll , "NtOpenPrivateNamespace" , 0 );
638
+ RtlCreateBoundaryDescriptor_I = PhGetProcedureAddress (ntdll , "RtlCreateBoundaryDescriptor" , 0 );
639
+ RtlDeleteBoundaryDescriptor_I = PhGetProcedureAddress (ntdll , "RtlDeleteBoundaryDescriptor" , 0 );
640
+ RtlAddSIDToBoundaryDescriptor_I = PhGetProcedureAddress (ntdll , "RtlAddSIDToBoundaryDescriptor" , 0 );
643
641
644
642
PhEndInitOnce (& initOnce );
645
643
}
@@ -863,8 +861,7 @@ PPH_LIST QueryDotNetAppDomainsForPid_V2(
863
861
AppDomainEnumerationIPCBlock_Wow64 * appDomainEnumBlock ;
864
862
865
863
legacyPrivateBlock = (LegacyPrivateIPCControlBlock_Wow64 * )ipcControlBlockTable ;
866
- appDomainEnumBlock = GetLegacyBlockTableEntry (TRUE, ipcControlBlockTable , eLegacyPrivateIPC_AppDomain );
867
-
864
+
868
865
// NOTE: .NET 2.0 processes do not have the IPC_FLAG_INITIALIZED flag.
869
866
870
867
// Check the IPCControlBlock version is valid.
@@ -873,6 +870,12 @@ PPH_LIST QueryDotNetAppDomainsForPid_V2(
873
870
__leave;
874
871
}
875
872
873
+ appDomainEnumBlock = GetLegacyBlockTableEntry (
874
+ Wow64 ,
875
+ ipcControlBlockTable ,
876
+ eLegacyPrivateIPC_AppDomain
877
+ );
878
+
876
879
appDomainsList = EnumAppDomainIpcBlockWow64 (
877
880
ProcessHandle ,
878
881
appDomainEnumBlock
@@ -884,8 +887,7 @@ PPH_LIST QueryDotNetAppDomainsForPid_V2(
884
887
AppDomainEnumerationIPCBlock * appDomainEnumBlock ;
885
888
886
889
legacyPrivateBlock = (LegacyPrivateIPCControlBlock * )ipcControlBlockTable ;
887
- appDomainEnumBlock = GetLegacyBlockTableEntry (FALSE, ipcControlBlockTable , eLegacyPrivateIPC_AppDomain );
888
-
890
+
889
891
// NOTE: .NET 2.0 processes do not have the IPC_FLAG_INITIALIZED flag.
890
892
891
893
// Check the IPCControlBlock version is valid.
@@ -894,6 +896,12 @@ PPH_LIST QueryDotNetAppDomainsForPid_V2(
894
896
__leave;
895
897
}
896
898
899
+ appDomainEnumBlock = GetLegacyBlockTableEntry (
900
+ Wow64 ,
901
+ ipcControlBlockTable ,
902
+ eLegacyPrivateIPC_AppDomain
903
+ );
904
+
897
905
appDomainsList = EnumAppDomainIpcBlock (
898
906
ProcessHandle ,
899
907
appDomainEnumBlock
0 commit comments