C# Class Interop

Datei anzeigen Open project: dotnet/corefx Class Usage Examples

Public Methods

Method Description
CheckForAvailableVirtualMemory ( ulong nativeSize ) : void
CreateFileMapping ( IntPtr hFile, Kernel32 &securityAttributes, int pageProtection, long maximumSize, string name ) : SafeMemoryMappedFileHandle
CreateFileMapping ( IntPtr hFile, mincore &securityAttributes, int pageProtection, long maximumSize, string name ) : SafeMemoryMappedFileHandle
CreateFileMapping ( SafeFileHandle, hFile, Kernel32 &securityAttributes, int pageProtection, long maximumSize, string name ) : SafeMemoryMappedFileHandle
CreateFileMapping ( SafeFileHandle, hFile, mincore &securityAttributes, int pageProtection, long maximumSize, string name ) : SafeMemoryMappedFileHandle
MapViewOfFile ( SafeMemoryMappedFileHandle hFileMappingObject, int desiredAccess, long fileOffset, UIntPtr numberOfBytesToMap ) : SafeMemoryMappedViewHandle
OpenFileMapping ( int desiredAccess, bool inheritHandle, string name ) : SafeMemoryMappedFileHandle
VirtualAlloc ( SafeHandle baseAddress, UIntPtr size, int allocationType, int protection ) : IntPtr

Private Methods

Method Description
HRESULT_FROM_WIN32 ( int errorCode ) : int
MapSecurityStatus ( uint statusCode ) : string
SplitLong ( long number, int &high, int &low ) : void

Method Details

CheckForAvailableVirtualMemory() public static method

public static CheckForAvailableVirtualMemory ( ulong nativeSize ) : void
nativeSize ulong
return void

CreateFileMapping() public static method

public static CreateFileMapping ( IntPtr hFile, Kernel32 &securityAttributes, int pageProtection, long maximumSize, string name ) : SafeMemoryMappedFileHandle
hFile IntPtr
securityAttributes Kernel32
pageProtection int
maximumSize long
name string
return SafeMemoryMappedFileHandle

CreateFileMapping() public static method

public static CreateFileMapping ( IntPtr hFile, mincore &securityAttributes, int pageProtection, long maximumSize, string name ) : SafeMemoryMappedFileHandle
hFile IntPtr
securityAttributes mincore
pageProtection int
maximumSize long
name string
return SafeMemoryMappedFileHandle

CreateFileMapping() public static method

public static CreateFileMapping ( SafeFileHandle, hFile, Kernel32 &securityAttributes, int pageProtection, long maximumSize, string name ) : SafeMemoryMappedFileHandle
hFile SafeFileHandle,
securityAttributes Kernel32
pageProtection int
maximumSize long
name string
return SafeMemoryMappedFileHandle

CreateFileMapping() public static method

public static CreateFileMapping ( SafeFileHandle, hFile, mincore &securityAttributes, int pageProtection, long maximumSize, string name ) : SafeMemoryMappedFileHandle
hFile SafeFileHandle,
securityAttributes mincore
pageProtection int
maximumSize long
name string
return SafeMemoryMappedFileHandle

MapViewOfFile() public static method

public static MapViewOfFile ( SafeMemoryMappedFileHandle hFileMappingObject, int desiredAccess, long fileOffset, UIntPtr numberOfBytesToMap ) : SafeMemoryMappedViewHandle
hFileMappingObject SafeMemoryMappedFileHandle
desiredAccess int
fileOffset long
numberOfBytesToMap UIntPtr
return SafeMemoryMappedViewHandle

OpenFileMapping() public static method

public static OpenFileMapping ( int desiredAccess, bool inheritHandle, string name ) : SafeMemoryMappedFileHandle
desiredAccess int
inheritHandle bool
name string
return SafeMemoryMappedFileHandle

VirtualAlloc() public static method

public static VirtualAlloc ( SafeHandle baseAddress, UIntPtr size, int allocationType, int protection ) : IntPtr
baseAddress SafeHandle
size UIntPtr
allocationType int
protection int
return IntPtr