40#ifndef QSC_WINUTILLS_H
41#define QSC_WINUTILLS_H
45QSC_CPLUSPLUS_ENABLED_START
68#define QSC_WINTOOLS_ATTRIBUTES_BUFFER_SIZE 256ULL
74#define QSC_WINTOOLS_NETSTAT_BUFFER_SIZE 1024ULL
80#define QSC_WINTOOLS_NETSTAT_NAME_SIZE 256ULL
86#define QSC_WINTOOLS_PROCESS_LIST_SIZE 16384ULL
92#define QSC_WINTOOLS_REGISTRY_BUFFER_SIZE 1024ULL
98#define QSC_WINTOOLS_REGISTRY_LIST_SIZE 8192ULL
104#define QSC_WINTOOLS_RUNAS_BUFFER_SIZE 260ULL
110#define QSC_WINTOOLS_SERVICE_LIST_SIZE 16384ULL
116#define QSC_WINTOOLS_SERVICE_BUFFER_SIZE 512ULL
122#define QSC_WINTOOLS_SERVICE_LIST_DESCRIPTION
313QSC_CPLUSPLUS_ENABLED_END
Contains common definitions for the Quantum Secure Cryptographic (QSC) library.
#define QSC_EXPORT_API
API export macro for Microsoft compilers when importing from a DLL.
Definition common.h:520
QSC_EXPORT_API void qsc_winutils_test(void)
Test the winutils functions.
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_winutils_service_states
The service states enumeration.
Definition winutils.h:145
@ QSC_WINUTILS_SERVICE_STOP
Definition winutils.h:147
@ QSC_WINUTILS_SERVICE_RESUME
Definition winutils.h:149
@ QSC_WINUTILS_SERVICE_PAUSE
Definition winutils.h:148
@ QSC_WINUTILS_SERVICE_START
Definition winutils.h:146
qsc_winutils_registry_value_types
The registry value option types.
Definition winutils.h:134
@ REG_QWORD_TYPE
Definition winutils.h:137
@ REG_SZ_TYPE
Definition winutils.h:135
@ REG_BINARY_TYPE
Definition winutils.h:138
@ REG_DWORD_TYPE
Definition winutils.h:136
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 size_t qsc_winutils_service_list(char *result, size_t reslen)
Create a list of running services.
QSC_EXPORT_API bool qsc_winutils_process_token_elevate(void)
Elevate the token access.
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 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_current_user(char *result, size_t reslen)
Get the logged in user account name.
QSC_EXPORT_API bool qsc_winutils_run_executable(const char *path)
Run an application using the executable path.
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 bool qsc_winutils_service_state(const char *name, qsc_winutils_service_states state)
Change the running state of a system service.
QSC_EXPORT_API bool qsc_winutils_process_terminate(const char *name)
Terminate a process.
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_file_set_attribute(const char *path, const char *attr)
Set a file attribute. Valid attributes are readonly, hidden, system, archive, normal,...
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_process_list(char *result, size_t reslen)
Create a list of processes and their descriptions.