windows.ch
Declarations
Returns
The calling thread's last-error code.
Parameters
- dwErrCode The new error code.
Parameters
- lpFileName Path to file or device. @param dwDesiredAccess Access mode flags. @param dwShareMode Share mode flags. @param lpSecurityAttributes Optional security attributes. @param dwCreationDisposition Action to take on files that exist or do not exist. @param dwFlagsAndAttributes File attributes and flags. @param hTemplateFile Handle to template file. @return Handle to the file or device, or INVALID_HANDLE_VALUE on error.
- dwDesiredAccess Access mode flags. @param dwShareMode Share mode flags. @param lpSecurityAttributes Optional security attributes. @param dwCreationDisposition Action to take on files that exist or do not exist. @param dwFlagsAndAttributes File attributes and flags. @param hTemplateFile Handle to template file. @return Handle to the file or device, or INVALID_HANDLE_VALUE on error.
- dwShareMode Share mode flags. @param lpSecurityAttributes Optional security attributes. @param dwCreationDisposition Action to take on files that exist or do not exist. @param dwFlagsAndAttributes File attributes and flags. @param hTemplateFile Handle to template file. @return Handle to the file or device, or INVALID_HANDLE_VALUE on error.
- lpSecurityAttributes Optional security attributes. @param dwCreationDisposition Action to take on files that exist or do not exist. @param dwFlagsAndAttributes File attributes and flags. @param hTemplateFile Handle to template file. @return Handle to the file or device, or INVALID_HANDLE_VALUE on error.
- dwCreationDisposition Action to take on files that exist or do not exist. @param dwFlagsAndAttributes File attributes and flags. @param hTemplateFile Handle to template file. @return Handle to the file or device, or INVALID_HANDLE_VALUE on error.
- dwFlagsAndAttributes File attributes and flags. @param hTemplateFile Handle to template file. @return Handle to the file or device, or INVALID_HANDLE_VALUE on error.
- hTemplateFile Handle to template file. @return Handle to the file or device, or INVALID_HANDLE_VALUE on error.
Returns
Handle to the file or device, or INVALID_HANDLE_VALUE on error.
Parameters
- hFile Handle to file. @param lpBuffer Buffer to receive data. @param nNumberOfBytesToRead Number of bytes to read. @param lpNumberOfBytesRead Out param for number of bytes read. @param lpOverlapped Optional overlapped structure. @return Nonzero on success, zero on failure.
- lpBuffer Buffer to receive data. @param nNumberOfBytesToRead Number of bytes to read. @param lpNumberOfBytesRead Out param for number of bytes read. @param lpOverlapped Optional overlapped structure. @return Nonzero on success, zero on failure.
- nNumberOfBytesToRead Number of bytes to read. @param lpNumberOfBytesRead Out param for number of bytes read. @param lpOverlapped Optional overlapped structure. @return Nonzero on success, zero on failure.
- lpNumberOfBytesRead Out param for number of bytes read. @param lpOverlapped Optional overlapped structure. @return Nonzero on success, zero on failure.
- lpOverlapped Optional overlapped structure. @return Nonzero on success, zero on failure.
Returns
Nonzero on success, zero on failure.
Parameters
- hFile Handle to file. @param lpBuffer Buffer containing data to write. @param nNumberOfBytesToWrite Number of bytes to write. @param lpNumberOfBytesWritten Out param for number of bytes written. @param lpOverlapped Optional overlapped structure. @return Nonzero on success, zero on failure.
- lpBuffer Buffer containing data to write. @param nNumberOfBytesToWrite Number of bytes to write. @param lpNumberOfBytesWritten Out param for number of bytes written. @param lpOverlapped Optional overlapped structure. @return Nonzero on success, zero on failure.
- nNumberOfBytesToWrite Number of bytes to write. @param lpNumberOfBytesWritten Out param for number of bytes written. @param lpOverlapped Optional overlapped structure. @return Nonzero on success, zero on failure.
- lpNumberOfBytesWritten Out param for number of bytes written. @param lpOverlapped Optional overlapped structure. @return Nonzero on success, zero on failure.
- lpOverlapped Optional overlapped structure. @return Nonzero on success, zero on failure.
Returns
Nonzero on success, zero on failure.
Parameters
- hObject Handle to be closed. @return Nonzero on success, zero on failure.
Returns
Nonzero on success, zero on failure.
Parameters
- lpExistingFileName Name of the existing file. @param lpNewFileName Name of the new file. @param bFailIfExists If TRUE and the new file exists, the function fails. If FALSE and the new file exists, the function overwrites it. @return Nonzero on success, zero on failure.
- lpNewFileName Name of the new file. @param bFailIfExists If TRUE and the new file exists, the function fails. If FALSE and the new file exists, the function overwrites it. @return Nonzero on success, zero on failure.
- bFailIfExists If TRUE and the new file exists, the function fails. If FALSE and the new file exists, the function overwrites it. @return Nonzero on success, zero on failure.
Returns
Nonzero on success, zero on failure.
Parameters
- lpExistingFileName The current name of the file or directory. @param lpNewFileName The new name for the file or directory. @return Nonzero on success, zero on failure.
- lpNewFileName The new name for the file or directory. @return Nonzero on success, zero on failure.
Returns
Nonzero on success, zero on failure.
Parameters
- hFile Handle to the file. @param lpFileSize Out param for the file size (64-bit). @return Nonzero on success, zero on failure.
- lpFileSize Out param for the file size (64-bit). @return Nonzero on success, zero on failure.
Returns
Nonzero on success, zero on failure.
Parameters
- hFile Handle to the file. @param liDistanceToMove The number of bytes to move the file pointer. @param lpNewFilePointer Optional out param for the new file pointer. @param dwMoveMethod The starting point for the file pointer move (FILE_BEGIN, FILE_CURRENT, FILE_END). @return Nonzero on success, zero on failure.
- liDistanceToMove The number of bytes to move the file pointer. @param lpNewFilePointer Optional out param for the new file pointer. @param dwMoveMethod The starting point for the file pointer move (FILE_BEGIN, FILE_CURRENT, FILE_END). @return Nonzero on success, zero on failure.
- lpNewFilePointer Optional out param for the new file pointer. @param dwMoveMethod The starting point for the file pointer move (FILE_BEGIN, FILE_CURRENT, FILE_END). @return Nonzero on success, zero on failure.
- dwMoveMethod The starting point for the file pointer move (FILE_BEGIN, FILE_CURRENT, FILE_END). @return Nonzero on success, zero on failure.
Returns
Nonzero on success, zero on failure.
Parameters
- lpFileName The name of the file or directory. @return The attributes of the file or directory, or INVALID_FILE_ATTRIBUTES on failure.
Returns
The attributes of the file or directory, or INVALID_FILE_ATTRIBUTES on failure.
Parameters
- lpFileName The name of the file or directory. @param dwFileAttributes The file attributes to set. @return Nonzero on success, zero on failure.
- dwFileAttributes The file attributes to set. @return Nonzero on success, zero on failure.
Returns
Nonzero on success, zero on failure.
Parameters
- lpFileName The name of the file. @param nBufferLength The size of the buffer for the path. @param lpBuffer Buffer that receives the null-terminated path. @param lpFilePart Optional out param pointer that receives the address of the file name component in the path. @return Length of the string copied to lpBuffer (excluding null terminator), or 0 on failure.
- nBufferLength The size of the buffer for the path. @param lpBuffer Buffer that receives the null-terminated path. @param lpFilePart Optional out param pointer that receives the address of the file name component in the path. @return Length of the string copied to lpBuffer (excluding null terminator), or 0 on failure.
- lpBuffer Buffer that receives the null-terminated path. @param lpFilePart Optional out param pointer that receives the address of the file name component in the path. @return Length of the string copied to lpBuffer (excluding null terminator), or 0 on failure.
- lpFilePart Optional out param pointer that receives the address of the file name component in the path. @return Length of the string copied to lpBuffer (excluding null terminator), or 0 on failure.
Returns
Length of the string copied to lpBuffer (excluding null terminator), or 0 on failure.
Parameters
- nBufferLength The length of the buffer for the current directory string, in characters. @param lpBuffer Pointer to the buffer that receives the null-terminated current directory string. @return If successful, the return value specifies the length of the string written to the buffer, not including the terminating null character. If fails, returns 0.
- lpBuffer Pointer to the buffer that receives the null-terminated current directory string. @return If successful, the return value specifies the length of the string written to the buffer, not including the terminating null character. If fails, returns 0.
Returns
If successful, the return value specifies the length of the string written to the buffer, not including the terminating null character. If fails, returns 0.
Parameters
- lpPathName The path to the new current directory. @return Nonzero on success, zero on failure.
Returns
Nonzero on success, zero on failure.
Parameters
- lpLibFileName Path to the module. @return Handle to the module, or NULL on failure.
Returns
Handle to the module, or NULL on failure.
Parameters
- hLibModule A handle to the loaded library module. @return Nonzero on success, zero on failure.
Returns
Nonzero on success, zero on failure.
Parameters
- hModule Handle to the DLL module. @param lpProcName Name of the function or variable. @return FARPROC pointer to the function or variable, or NULL on failure.
- lpProcName Name of the function or variable. @return FARPROC pointer to the function or variable, or NULL on failure.
Returns
FARPROC pointer to the function or variable, or NULL on failure.
Parameters
- lpAddress Desired starting address (optional). @param dwSize Size of the region. @param flAllocationType Allocation type flags. @param flProtect Memory protection flags. @return Pointer to the allocated memory, or NULL on failure.
- dwSize Size of the region. @param flAllocationType Allocation type flags. @param flProtect Memory protection flags. @return Pointer to the allocated memory, or NULL on failure.
- flAllocationType Allocation type flags. @param flProtect Memory protection flags. @return Pointer to the allocated memory, or NULL on failure.
- flProtect Memory protection flags. @return Pointer to the allocated memory, or NULL on failure.
Returns
Pointer to the allocated memory, or NULL on failure.
Parameters
- lpAddress Base address of the region. @param dwSize Must be 0 if MEM_RELEASE is used. @param dwFreeType Memory free type flags. @return Nonzero on success, zero on failure.
- dwSize Must be 0 if MEM_RELEASE is used. @param dwFreeType Memory free type flags. @return Nonzero on success, zero on failure.
- dwFreeType Memory free type flags. @return Nonzero on success, zero on failure.
Returns
Nonzero on success, zero on failure.
Parameters
- dwMilliseconds Time-out interval, in milliseconds.
Parameters
- uExitCode The exit code for the process.
Parameters
- hWnd Handle to owner window. @param lpText Message to display. @param lpCaption Dialog box title. @param uType Dialog box style and button flags. @return Button identifier the user clicked.
- lpText Message to display. @param lpCaption Dialog box title. @param uType Dialog box style and button flags. @return Button identifier the user clicked.
- lpCaption Dialog box title. @param uType Dialog box style and button flags. @return Button identifier the user clicked.
- uType Dialog box style and button flags. @return Button identifier the user clicked.
Returns
Button identifier the user clicked.
Parameters
- lpFileName Path with wildcards. @param lpFindFileData Out param for find data. @return Search handle or INVALID_HANDLE_VALUE on error.
- lpFindFileData Out param for find data. @return Search handle or INVALID_HANDLE_VALUE on error.
Returns
Search handle or INVALID_HANDLE_VALUE on error.
Parameters
- hFindFile Handle from FindFirstFileA. @param lpFindFileData Out param for next data. @return Nonzero on success, zero on failure/end.
- lpFindFileData Out param for next data. @return Nonzero on success, zero on failure/end.
Returns
Nonzero on success, zero on failure/end.
Parameters
- hFindFile Handle to close. @return Nonzero on success, zero on failure.
Returns
Nonzero on success, zero on failure.
Parameters
- lpPathName Path to the directory. @param lpSecurityAttributes Optional security attributes. @return Nonzero on success, zero on failure.
- lpSecurityAttributes Optional security attributes. @return Nonzero on success, zero on failure.
Returns
Nonzero on success, zero on failure.
Parameters
- lpPathName Path to the directory. @return Nonzero on success, zero on failure.
Returns
Nonzero on success, zero on failure.
Parameters
- lpFileName Path to the file. @return Nonzero on success, zero on failure.
Returns
Nonzero on success, zero on failure.
Parameters
- nStdHandle The standard device (STD_INPUT_HANDLE, STD_OUTPUT_HANDLE, or STD_ERROR_HANDLE). @return Handle to the specified device, or INVALID_HANDLE_VALUE on error.
Returns
Handle to the specified device, or INVALID_HANDLE_VALUE on error.
Parameters
- lpSystemTime Pointer to a SYSTEMTIME structure to receive the current system date and time.
Parameters
- lpLocalTime Pointer to a SYSTEMTIME structure to receive the current local date and time.
Parameters
- lpFileTime Pointer to a FILETIME structure containing the file time to be converted. @param lpSystemTime Pointer to a SYSTEMTIME structure to receive the converted system time. @return Nonzero on success, zero on failure.
- lpSystemTime Pointer to a SYSTEMTIME structure to receive the converted system time. @return Nonzero on success, zero on failure.
Returns
Nonzero on success, zero on failure.
Parameters
- lpSystemTime Pointer to a SYSTEMTIME structure containing the system time to be converted. @param lpFileTime Pointer to a FILETIME structure to receive the converted file time. @return Nonzero on success, zero on failure.
- lpFileTime Pointer to a FILETIME structure to receive the converted file time. @return Nonzero on success, zero on failure.
Returns
Nonzero on success, zero on failure.
Returns
The process identifier of the calling process.
Returns
The thread identifier of the calling thread.
Parameters
- lpApplicationName Module name (optional, use NULL and set lpCommandLine). @param lpCommandLine Command line to execute (mutable because the function might modify it). @param lpProcessAttributes Security attributes for the process (optional). @param lpThreadAttributes Security attributes for the thread (optional). @param bInheritHandles If TRUE, handles from the calling process are inherited. @param dwCreationFlags Flags controlling priority class and creation (e.g., CREATE_NEW_CONSOLE). @param lpEnvironment Environment block for the new process (optional). @param lpCurrentDirectory Full path to the current directory for the process (optional). @param lpStartupInfo Pointer to a STARTUPINFOA structure. @param lpProcessInformation Pointer to a PROCESS_INFORMATION structure receiving identification information about the new process. @return Nonzero on success, zero on failure.
- lpCommandLine Command line to execute (mutable because the function might modify it). @param lpProcessAttributes Security attributes for the process (optional). @param lpThreadAttributes Security attributes for the thread (optional). @param bInheritHandles If TRUE, handles from the calling process are inherited. @param dwCreationFlags Flags controlling priority class and creation (e.g., CREATE_NEW_CONSOLE). @param lpEnvironment Environment block for the new process (optional). @param lpCurrentDirectory Full path to the current directory for the process (optional). @param lpStartupInfo Pointer to a STARTUPINFOA structure. @param lpProcessInformation Pointer to a PROCESS_INFORMATION structure receiving identification information about the new process. @return Nonzero on success, zero on failure.
- lpProcessAttributes Security attributes for the process (optional). @param lpThreadAttributes Security attributes for the thread (optional). @param bInheritHandles If TRUE, handles from the calling process are inherited. @param dwCreationFlags Flags controlling priority class and creation (e.g., CREATE_NEW_CONSOLE). @param lpEnvironment Environment block for the new process (optional). @param lpCurrentDirectory Full path to the current directory for the process (optional). @param lpStartupInfo Pointer to a STARTUPINFOA structure. @param lpProcessInformation Pointer to a PROCESS_INFORMATION structure receiving identification information about the new process. @return Nonzero on success, zero on failure.
- lpThreadAttributes Security attributes for the thread (optional). @param bInheritHandles If TRUE, handles from the calling process are inherited. @param dwCreationFlags Flags controlling priority class and creation (e.g., CREATE_NEW_CONSOLE). @param lpEnvironment Environment block for the new process (optional). @param lpCurrentDirectory Full path to the current directory for the process (optional). @param lpStartupInfo Pointer to a STARTUPINFOA structure. @param lpProcessInformation Pointer to a PROCESS_INFORMATION structure receiving identification information about the new process. @return Nonzero on success, zero on failure.
- bInheritHandles If TRUE, handles from the calling process are inherited. @param dwCreationFlags Flags controlling priority class and creation (e.g., CREATE_NEW_CONSOLE). @param lpEnvironment Environment block for the new process (optional). @param lpCurrentDirectory Full path to the current directory for the process (optional). @param lpStartupInfo Pointer to a STARTUPINFOA structure. @param lpProcessInformation Pointer to a PROCESS_INFORMATION structure receiving identification information about the new process. @return Nonzero on success, zero on failure.
- dwCreationFlags Flags controlling priority class and creation (e.g., CREATE_NEW_CONSOLE). @param lpEnvironment Environment block for the new process (optional). @param lpCurrentDirectory Full path to the current directory for the process (optional). @param lpStartupInfo Pointer to a STARTUPINFOA structure. @param lpProcessInformation Pointer to a PROCESS_INFORMATION structure receiving identification information about the new process. @return Nonzero on success, zero on failure.
- lpEnvironment Environment block for the new process (optional). @param lpCurrentDirectory Full path to the current directory for the process (optional). @param lpStartupInfo Pointer to a STARTUPINFOA structure. @param lpProcessInformation Pointer to a PROCESS_INFORMATION structure receiving identification information about the new process. @return Nonzero on success, zero on failure.
- lpCurrentDirectory Full path to the current directory for the process (optional). @param lpStartupInfo Pointer to a STARTUPINFOA structure. @param lpProcessInformation Pointer to a PROCESS_INFORMATION structure receiving identification information about the new process. @return Nonzero on success, zero on failure.
- lpStartupInfo Pointer to a STARTUPINFOA structure. @param lpProcessInformation Pointer to a PROCESS_INFORMATION structure receiving identification information about the new process. @return Nonzero on success, zero on failure.
- lpProcessInformation Pointer to a PROCESS_INFORMATION structure receiving identification information about the new process. @return Nonzero on success, zero on failure.
Returns
Nonzero on success, zero on failure.
Parameters
- hKey A handle to an open registry key (e.g., HKEY_LOCAL_MACHINE) or predefined handle. @param lpSubKey The name of the registry subkey to be opened. @param ulOptions Reserved, must be zero. @param samDesired A mask that specifies the desired access rights to the key. (e.g., KEY_READ) @param phkResult Out param pointer that receives a handle to the opened key. @return ERROR_SUCCESS (0) if successful, or a nonzero error code.
- lpSubKey The name of the registry subkey to be opened. @param ulOptions Reserved, must be zero. @param samDesired A mask that specifies the desired access rights to the key. (e.g., KEY_READ) @param phkResult Out param pointer that receives a handle to the opened key. @return ERROR_SUCCESS (0) if successful, or a nonzero error code.
- ulOptions Reserved, must be zero. @param samDesired A mask that specifies the desired access rights to the key. (e.g., KEY_READ) @param phkResult Out param pointer that receives a handle to the opened key. @return ERROR_SUCCESS (0) if successful, or a nonzero error code.
- samDesired A mask that specifies the desired access rights to the key. (e.g., KEY_READ) @param phkResult Out param pointer that receives a handle to the opened key. @return ERROR_SUCCESS (0) if successful, or a nonzero error code.
- phkResult Out param pointer that receives a handle to the opened key. @return ERROR_SUCCESS (0) if successful, or a nonzero error code.
Returns
ERROR_SUCCESS (0) if successful, or a nonzero error code.
Parameters
- hKey Handle to the open key to be closed. @return ERROR_SUCCESS (0) if successful, or a nonzero error code.
Returns
ERROR_SUCCESS (0) if successful, or a nonzero error code.
Parameters
- hKey Handle to an open registry key. @param lpValueName The name of the registry value. If NULL or empty, retrieves type/data for the key's unnamed/default value. @param lpReserved Reserved, must be NULL. @param lpType Optional out param pointer receiving the value's type code (e.g., REG_SZ). @param lpData Optional out param buffer receiving the value's data. @param lpcbData In/Out param pointer specifying size of lpData buffer / receiving size of data written. @return ERROR_SUCCESS (0) if successful, or a nonzero error code.
- lpValueName The name of the registry value. If NULL or empty, retrieves type/data for the key's unnamed/default value. @param lpReserved Reserved, must be NULL. @param lpType Optional out param pointer receiving the value's type code (e.g., REG_SZ). @param lpData Optional out param buffer receiving the value's data. @param lpcbData In/Out param pointer specifying size of lpData buffer / receiving size of data written. @return ERROR_SUCCESS (0) if successful, or a nonzero error code.
- lpReserved Reserved, must be NULL. @param lpType Optional out param pointer receiving the value's type code (e.g., REG_SZ). @param lpData Optional out param buffer receiving the value's data. @param lpcbData In/Out param pointer specifying size of lpData buffer / receiving size of data written. @return ERROR_SUCCESS (0) if successful, or a nonzero error code.
- lpType Optional out param pointer receiving the value's type code (e.g., REG_SZ). @param lpData Optional out param buffer receiving the value's data. @param lpcbData In/Out param pointer specifying size of lpData buffer / receiving size of data written. @return ERROR_SUCCESS (0) if successful, or a nonzero error code.
- lpData Optional out param buffer receiving the value's data. @param lpcbData In/Out param pointer specifying size of lpData buffer / receiving size of data written. @return ERROR_SUCCESS (0) if successful, or a nonzero error code.
- lpcbData In/Out param pointer specifying size of lpData buffer / receiving size of data written. @return ERROR_SUCCESS (0) if successful, or a nonzero error code.
Returns
ERROR_SUCCESS (0) if successful, or a nonzero error code.
Parameters
- hKey Handle to an open registry key. @param lpValueName The name of the value to be set. @param Reserved Reserved, must be zero. @param dwType The type of data to be stored (e.g., REG_SZ). @param lpData The data to be stored. @param cbData The size of the information stored in lpData, in bytes. @return ERROR_SUCCESS (0) if successful, or a nonzero error code.
- lpValueName The name of the value to be set. @param Reserved Reserved, must be zero. @param dwType The type of data to be stored (e.g., REG_SZ). @param lpData The data to be stored. @param cbData The size of the information stored in lpData, in bytes. @return ERROR_SUCCESS (0) if successful, or a nonzero error code.
- Reserved Reserved, must be zero. @param dwType The type of data to be stored (e.g., REG_SZ). @param lpData The data to be stored. @param cbData The size of the information stored in lpData, in bytes. @return ERROR_SUCCESS (0) if successful, or a nonzero error code.
- dwType The type of data to be stored (e.g., REG_SZ). @param lpData The data to be stored. @param cbData The size of the information stored in lpData, in bytes. @return ERROR_SUCCESS (0) if successful, or a nonzero error code.
- lpData The data to be stored. @param cbData The size of the information stored in lpData, in bytes. @return ERROR_SUCCESS (0) if successful, or a nonzero error code.
- cbData The size of the information stored in lpData, in bytes. @return ERROR_SUCCESS (0) if successful, or a nonzero error code.
Returns
ERROR_SUCCESS (0) if successful, or a nonzero error code.
Parameters
- path Path to the directory (ANSI string). @return 0 on success, -1 on failure (sets errno).
Returns
0 on success, -1 on failure (sets errno).
Parameters
- path Path to the directory (ANSI string). @return 0 on success, -1 on failure (sets errno).
Returns
0 on success, -1 on failure (sets errno).
Parameters
- path New working directory (ANSI string). @return 0 on success, -1 on failure (sets errno).
Returns
0 on success, -1 on failure (sets errno).
Parameters
- buffer Buffer to receive path (ANSI string). @param maxlen Maximum length of the buffer. @return Pointer to buffer on success, NULL on failure.
- maxlen Maximum length of the buffer. @return Pointer to buffer on success, NULL on failure.
Returns
Pointer to buffer on success, NULL on failure.