FreeRDP
nt.c File Reference
#include <winpr/crt.h>
#include <winpr/library.h>
#include <winpr/wlog.h>
#include <winpr/nt.h>
#include <winpr/endian.h>
#include "../log.h"
#include <pthread.h>
#include "../handle/handle.h"

Macros

#define TAG   WINPR_TAG("nt")
 

Functions

VOID _InitializeObjectAttributes (POBJECT_ATTRIBUTES InitializedAttributes, PUNICODE_STRING ObjectName, ULONG Attributes, HANDLE RootDirectory, PSECURITY_DESCRIPTOR SecurityDescriptor)
 
static void _TebDestruct (void *teb)
 
static void _TebInitOnce (void)
 
PTEB NtCurrentTeb (void)
 
VOID _RtlInitAnsiString (PANSI_STRING DestinationString, PCSZ SourceString)
 
VOID _RtlInitUnicodeString (PUNICODE_STRING DestinationString, PCWSTR SourceString)
 
NTSTATUS _RtlAnsiStringToUnicodeString (PUNICODE_STRING DestinationString, PCANSI_STRING SourceString, BOOLEAN AllocateDestinationString)
 
VOID _RtlFreeUnicodeString (PUNICODE_STRING UnicodeString)
 
ULONG _RtlNtStatusToDosError (NTSTATUS status)
 
NTSTATUS _NtCreateFile (PHANDLE FileHandle, ACCESS_MASK DesiredAccess, POBJECT_ATTRIBUTES ObjectAttributes, PIO_STATUS_BLOCK IoStatusBlock, PLARGE_INTEGER AllocationSize, ULONG FileAttributes, ULONG ShareAccess, ULONG CreateDisposition, ULONG CreateOptions, PVOID EaBuffer, ULONG EaLength)
 
NTSTATUS _NtOpenFile (PHANDLE FileHandle, ACCESS_MASK DesiredAccess, POBJECT_ATTRIBUTES ObjectAttributes, PIO_STATUS_BLOCK IoStatusBlock, ULONG ShareAccess, ULONG OpenOptions)
 
NTSTATUS _NtReadFile (HANDLE FileHandle, HANDLE Event, PIO_APC_ROUTINE ApcRoutine, PVOID ApcContext, PIO_STATUS_BLOCK IoStatusBlock, PVOID Buffer, ULONG Length, PLARGE_INTEGER ByteOffset, PULONG Key)
 
NTSTATUS _NtWriteFile (HANDLE FileHandle, HANDLE Event, PIO_APC_ROUTINE ApcRoutine, PVOID ApcContext, PIO_STATUS_BLOCK IoStatusBlock, PVOID Buffer, ULONG Length, PLARGE_INTEGER ByteOffset, PULONG Key)
 
NTSTATUS _NtDeviceIoControlFile (HANDLE FileHandle, HANDLE Event, PIO_APC_ROUTINE ApcRoutine, PVOID ApcContext, PIO_STATUS_BLOCK IoStatusBlock, ULONG IoControlCode, PVOID InputBuffer, ULONG InputBufferLength, PVOID OutputBuffer, ULONG OutputBufferLength)
 
NTSTATUS _NtClose (HANDLE Handle)
 
NTSTATUS _NtWaitForSingleObject (HANDLE Handle, BOOLEAN Alertable, PLARGE_INTEGER Timeout)
 

Variables

static pthread_once_t _TebOnceControl = PTHREAD_ONCE_INIT
 
static pthread_key_t _TebKey
 

Macro Definition Documentation

#define TAG   WINPR_TAG("nt")

WinPR: Windows Portable Runtime Windows Native System Services

Copyright 2013 Marc-Andre Moreau marca.nosp@m.ndre.nosp@m..more.nosp@m.au@g.nosp@m.mail..nosp@m.com Copyright 2013 Thincast Technologies GmbH Copyright 2013 Norbert Federa norbe.nosp@m.rt.f.nosp@m.edera.nosp@m.@thi.nosp@m.ncast.nosp@m..com

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Function Documentation

VOID _InitializeObjectAttributes ( POBJECT_ATTRIBUTES  InitializedAttributes,
PUNICODE_STRING  ObjectName,
ULONG  Attributes,
HANDLE  RootDirectory,
PSECURITY_DESCRIPTOR  SecurityDescriptor 
)

NtXxx Routines: http://msdn.microsoft.com/en-us/library/windows/hardware/ff557720/ InitializeObjectAttributes macro http://msdn.microsoft.com/en-us/library/windows/hardware/ff547804/

Here is the caller graph for this function:

NTSTATUS _NtClose ( HANDLE  Handle)

NtClose function: http://msdn.microsoft.com/en-us/library/ms648410/

