VirtualBox

Changeset 52139 in vbox for trunk/include/iprt


Ignore:
Timestamp:
Jul 22, 2014 8:19:29 PM (11 years ago)
Author:
vboxsync
Message:

SUP: child-process purification to avoid sysfer.dll.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/nt/nt.h

    r52103 r52139  
    6666#define TEB                        Incomplete_TEB
    6767#define PTEB                       Incomplete_PTEB
     68#define _PEB_LDR_DATA              Incomplete__PEB_LDR_DATA
     69#define PEB_LDR_DATA               Incomplete_PEB_LDR_DATA
     70#define PPEB_LDR_DATA              Incomplete_PPEB_LDR_DATA
    6871
    6972
     
    198201#undef TEB
    199202#undef PTEB
     203#undef _PEB_LDR_DATA
     204#undef PEB_LDR_DATA
     205#undef PPEB_LDR_DATA
    200206
    201207
     
    357363 * @{ */
    358364
     365typedef struct _PEB_LDR_DATA
     366{
     367    uint32_t Length;
     368    BOOLEAN Initialized;
     369    BOOLEAN Padding[3];
     370    HANDLE SsHandle;
     371    LIST_ENTRY InLoadOrderModuleList;
     372    LIST_ENTRY InMemoryOrderModuleList;
     373    LIST_ENTRY InInitializationOrderModuleList;
     374    /* End NT4 */
     375    LIST_ENTRY *EntryInProgress;
     376    BOOLEAN ShutdownInProgress;
     377    HANDLE ShutdownThreadId;
     378} PEB_LDR_DATA;
     379typedef PEB_LDR_DATA *PPEB_LDR_DATA;
     380
    359381typedef struct _PEB_COMMON
    360382{
     
    423445    HANDLE Mutant;                                                          /**< 0x008 / 0x004 */
    424446    PVOID ImageBaseAddress;                                                 /**< 0x010 / 0x008 */
    425     struct _PEB_LDR_DATA *Ldr;                                              /**< 0x018 / 0x00c */
     447    PPEB_LDR_DATA *Ldr;                                                     /**< 0x018 / 0x00c */
    426448    struct _RTL_USER_PROCESS_PARAMETERS *ProcessParameters;                 /**< 0x020 / 0x010 */
    427449    PVOID SubSystemData;                                                    /**< 0x028 / 0x014 */
     
    10711093#define _PEB        _PEB_COMMON
    10721094typedef PEB_COMMON  PEB;
    1073 typedef PPEB_COMMON *PPEB;
     1095typedef PPEB_COMMON PPEB;
    10741096
    10751097#define _TEB        _TEB_COMMON
     
    10841106#ifdef IPRT_NT_USE_WINTERNL
    10851107NTSYSAPI NTSTATUS NTAPI NtCreateSection(PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES, PLARGE_INTEGER, ULONG, ULONG, HANDLE);
     1108NTSYSAPI NTSTATUS NTAPI NtUnmapViewOfSection(HANDLE, PVOID);
    10861109
    10871110typedef struct _FILE_FS_ATTRIBUTE_INFORMATION
     
    13921415/** @} */
    13931416NTSYSAPI NTSTATUS NTAPI NtSetInformationProcess(HANDLE, PROCESSINFOCLASS, PVOID, ULONG);
     1417NTSYSAPI NTSTATUS NTAPI NtTerminateProcess(HANDLE, LONG);
    13941418
    13951419/** Retured by ProcessImageInformation as well as NtQuerySection. */
     
    14441468NTSYSAPI NTSTATUS NTAPI NtResumeThread(HANDLE, PULONG);
    14451469NTSYSAPI NTSTATUS NTAPI NtSuspendThread(HANDLE, PULONG);
     1470NTSYSAPI NTSTATUS NTAPI NtTerminateThread(HANDLE, LONG);
     1471NTSYSAPI NTSTATUS NTAPI NtGetContextThread(HANDLE, PCONTEXT);
     1472NTSYSAPI NTSTATUS NTAPI NtSetContextThread(HANDLE, PCONTEXT);
     1473
    14461474
    14471475#ifndef SEC_FILE
     
    14821510#endif
    14831511NTSYSAPI NTSTATUS NTAPI NtQueryVirtualMemory(HANDLE, void const *, MEMORY_INFORMATION_CLASS, PVOID, SIZE_T, PSIZE_T);
     1512#ifdef IPRT_NT_USE_WINTERNL
     1513NTSYSAPI NTSTATUS NTAPI NtAllocateVirtualMemory(HANDLE, PVOID *, ULONG, PSIZE_T, ULONG, ULONG);
     1514#endif
     1515NTSYSAPI NTSTATUS NTAPI NtFreeVirtualMemory(HANDLE, PVOID *, PSIZE_T, ULONG);
     1516NTSYSAPI NTSTATUS NTAPI NtProtectVirtualMemory(HANDLE, PVOID *, PSIZE_T, ULONG, PULONG);
    14841517
    14851518typedef enum _SYSTEM_INFORMATION_CLASS
     
    16701703NTSYSAPI NTSTATUS NTAPI NtDelayExecution(BOOLEAN, PLARGE_INTEGER);
    16711704NTSYSAPI NTSTATUS NTAPI NtYieldExecution(void);
     1705#ifndef IPRT_NT_USE_WINTERNL
     1706NTSYSAPI NTSTATUS NTAPI NtWaitForSingleObject(HANDLE, BOOLEAN PLARGE_INTERGER);
     1707#endif
     1708
    16721709
    16731710NTSYSAPI NTSTATUS NTAPI RtlAddAccessDeniedAce(PACL, ULONG, ULONG, PSID);
     
    17471784                                                   PUNICODE_STRING ShellInfo, PUNICODE_STRING RuntimeInfo);
    17481785NTSYSAPI VOID     NTAPI RtlDestroyProcessParameters(PRTL_USER_PROCESS_PARAMETERS);
     1786NTSYSAPI NTSTATUS NTAPI RtlCreateUserThread(HANDLE, PSECURITY_DESCRIPTOR, BOOLEAN, ULONG, SIZE_T, SIZE_T,
     1787                                            PFNRT, PVOID, PHANDLE, PCLIENT_ID);
     1788
    17491789
    17501790RT_C_DECLS_END
     
    17551795/** @name NT Kernel APIs
    17561796 * @{ */
     1797RT_C_DECLS_BEGIN
     1798
    17571799NTSYSAPI BOOLEAN  NTAPI ObFindHandleForObject(PEPROCESS pProcess, PVOID pvObject, POBJECT_TYPE pObjectType,
    17581800                                              PVOID pvOptionalConditions, PHANDLE phFound);
     
    17671809extern DECLIMPORT(POBJECT_TYPE *) LpcWaitablePortObjectType;    /**< In vista+ this is the ALPC port object type. */
    17681810
     1811RT_C_DECLS_END
    17691812/** @ */
    17701813#endif /* IN_RING0 */
    17711814
    1772 #endif
    1773 
     1815
     1816#if defined(IN_RING3) || defined(DOXYGEN_RUNNING)
     1817/** @name NT Userland APIs
     1818 * @{ */
     1819RT_C_DECLS_BEGIN
     1820
     1821#if 0 /** @todo figure this out some time... */
     1822typedef struct CSR_MSG_DATA_CREATED_PROCESS
     1823{
     1824    HANDLE hProcess;
     1825    HANDLE hThread;
     1826    CLIENT_ID
     1827    DWORD idProcess;
     1828    DWORD idThread;
     1829    DWORD fCreate;
     1830
     1831} CSR_MSG_DATA_CREATED_PROCESS;
     1832
     1833#define CSR_MSG_NO_CREATED_PROCESS    UINT32_C(0x10000)
     1834#define CSR_MSG_NO_CREATED_THREAD     UINT32_C(0x10001)
     1835NTSYSAPI NTSTATUS NTAPI CsrClientCallServer(PVOID, PVOID, ULONG, SIZE_T);
     1836#endif
     1837NTSYSAPI VOID NTAPI     LdrInitializeThunk(PVOID, PVOID, PVOID);
     1838
     1839RT_C_DECLS_END
     1840/** @} */
     1841#endif /* IN_RING3 */
     1842
     1843#endif
     1844
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette