프로퍼티 | 타입 | 설명 | |
---|---|---|---|
INVALID_HANDLE_VALUE |
메소드 | 설명 | |
---|---|---|
FormatMessage ( FormatMessageFlags dwFlags, void lpSource, int dwMessageId, int dwLanguageId, |
Formats a message string. The function requires a message definition as input. The message definition can come from a buffer passed into the function. It can come from a message table resource in an already-loaded module. Or the caller can ask the function to search the system's message table resource(s) for the message definition. The function finds the message definition in a message table resource based on a message identifier and a language identifier. The function copies the formatted message text to an output buffer, processing any embedded insert sequences if requested.
|
|
GetLastError ( ) : Win32ErrorCode |
Returns the error code returned by the last unmanaged function that was called using platform invoke that has the DllImportAttribute.SetLastError flag set. This method exists because it is not safe to make a direct platform invoke call to GetLastError to obtain this information. If you want to access this error code, you must call GetLastError instead of writing your own platform invoke definition for GetLastError and calling it. The common language runtime can make internal calls to APIs that overwrite the GetLastError maintained by the operating system. You can use this method to obtain error codes only if you apply the DllImportAttribute to the method signature and set the DllImportAttribute.SetLastError field to true. The process for this varies depending upon the source language used: C# and C++ are false by default, but the Declare statement in Visual Basic is true. |
|
IsWow64Process ( SafeObjectHandle hProcess ) : bool | ||
LocalAlloc ( LocalAllocFlags uFlags, int uBytes ) : void* |
Allocates the specified number of bytes from the heap.
|
|
LocalReAlloc ( void hMem, int uBytes, LocalReAllocFlags uFlags ) : void* |
Changes the size or the attributes of a specified local memory object. The size can increase or decrease. If LocalReAlloc fails, the original memory is not freed, and the original handle and pointer are still valid. If LocalReAlloc reallocates a fixed object, the value of the handle returned is the address of the first byte of the memory block. To access the memory, a process can simply cast the return value to a pointer. |
|
MAKELANGID ( LANGID ePrimaryLanguage, LANGID eSubLanguage ) : LANGID |
Creates a language identifier from a primary language identifier and a sublanguage identifier.
|
|
MAKELANGID ( ushort usPrimaryLanguage, ushort usSubLanguage ) : LANGID |
Creates a language identifier from a primary language identifier and a sublanguage identifier.
|
|
Module32Enumerate ( SafeObjectHandle hSnapshot ) : IEnumerable |
Retrieves information about next module encountered in a system snapshot.
|
|
Module32First ( SafeObjectHandle hSnapshot ) : MODULEENTRY32? |
Retrieves information about the first module encountered in a system snapshot.
|
|
Module32Next ( SafeObjectHandle hSnapshot ) : MODULEENTRY32? |
Retrieves information about the next module encountered in a system snapshot.
|
|
Process32Enumerate ( SafeObjectHandle hSnapshot ) : IEnumerable |
Retrieves information about next process encountered in a system snapshot.
|
|
Process32First ( SafeObjectHandle hSnapshot ) : PROCESSENTRY32? |
Retrieves information about the first process encountered in a system snapshot.
|
|
Process32Next ( SafeObjectHandle hSnapshot ) : PROCESSENTRY32? |
Retrieves information about the next process encountered in a system snapshot.
|
|
QueryFullProcessImageName ( SafeObjectHandle hProcess, QueryFullProcessImageNameFlags dwFlags = QueryFullProcessImageNameFlags.None ) : string | ||
ReadFile ( SafeObjectHandle hFile, int nNumberOfBytesToRead ) : ArraySegment |
Reads data synchronously from the specified file or input/output (I/O) device.
|
|
ReadFile ( SafeObjectHandle hFile, ArraySegment |
Reads data synchronously from the specified file or input/output (I/O) device.
|
|
ReadFile ( SafeObjectHandle hFile, void lpBuffer, int nNumberOfBytesToRead ) : int |
Reads data synchronously from the specified file or input/output (I/O) device.
|
|
WriteFile ( SafeObjectHandle hFile, ArraySegment |
Writes data synchronously to the specified file or input/output (I/O) device.
|
|
WriteFile ( SafeObjectHandle hFile, void lpBuffer, int nNumberOfBytesToWrite ) : int |
Writes data synchronously to the specified file or input/output (I/O) device.
|
메소드 | 설명 | |
---|---|---|
CancelIoEx ( SafeObjectHandle hFile, OVERLAPPED lpOverlapped ) : bool | ||
CloseHandle ( |
||
CreateMutex ( [ lpMutexAttributes, [ bInitialOwner, string lpName ) : SafeObjectHandle | ||
DeviceIoControl ( SafeObjectHandle hDevice, int dwIoControlCode, void inBuffer, int nInBufferSize, void outBuffer, int nOutBufferSize, int &pBytesReturned, OVERLAPPED lpOverlapped ) : bool | ||
FindClose ( |
||
FindFirstFileEx ( string lpFileName, FINDEX_INFO_LEVELS fInfoLevelId, WIN32_FIND_DATA &lpFindFileData, FINDEX_SEARCH_OPS fSearchOp, void lpSearchFilter, FindFirstFileExFlags dwAdditionalFlags ) : SafeFindFilesHandle | ||
FlushFileBuffers ( SafeObjectHandle hFile ) : bool | ||
FormatMessage ( FormatMessageFlags dwFlags, void lpSource, int dwMessageId, int dwLanguageId, StringBuilder lpBuffer, int nSize, |
||
FreeLibrary ( |
||
GetCurrentProcess ( ) : SafeObjectHandle | ||
GetCurrentProcessId ( ) : int | ||
GetCurrentThreadId ( ) : int | ||
GetProcAddress ( SafeLibraryHandle hModule, string procName ) : |
||
GetSystemTime ( [ lpSystemTime ) : void | ||
GetTickCount ( ) : uint | ||
GetTickCount64 ( ) : ulong | ||
LoadResource ( SafeLibraryHandle hModule, |
||
LockResource ( |
||
ReadFile ( SafeObjectHandle hFile, void lpBuffer, int nNumberOfBytesToRead, [ lpNumberOfBytesRead, OVERLAPPED lpOverlapped ) : bool | ||
ResumeThread ( SafeObjectHandle hThread ) : int | ||
SetSystemTime ( [ lpSystemTime ) : bool | ||
SuspendThread ( SafeObjectHandle hThread ) : int | ||
TryGetErrorMessage ( FormatMessageFlags flags, void source, int messageId, int languageId, StringBuilder sb, IntPtr arguments, string &errorMsg ) : bool |
Tries to get the error message text using the supplied buffer.
|
|
WaitForSingleObject ( SafeHandle hHandle, int dwMilliseconds ) : WaitForSingleObjectResult | ||
WriteFile ( SafeObjectHandle hFile, void lpBuffer, int nNumberOfBytesToWrite, [ lpNumberOfBytesWritten, OVERLAPPED lpOverlapped ) : bool |
public static FormatMessage ( FormatMessageFlags dwFlags, void lpSource, int dwMessageId, int dwLanguageId, |
||
dwFlags | FormatMessageFlags |
/// The formatting options, and how to interpret the lpSource parameter. The low-order byte of dwFlags specifies how the function handles line breaks in the output buffer. The low-order byte can also specify the maximum width of a formatted output line.
/// The |
lpSource | void |
/// The location of the message definition. The type of this parameter depends upon the settings in the |
dwMessageId | int |
/// The message identifier for the requested message. This parameter is ignored if dwFlags includes |
dwLanguageId | int |
/// The language identifier for the requested message. This parameter is ignored if dwFlags includes |
Arguments | /// An array of values that are used as insert values in the formatted message. A %1 in the format string indicates the first value in the Arguments array; a %2 indicates the second argument; and so on. /// The interpretation of each value depends on the formatting information associated with the insert in the message definition.The default is to treat each value as a pointer to a null-terminated string. /// By default, the Arguments parameter is of type va_list*, which is a language- and implementation-specific data type for describing a variable number of arguments.The state of the va_list argument is undefined upon return from the function.To use the va_list again, destroy the variable argument list pointer using va_end and reinitialize it with va_start. /// If you do not have a pointer of type va_list*, then specify the FORMAT_MESSAGE_ARGUMENT_ARRAY flag and pass a pointer to an array of DWORD_PTR values; those values are input to the message formatted as the insert values.Each insert must have a corresponding element in the array. /// | |
maxAllowedBufferSize | int | The maximum size of the returned string. If exceeded, |
리턴 | string |
public static IsWow64Process ( SafeObjectHandle hProcess ) : bool | ||
hProcess | SafeObjectHandle | |
리턴 | bool |
public static LocalAlloc ( LocalAllocFlags uFlags, int uBytes ) : void* | ||
uFlags | LocalAllocFlags |
/// The memory allocation attributes. The default is the |
uBytes | int | The number of bytes to allocate. If this parameter is zero and the |
리턴 | void* |
public static LocalReAlloc ( void hMem, int uBytes, LocalReAllocFlags uFlags ) : void* | ||
hMem | void | A handle to the local memory object to be reallocated. This handle is returned by either the |
uBytes | int | The new size of the memory block, in bytes. If uFlags specifies |
uFlags | LocalReAllocFlags |
/// The reallocation options. If |
리턴 | void* |
public static MAKELANGID ( LANGID ePrimaryLanguage, LANGID eSubLanguage ) : LANGID | ||
ePrimaryLanguage | LANGID | /// Primary language identifier. This identifier can be a predefined value or a value for a user-defined primary /// language. For a user-defined language, the identifier is a value in the range 0x0200 to 0x03FF. All other /// values are reserved for operating system use. For more information, see Language Identifier Constants and /// Strings. /// |
eSubLanguage | LANGID | /// Sublanguage identifier. This parameter can be a predefined sublanguage identifier or a user-defined /// sublanguage. For a user-defined sublanguage, the identifier is a value in the range 0x20 to 0x3F. All other /// values are reserved for operating system use. For more information, see Language Identifier Constants and /// Strings. /// |
리턴 | LANGID |
public static MAKELANGID ( ushort usPrimaryLanguage, ushort usSubLanguage ) : LANGID | ||
usPrimaryLanguage | ushort | /// Primary language identifier. This identifier can be a predefined value or a value for a user-defined primary /// language. For a user-defined language, the identifier is a value in the range 0x0200 to 0x03FF. All other /// values are reserved for operating system use. For more information, see Language Identifier Constants and /// Strings. /// |
usSubLanguage | ushort | /// Sublanguage identifier. This parameter can be a predefined sublanguage identifier or a user-defined /// sublanguage. For a user-defined sublanguage, the identifier is a value in the range 0x20 to 0x3F. All other /// values are reserved for operating system use. For more information, see Language Identifier Constants and /// Strings. /// |
리턴 | LANGID |
public static Module32Enumerate ( SafeObjectHandle hSnapshot ) : IEnumerable |
||
hSnapshot | SafeObjectHandle |
/// A handle to the snapshot returned from a previous call to the
/// |
리턴 | IEnumerable |
public static Module32First ( SafeObjectHandle hSnapshot ) : MODULEENTRY32? | ||
hSnapshot | SafeObjectHandle |
/// A handle to the snapshot returned from a previous call to the
/// |
리턴 | MODULEENTRY32? |
public static Module32Next ( SafeObjectHandle hSnapshot ) : MODULEENTRY32? | ||
hSnapshot | SafeObjectHandle |
/// A handle to the snapshot returned from a previous call to the
/// |
리턴 | MODULEENTRY32? |
public static Process32Enumerate ( SafeObjectHandle hSnapshot ) : IEnumerable |
||
hSnapshot | SafeObjectHandle |
/// A handle to the snapshot returned from a previous call to the
/// |
리턴 | IEnumerable |
public static Process32First ( SafeObjectHandle hSnapshot ) : PROCESSENTRY32? | ||
hSnapshot | SafeObjectHandle |
/// A handle to the snapshot returned from a previous call to the
/// |
리턴 | PROCESSENTRY32? |
public static Process32Next ( SafeObjectHandle hSnapshot ) : PROCESSENTRY32? | ||
hSnapshot | SafeObjectHandle |
/// A handle to the snapshot returned from a previous call to the
/// |
리턴 | PROCESSENTRY32? |
public static QueryFullProcessImageName ( SafeObjectHandle hProcess, QueryFullProcessImageNameFlags dwFlags = QueryFullProcessImageNameFlags.None ) : string | ||
hProcess | SafeObjectHandle | |
dwFlags | QueryFullProcessImageNameFlags | |
리턴 | string |
public static ReadFile ( SafeObjectHandle hFile, int nNumberOfBytesToRead ) : ArraySegment |
||
hFile | SafeObjectHandle |
/// A handle to the device (for example, a file, file stream, physical disk, volume, console buffer,
/// tape drive, socket, communications resource, mailslot, or pipe).
/// |
nNumberOfBytesToRead | int | The maximum number of bytes to be read. |
리턴 | ArraySegment |
public static ReadFile ( SafeObjectHandle hFile, ArraySegment |
||
hFile | SafeObjectHandle |
/// A handle to the device (for example, a file, file stream, physical disk, volume, console buffer,
/// tape drive, socket, communications resource, mailslot, or pipe).
/// |
lpBuffer | ArraySegment |
A buffer that receives the data read from a file or device. |
리턴 | int |
public static ReadFile ( SafeObjectHandle hFile, void lpBuffer, int nNumberOfBytesToRead ) : int | ||
hFile | SafeObjectHandle |
/// A handle to the device (for example, a file, file stream, physical disk, volume, console buffer,
/// tape drive, socket, communications resource, mailslot, or pipe).
/// |
lpBuffer | void | A pointer to the buffer that receives the data read from a file or device. |
nNumberOfBytesToRead | int | The maximum number of bytes to be read. |
리턴 | int |
public static WriteFile ( SafeObjectHandle hFile, ArraySegment |
||
hFile | SafeObjectHandle |
/// A handle to the file or I/O device (for example, a file, file stream, physical disk, volume, console buffer, tape
/// drive, socket, communications resource, mailslot, or pipe).
/// |
lpBuffer | ArraySegment |
The buffer containing the data to be written to the file or device. |
리턴 | int |
public static WriteFile ( SafeObjectHandle hFile, void lpBuffer, int nNumberOfBytesToWrite ) : int | ||
hFile | SafeObjectHandle |
/// A handle to the file or I/O device (for example, a file, file stream, physical disk, volume, console buffer, tape
/// drive, socket, communications resource, mailslot, or pipe).
/// |
lpBuffer | void | A pointer to the buffer containing the data to be written to the file or device. |
nNumberOfBytesToWrite | int |
/// The number of bytes to be written to the file or device.
/// |
리턴 | int |