Professional Documents
Culture Documents
Windows System Calls
Windows System Calls
ReadConsole reads keyboard input from a console's input buffer. It behaves like
the ReadFile function, except that it can read in either Unicode (wide-
character) or ANSI mode. To have applications that maintain a single set of
sources compatible with both modes, use ReadConsole rather than ReadFile.
Although ReadConsole can only be used with a console input buffer handle,
ReadFile can be used with other handles (such as files or pipes). ReadConsole
fails if used with a standard handle that has been redirected to be something
other than a console handle.
DWORD GetCurrentProcessId();
UINT_PTR SetTimer(
HWND hWnd,
UINT_PTR nIDEvent,
UINT uElapse,
TIMERPROC lpTimerFunc
);
Type: UINT_PTR
If the function succeeds and the hWnd parameter is NULL, the return value is an integer identifying
the new timer.If the function succeeds and the hWnd parameter is not NULL, then the return value
is a nonzero integer.Creates a timer with the specified time-out value.An application can process
WM_TIMER messages by including a WM_TIMER case statement in the window procedure or by
specifying a TimerProc callback function when creating the timer.
BOOL CreatePipe(
PHANDLE hReadPipe,
PHANDLE hWritePipe,
LPSECURITY_ATTRIBUTES lpPipeAttributes,
DWORD nSize
);
If the function succeeds, the return value is nonzero.If the function fails, the return value is
zero.Creates an anonymous pipe, and returns handles to the read and write ends of the
pipe.CreatePipe creates the pipe, assigning the specified pipe size to the storage buffer. CreatePipe
also creates handles that the process uses to read from and write to the buffer.
LPVOID MapViewOfFile(
HANDLE hFileMappingObject,
DWORD dwDesiredAccess,
DWORD dwFileOffsetHigh,
DWORD dwFileOffsetLow,
SIZE_T dwNumberOfBytesToMap
);
HANDLE CreateFileMappingA(
HANDLE hFile,
LPSECURITY_ATTRIBUTES lpFileMappingAttributes,
DWORD flProtect,
DWORD dwMaximumSizeHigh,
DWORD dwMaximumSizeLow,
LPCSTR lpName
);
If the function succeeds, the return value is a handle to the newly created file mapping object.If the
function fails, the return value is NULL.Creates or opens a named or unnamed file mapping object
for a specified file.After a file mapping object is created, the size of the file must not exceed the size
of the file mapping object; if it does, not all of the file contents are available for sharing.
BOOL SetFileSecurityA(
LPCSTR lpFileName,
SECURITY_INFORMATION SecurityInformation,
PSECURITY_DESCRIPTOR pSecurityDescriptor
);
If the function succeeds, the function returns nonzero.If the function fails, it
returns zero. The SetFileSecurity function sets the security of a file or directory object.
BOOL InitializeSecurityDescriptor(
PSECURITY_DESCRIPTOR pSecurityDescriptor,
DWORD dwRevision
);
If the function succeeds, the function returns nonzero.If the function
fails, it returns zero.The InitializeSecurityDescriptor function initializes
a security descriptor in absolute format, rather than self-
relative format.The InitializeSecurityDescriptor function
initializes a new security descriptor.The
InitializeSecurityDescriptor function initializes a security
descriptor in absolute format, rather than self-relative format.It
initializes a security descriptor to have no system access control list (SACL), no discretionary
access control list (DACL), no owner, no primary group, and all control flags set to FALSE
(NULL). Thus, except for its revision level, it is empty.
uint32 SetSecurityDescriptor(
Descriptor [in]