Data Structures | Defines | Typedefs | Functions

# nt-base.h File Reference

`#include <windows.h>`
`#include <winuser.h>`
`#include <wingdi.h>`
`#include <io.h>`
`#include <process.h>`
`#include <errno.h>`
`#include <stdarg.h>`
`#include "wizard/exception.h"`

Go to the source code of this file.

## Data Structures
struct | dirent
struct | _DIR
struct | _NTMEMORYSTATUSEX
struct | timezone
## Defines
#define | WIN32_LEAN_AND_MEAN
#define | VC_EXTRALEAN
#define | PROT_READ 0x01
#define | PROT_WRITE 0x02
#define | MAP_SHARED 0x01
#define | MAP_PRIVATE 0x02
#define | MAP_ANONYMOUS 0x20
#define | F_OK 0
#define | R_OK 4
#define | W_OK 2
#define | RW_OK 6
#define | _SC_PAGESIZE 1
#define | _SC_PHYS_PAGES 2
#define | _SC_OPEN_MAX 3
#define | SSIZE_MAX 0x7fffffffL
#define | chsize(file, length) _chsize(file,length)
#define | access(path, mode) _access(path,mode)
#define | chdir _chdir
#define | close _close
#define | closedir(directory) NTCloseDirectory(directory)
#define | fdopen _fdopen
#define | fileno _fileno
#define | fsync _commit
#define | ftruncate(file, length) NTFileTruncate(file,length)
#define | getcwd _getcwd
#define | getpid _getpid
#define | inline __inline
#define | isatty _isatty
#define | lt_dlclose(handle) NTCloseLibrary(handle)
#define | lt_dlerror() NTGetLibraryError()
#define | lt_dlexit() NTExitLibrary()
#define | lt_dlinit() NTInitializeLibrary()
#define | lt_dlopen(filename) NTOpenLibrary(filename)
#define | lt_dlsetsearchpath(path) NTSetSearchPath(path)
#define | lt_dlsym(handle, name) NTGetLibrarySymbol(handle,name)
#define | mkdir _mkdir
#define | mmap(address, length, protection, access, file, offset) NTMapMemory(address,length,protection,access,file,offset)
#define | msync(address, length, flags) NTSyncMemory(address,length,flags)
#define | munmap(address, length) NTUnmapMemory(address,length)
#define | opendir(directory) NTOpenDirectory(directory)
#define | open _open
#define | pclose _pclose
#define | popen _popen
#define | read _read
#define | readdir(directory) NTReadDirectory(directory)
#define | seekdir(directory, offset) NTSeekDirectory(directory,offset)
#define | setmode _setmode
#define | strcasecmp _strcmpi
#define | strncasecmp _strnicmp
#define | sysconf(name) NTSystemConfiguration(name)
#define | telldir(directory) NTTellDirectory(directory)
#define | tempnam _tempnam
#define | unlink _unlink
#define | vsnprintf _vsnprintf
#define | write _write
#define | SAFE_GLOBAL
## Typedefs
typedef struct _DIR | DIR
typedef struct _NTMEMORYSTATUSEX | NTMEMORYSTATUSEX
typedef UINT(CALLBACK * | LPFNDLLFUNC1 )(DWORD, UINT)
typedef UINT(CALLBACK * | LPFNDLLFUNC2 )(NTMEMORYSTATUSEX *)
## Functions
WizardExport char * | NTGetLastError (void)
WizardExport const char * | NTGetLibraryError (void)
WizardExport char * | NTRegistryKeyLookup (const char *)
WizardExport DIR * | NTOpenDirectory (const char *)
WizardExport double | NTElapsedTime (void)
WizardExport double | NTUserTime (void)
WizardExport int | Exit (int)
WizardExport int | gettimeofday (struct timeval *, struct timezone *)
WizardExport int | IsWindows95 ()
WizardExport int | NTCloseDirectory (DIR *)
WizardExport int | NTCloseLibrary (void *)
WizardExport int | NTControlHandler (void)
WizardExport int | NTExitLibrary (void)
WizardExport int | NTInitializeLibrary (void)
WizardExport int | NTSetSearchPath (const char *)
WizardExport int | NTSyncMemory (void *, size_t, int)
WizardExport int | NTUnmapMemory (void *, size_t)
WizardExport int | NTSystemCommand (const char *)
WizardExport ssize_t | NTSystemConfiguration (int)
WizardExport ssize_t | NTTellDirectory (DIR *)
WizardExport WizardBooleanType | NTGetExecutionPath (char *, const size_t)
WizardExport WizardBooleanType | NTGetModulePath (const char *, char *)
WizardExport WizardBooleanType | NTGatherRandomData (const size_t, unsigned char *)
WizardExport WizardBooleanType | NTReportEvent (const char *, const WizardBooleanType)
WizardExport WizardBooleanType | NTReportException (const char *, const WizardBooleanType)
WizardExport struct dirent * | NTReadDirectory (DIR *)
WizardExport unsigned char * | NTResourceToBlob (const char *)
WizardExport void | NTErrorHandler (const ExceptionType, const char *, const char *)
WizardExport void * | NTGetLibrarySymbol (void *, const char *)
WizardExport void ** | NTMapMemory (char *, size_t, int, int, int, WizardOffsetType)
WizardExport void *** | NTOpenLibrary (const char *)
WizardExport void *** | NTSeekDirectory (DIR *, ssize_t)
WizardExport void *** | NTWarningHandler (const ExceptionType, const char *, const char *)

