|
#define | QSC_WINTOOLS_ATTRIBUTES_BUFFER_SIZE 256ULL |
| The file attributes buffer size.
|
|
#define | QSC_WINTOOLS_NETSTAT_BUFFER_SIZE 1024ULL |
| The network statistics buffer size.
|
|
#define | QSC_WINTOOLS_NETSTAT_NAME_SIZE 256ULL |
| The network statistics name size.
|
|
#define | QSC_WINTOOLS_PROCESS_LIST_SIZE 16384ULL |
| The process list buffer size.
|
|
#define | QSC_WINTOOLS_REGISTRY_BUFFER_SIZE 1024ULL |
| The registry buffer size.
|
|
#define | QSC_WINTOOLS_REGISTRY_LIST_SIZE 8192ULL |
| The registry list buffer size.
|
|
#define | QSC_WINTOOLS_RUNAS_BUFFER_SIZE 260ULL |
| The runas buffer size.
|
|
#define | QSC_WINTOOLS_SERVICE_LIST_SIZE 16384ULL |
| The service list size.
|
|
#define | QSC_WINTOOLS_SERVICE_BUFFER_SIZE 512ULL |
| The service list buffer size.
|
|
#define | QSC_WINTOOLS_SERVICE_LIST_DESCRIPTION |
| Include the service descriptions in the service list output.
|
|
|
QSC_EXPORT_API size_t | qsc_winutils_file_get_attributes (char *result, size_t reslen, const char *path) |
| Get a list of file attributes.
|
|
QSC_EXPORT_API bool | qsc_winutils_file_set_attribute (const char *path, const char *attr) |
| Set a file attribute. Valid attributes are readonly, hidden, system, archive, normal, temporary, offline, noindex, encrypted.
|
|
QSC_EXPORT_API size_t | qsc_winutils_network_statistics (char *result, size_t reslen) |
| Get a list of network statistics seperated by newline characters.
|
|
QSC_EXPORT_API size_t | qsc_winutils_process_list (char *result, size_t reslen) |
| Create a list of processes and their descriptions.
|
|
QSC_EXPORT_API bool | qsc_winutils_process_token_elevate (void) |
| Elevate the token access.
|
|
QSC_EXPORT_API bool | qsc_winutils_process_terminate (const char *name) |
| Terminate a process.
|
|
QSC_EXPORT_API bool | qsc_winutils_registry_key_add (const char *keypath, const char *value, qsc_winutils_registry_value_types vtype) |
| Create a registry key and add a value.
|
|
QSC_EXPORT_API bool | qsc_winutils_registry_key_delete (const char *keypath) |
| Delete a registry key.
|
|
QSC_EXPORT_API size_t | qsc_winutils_registry_key_list (char *result, size_t reslen, const char *keypath) |
| Create a list of registry keys under a starting key, ex. 'HKEY_CURRENT_USER\Software'.
|
|
QSC_EXPORT_API bool | qsc_winutils_run_executable (const char *path) |
| Run an application using the executable path.
|
|
QSC_EXPORT_API bool | qsc_winutils_run_as_user (const char *user, const char *password, const char *expath) |
| Run an application using the executable name and login credentials.
|
|
QSC_EXPORT_API size_t | qsc_winutils_service_list (char *result, size_t reslen) |
| Create a list of running services.
|
|
QSC_EXPORT_API size_t | qsc_winutils_service_list_size (void) |
| Get the size of the services list string.
|
|
QSC_EXPORT_API bool | qsc_winutils_service_state (const char *name, qsc_winutils_service_states state) |
| Change the running state of a system service.
|
|
QSC_EXPORT_API size_t | qsc_winutils_user_list (char *result, size_t reslen) |
| Create a list of system user accounts and their descriptions.
|
|
QSC_EXPORT_API size_t | qsc_winutils_current_user (char *result, size_t reslen) |
| Get the logged in user account name.
|
|
QSC_EXPORT_API void | qsc_winutils_test (void) |
| Test the winutils functions.
|
|
Windows utility functions.
This header defines utility functions for various Windows-specific operations, including file attribute management, process management, registry operations, service management, and executing applications with elevated privileges. The functions provide an abstraction layer over the Windows API, enabling applications to perform common system-level tasks.
printf("File attributes: %s\n", attributes);
QSC_EXPORT_API size_t qsc_winutils_file_get_attributes(char *result, size_t reslen, const char *path)
Get a list of file attributes.
#define QSC_WINTOOLS_ATTRIBUTES_BUFFER_SIZE
The file attributes buffer size.
Definition winutils.h:68
QSC_EXPORT_API bool qsc_winutils_file_set_attribute |
( |
const char * | path, |
|
|
const char * | attr ) |
Set a file attribute. Valid attributes are readonly, hidden, system, archive, normal, temporary, offline, noindex, encrypted.
- Parameters
-
path | [const char*] The file path |
attr | [const char*] The file attribute |
- Returns
- [bool] Returns true if the attribute was applied