Here is the caller graph for this function:

NTSTATUS _NtCreateFile ( PHANDLE  FileHandle,
ACCESS_MASK  DesiredAccess,
POBJECT_ATTRIBUTES  ObjectAttributes,
PIO_STATUS_BLOCK  IoStatusBlock,
PLARGE_INTEGER  AllocationSize,
ULONG  FileAttributes,
ULONG  ShareAccess,
ULONG  CreateDisposition,
ULONG  CreateOptions,
PVOID  EaBuffer,
ULONG  EaLength 
)

NtCreateFile function: http://msdn.microsoft.com/en-us/library/bb432380/

Here is the caller graph for this function:

NTSTATUS _NtDeviceIoControlFile ( HANDLE  FileHandle,
HANDLE  Event,
PIO_APC_ROUTINE  ApcRoutine,
PVOID  ApcContext,
PIO_STATUS_BLOCK  IoStatusBlock,
ULONG  IoControlCode,
PVOID  InputBuffer,
ULONG  InputBufferLength,
PVOID  OutputBuffer,
ULONG  OutputBufferLength 
)

NtDeviceIoControlFile function: http://msdn.microsoft.com/en-us/library/ms648411/

Here is the caller graph for this function:

NTSTATUS _NtOpenFile ( PHANDLE  FileHandle,
ACCESS_MASK  DesiredAccess,
POBJECT_ATTRIBUTES  ObjectAttributes,
PIO_STATUS_BLOCK  IoStatusBlock,
ULONG  ShareAccess,
ULONG  OpenOptions 
)

NtOpenFile function: http://msdn.microsoft.com/en-us/library/bb432381/

Here is the caller graph for this function:

NTSTATUS _NtReadFile ( HANDLE  FileHandle,
HANDLE  Event,
PIO_APC_ROUTINE  ApcRoutine,
PVOID  ApcContext,
PIO_STATUS_BLOCK  IoStatusBlock,
PVOID  Buffer,
ULONG  Length,
PLARGE_INTEGER  ByteOffset,
PULONG  Key 
)

NtReadFile function: http://msdn.microsoft.com/en-us/library/windows/hardware/ff567072/

Here is the caller graph for this function:

NTSTATUS _NtWaitForSingleObject ( HANDLE  Handle,
BOOLEAN  Alertable,
PLARGE_INTEGER  Timeout 
)

NtWaitForSingleObject function: http://msdn.microsoft.com/en-us/library/ms648412/

Here is the call graph for this function:

Here is the caller graph for this function:

NTSTATUS _NtWriteFile ( HANDLE  FileHandle,
HANDLE  Event,
PIO_APC_ROUTINE  ApcRoutine,
PVOID  ApcContext,
PIO_STATUS_BLOCK  IoStatusBlock,
PVOID  Buffer,
ULONG  Length,
PLARGE_INTEGER  ByteOffset,
PULONG  Key 
)

NtWriteFile function: http://msdn.microsoft.com/en-us/library/windows/hardware/ff567121/

Here is the caller graph for this function:

NTSTATUS _RtlAnsiStringToUnicodeString ( PUNICODE_STRING  DestinationString,
PCANSI_STRING  SourceString,
BOOLEAN  AllocateDestinationString 
)

RtlAnsiStringToUnicodeString function: http://msdn.microsoft.com/en-us/library/ms648413/

Here is the caller graph for this function:

VOID _RtlFreeUnicodeString ( PUNICODE_STRING  UnicodeString)

RtlFreeUnicodeString function: http://msdn.microsoft.com/en-us/library/ms648418/

Here is the caller graph for this function:

VOID _RtlInitAnsiString ( PANSI_STRING  DestinationString,
PCSZ  SourceString 
)

RtlInitAnsiString routine: http://msdn.microsoft.com/en-us/library/windows/hardware/ff561918/

Here is the caller graph for this function:

VOID _RtlInitUnicodeString ( PUNICODE_STRING  DestinationString,
PCWSTR  SourceString 
)

RtlInitUnicodeString routine: http://msdn.microsoft.com/en-us/library/windows/hardware/ff561934/

Here is the call graph for this function:

Here is the caller graph for this function:

ULONG _RtlNtStatusToDosError ( NTSTATUS  status)

RtlNtStatusToDosError function: http://msdn.microsoft.com/en-us/library/windows/desktop/ms680600/

Here is the caller graph for this function:

static void _TebDestruct ( void teb)
static

Here is the caller graph for this function:

static void _TebInitOnce ( void  )
static

Here is the call graph for this function:

Here is the caller graph for this function:

PTEB NtCurrentTeb ( void  )

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

pthread_key_t _TebKey
static
pthread_once_t _TebOnceControl = PTHREAD_ONCE_INIT
static