## Define Documentation

#define _SC_OPEN_MAX 3

Referenced by ResourceComponentGenesis().

#define _SC_PAGESIZE 1

Referenced by ResourceComponentGenesis().

#define _SC_PHYS_PAGES 2

Referenced by ResourceComponentGenesis().

#define access | ( |  | path,
|  |  | mode |
| ) |  |  | _access(path,mode)

Referenced by IsAccessible(), and IsDirectory().

#define chdir _chdir

#define chsize | ( |  | file,
|  |  | length |
| ) |  |  | _chsize(file,length)

#define close _close

Referenced by AcquireFileLock(), AcquireUniqueFilename(), AcquireUniqueFileResource(), ConfigureFileToStringInfo(), DestroyFile(), DestroyFileInfo(), FileToBlob(), GenerateEntropicChaos(), and GetPhrase().

#define closedir | ( |  | directory | ) | NTCloseDirectory(directory)

#define F_OK 0

Referenced by IsAccessible().

#define fdopen _fdopen

Referenced by OpenBlob().

#define fileno _fileno

Referenced by FileToBlob(), GetBlobSize(), GetPhrase(), LogWizardEventList(), OpenBlob(), and SetBlobExtent().

#define fsync _commit

#define ftruncate | ( |  | file,
|  |  | length |
| ) |  |  | NTFileTruncate(file,length)

#define getcwd _getcwd

Referenced by GetExecutionPath().

#define getpid _getpid

Referenced by AcquireFileLock(), GenerateEntropicChaos(), GetExecutionPath(), GetPhrase(), GetWizardThreadId(), GetWizardThreadSignature(), IsWizardThreadEqual(), TranslateEvent(), and TranslateFilename().

#define inline __inline

#define isatty _isatty

#define lt_dlclose | ( |  | handle | ) | NTCloseLibrary(handle)

#define lt_dlerror | ( |  | ) | NTGetLibraryError()

#define lt_dlexit | ( |  | ) | NTExitLibrary()

#define lt_dlinit | ( |  | ) | NTInitializeLibrary()

#define lt_dlopen | ( |  | filename | ) | NTOpenLibrary(filename)

#define lt_dlsetsearchpath | ( |  | path | ) | NTSetSearchPath(path)

#define lt_dlsym | ( |  | handle,
|  |  | name |
| ) |  |  | NTGetLibrarySymbol(handle,name)

#define MAP_ANONYMOUS 0x20

#define MAP_PRIVATE 0x02

#define MAP_SHARED 0x01

#define mkdir _mkdir

Referenced by AcquireFileInfo().

#define mmap | ( |  | address,
|  |  | length,
|  |  | protection,
|  |  | access,
|  |  | file,
|  |  | offset |
| ) |  |  | NTMapMemory(address,length,protection,access,file,offset)

Referenced by MapBlob().

#define msync | ( |  | address,
|  |  | length,
|  |  | flags |
| ) |  |  | NTSyncMemory(address,length,flags)

Referenced by SyncBlob().

#define munmap | ( |  | address,
|  |  | length |
| ) |  |  | NTUnmapMemory(address,length)

Referenced by UnmapBlob().

#define open _open

Referenced by AcquireFileInfo(), AcquireFileLock(), AcquireUniqueFileResource(), ConfigureFileToStringInfo(), FileToBlob(), GenerateEntropicChaos(), and GetPhrase().

#define opendir | ( |  | directory | ) | NTOpenDirectory(directory)

#define pclose _pclose

Referenced by CloseBlob().

#define popen _popen

Referenced by OpenBlob().

#define PROT_READ 0x01

Referenced by MapBlob().

#define PROT_WRITE 0x02

#define R_OK 4

#define read _read

Referenced by ConfigureFileToStringInfo(), FileToBlob(), GetPhrase(), ReadFileChunk(), and ReadRandom().

#define readdir | ( |  | directory | ) | NTReadDirectory(directory)

#define RW_OK 6

#define SAFE_GLOBAL

#define seekdir | ( |  | directory,
|  |  | offset |
| ) |  |  | NTSeekDirectory(directory,offset)

#define setmode _setmode

Referenced by AcquireUniqueFileResource(), and OpenBlob().

#define SSIZE_MAX 0x7fffffffL

Referenced by ConfigureFileToStringInfo(), FileToBlob(), ReadBlobChunk(), and WriteBlobChunk().

#define strcasecmp _strcmpi

