Initial import

This commit is contained in:
Justine Tunney 2020-06-15 07:18:57 -07:00
commit c91b3c5006
14915 changed files with 590219 additions and 0 deletions

58
libc/nt/nt/loader.h Normal file
View file

@ -0,0 +1,58 @@
#ifndef COSMOPOLITAN_LIBC_NT_NT_LOADER_H_
#define COSMOPOLITAN_LIBC_NT_NT_LOADER_H_
#include "libc/nt/enum/status.h"
#include "libc/nt/typedef/wambda.h"
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
#if 0
/* ░░░░
cosmopolitan § new technology » beyond the pale » loader
The functions and structures in [for these APIs] are internal to
the operating system and subject to change from one release of
Windows to the next, and possibly even between service packs for
each release. Quoth MSDN */
#endif
struct NtAnsiString;
struct NtLdrDataTableEntry;
struct NtUnicodeString;
const struct NtLdrDataTableEntry *NtGetModule(const char *basename) nothrow;
NtStatus LdrLoadDll(const char16_t *opt_PathToFile, uint32_t *opt_Flags,
struct NtUnicodeString *ModuleFileName,
void **out_ModuleHandle);
NtStatus LdrUnloadDll(void *ModuleHandle);
NtStatus LdrGetProcedureAddress(void *ModuleHandle,
struct NtAnsiString *opt_ProcedureName,
uint32_t opt_Ordinal,
wambda *out_ProcedureAddress);
NtStatus LdrGetDllHandle(const char16_t *opt_PathToFile, uint32_t opt_Unused,
struct NtUnicodeString *ModuleFileName,
void **out_ModuleHandle);
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#endif /* COSMOPOLITAN_LIBC_NT_NT_LOADER_H_ */