Referenced by ConfigureCompare(), ConfigureInfoCompare(), GetConfigureInfo(), ListConfigureInfo(), ListMimeInfo(), LocaleCompare(), MimeCompare(), and MimeInfoCompare().

#define strncasecmp _strnicmp

Referenced by LocaleNCompare().

#define sysconf | ( |  | name | ) | NTSystemConfiguration(name)

Referenced by ResourceComponentGenesis().

#define telldir | ( |  | directory | ) | NTTellDirectory(directory)

#define tempnam _tempnam

#define unlink _unlink

#define VC_EXTRALEAN

#define vsnprintf _vsnprintf

Referenced by FormatWizardStringList(), LogWizardEventList(), and ThrowWizardExceptionList().

#define W_OK 2

#define WIN32_LEAN_AND_MEAN

#define write _write

Referenced by GetPassphrase(), GetPhrase(), and WriteFileChunk().

## Typedef Documentation

typedef struct _DIR DIR

typedef UINT(CALLBACK * LPFNDLLFUNC1)(DWORD, UINT)

typedef UINT(CALLBACK * LPFNDLLFUNC2)(NTMEMORYSTATUSEX *)

typedef struct _NTMEMORYSTATUSEX NTMEMORYSTATUSEX

## Function Documentation

WizardExport int Exit | ( | int |  | ) |

WizardExport int gettimeofday | ( | struct timeval * | ,
|  | struct timezone * |  |
| ) |  |  |

Referenced by GenerateEntropicChaos().

WizardExport int IsWindows95 | ( |  | ) |

WizardExport int NTCloseDirectory | ( | DIR * |  | ) |

WizardExport int NTCloseLibrary | ( | void * |  | ) |

WizardExport int NTControlHandler | ( | void |  | ) |

WizardExport double NTElapsedTime | ( | void |  | ) |

Referenced by ElapsedTime(), and GenerateEntropicChaos().

WizardExport void NTErrorHandler | ( | const | ExceptionType,
|  | const char * | ,
|  | const char * |  |
| ) |  |  |

WizardExport int NTExitLibrary | ( | void |  | ) |

WizardExport WizardBooleanType NTGatherRandomData | ( | const | size_t,
|  | unsigned char * |  |
| ) |  |  |

Referenced by GenerateEntropicChaos().

WizardExport WizardBooleanType NTGetExecutionPath | ( | char * | ,
|  | const | size_t |
| ) |  |  |

Referenced by GetExecutionPath().

WizardExport char* NTGetLastError | ( | void |  | ) |

WizardExport const char* NTGetLibraryError | ( | void |  | ) |

WizardExport void * NTGetLibrarySymbol | ( | void * | ,
|  | const char * |  |
| ) |  |  |

WizardExport WizardBooleanType NTGetModulePath | ( | const char * | ,
|  | char * |  |
| ) |  |  |

Referenced by GetConfigurePaths().

WizardExport int NTInitializeLibrary | ( | void |  | ) |

WizardExport void * * NTMapMemory | ( | char * | ,
|  | size_t | ,
|  | int | ,
|  | int | ,
|  | int | ,
|  | WizardOffsetType |  |
| ) |  |  |

WizardExport DIR* NTOpenDirectory | ( | const char * |  | ) |

WizardExport void * * * NTOpenLibrary | ( | const char * |  | ) |

WizardExport struct dirent* NTReadDirectory | ( | DIR * |  | ) | `[read]`

WizardExport char* NTRegistryKeyLookup | ( | const char * |  | ) |

Referenced by GetConfigurePaths().

WizardExport WizardBooleanType NTReportEvent | ( | const char * | ,
|  | const | WizardBooleanType |
| ) |  |  |

Referenced by LogWizardEventList().

WizardExport WizardBooleanType NTReportException | ( | const char * | ,
|  | const | WizardBooleanType |
| ) |  |  |

WizardExport unsigned char* NTResourceToBlob | ( | const char * |  | ) |

Referenced by GetConfigureOptions().

WizardExport void * * * NTSeekDirectory | ( | DIR * | ,
|  | ssize_t |  |
| ) |  |  |

WizardExport int NTSetSearchPath | ( | const char * |  | ) |

WizardExport int NTSyncMemory | ( | void * | ,
|  | size_t | ,
|  | int |  |
| ) |  |  |

WizardExport int NTSystemCommand | ( | const char * |  | ) |

WizardExport ssize_t NTSystemConfiguration | ( | int |  | ) |

WizardExport ssize_t NTTellDirectory | ( | DIR * |  | ) |

WizardExport int NTUnmapMemory | ( | void * | ,
|  | size_t |  |
| ) |  |  |

WizardExport double NTUserTime | ( | void |  | ) |

Referenced by GenerateEntropicChaos(), and UserTime().

WizardExport void * * * NTWarningHandler | ( | const | ExceptionType,
|  | const char * | ,
|  | const char * |  |
| ) |  |  |