1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-11-06 09:40:41 +03:00
SoftEtherVPN/src/Mayaqua/Microsoft.h

803 lines
31 KiB
C
Raw Normal View History

2017-10-19 05:48:23 +03:00
// SoftEther VPN Source Code - Developer Edition Master Branch
2014-01-04 17:00:08 +04:00
// Mayaqua Kernel
// Microsoft.h
// Header of Microsoft.c
2021-04-05 05:48:25 +03:00
#ifdef OS_WIN32
2014-01-04 17:00:08 +04:00
#ifndef MICROSOFT_H
#define MICROSOFT_H
2021-04-05 05:48:25 +03:00
#include "Network.h"
2014-01-04 17:00:08 +04:00
// Constant for Event log
#define MS_EVENTLOG_TYPE_INFORMATION 0
#define MS_EVENTLOG_TYPE_WARNING 1
#define MS_EVENTLOG_TYPE_ERROR 2
#define MS_RC_EVENTLOG_TYPE_INFORMATION 0x40000001L
#define MS_RC_EVENTLOG_TYPE_WARNING 0x80000002L
#define MS_RC_EVENTLOG_TYPE_ERROR 0xC0000003L
// TCP/IP registry value
#define TCP_MAX_NUM_CONNECTIONS 16777214
#define DEFAULT_TCP_MAX_WINDOW_SIZE_RECV 5955584
#define DEFAULT_TCP_MAX_WINDOW_SIZE_SEND 131072
#define DEFAULT_TCP_MAX_NUM_CONNECTIONS 16777214
// Constant
#define SVC_ARG_INSTALL "/install"
#define SVC_ARG_UNINSTALL "/uninstall"
#define SVC_ARG_START "/start"
#define SVC_ARG_STOP "/stop"
#define SVC_ARG_TEST "/test"
#define SVC_ARG_USERMODE "/usermode"
#define SVC_ARG_USERMODE_SHOWTRAY "/usermode_showtray"
#define SVC_ARG_USERMODE_HIDETRAY "/usermode_hidetray"
#define SVC_ARG_SERVICE "/service"
#define SVC_ARG_SETUP_INSTALL "/setup_install"
#define SVC_ARG_SETUP_UNINSTALL "/setup_uninstall"
#define SVC_ARG_TCP "/tcp"
#define SVC_ARG_TCP_UAC "/tcp_uac"
#define SVC_ARG_TCP_UAC_W L"/tcp_uac"
#define SVC_ARG_TCP_SETUP "/tcpsetup"
#define SVC_ARG_TRAFFIC "/traffic"
#define SVC_ARG_UIHELP "/uihelp"
#define SVC_ARG_UIHELP_W L"/uihelp"
#define SVC_ARG_SILENT "/silent"
// Time to suicide, if the service freezed
#define SVC_SELFKILL_TIMEOUT (5 * 60 * 1000)
// The name of the device driver of the virtual LAN card for Win32 (first part)
#define VLAN_ADAPTER_NAME "VPN Client Adapter"
#define VLAN_ADAPTER_NAME_OLD "SoftEther VPN Client 2.0 Adapter"
// The name of the device driver of the virtual LAN card for Win32 (full name)
#define VLAN_ADAPTER_NAME_TAG "VPN Client Adapter - %s"
#define VLAN_ADAPTER_NAME_TAG_OLD "SoftEther VPN Client 2.0 Adapter - %s"
// Display name of Virtual LAN card in the [Network Connections] in Win32 (full name)
#define VLAN_CONNECTION_NAME "%s - VPN Client"
#define VLAN_CONNECTION_NAME_OLD "%s - SoftEther VPN Client 2.0"
2015-04-03 23:58:09 +03:00
// Suspend handler windows class name
#define MS_SUSPEND_HANDLER_WNDCLASSNAME "MS_SUSPEND_HANDLER"
2014-01-04 17:00:08 +04:00
// Command line format in the service mode
#define SVC_RUN_COMMANDLINE L"\"%s\" /service"
// Mode value
#define SVC_MODE_NONE 0
#define SVC_MODE_INSTALL 1
#define SVC_MODE_UNINSTALL 2
#define SVC_MODE_START 3
#define SVC_MODE_STOP 4
#define SVC_MODE_TEST 5
#define SVC_MODE_USERMODE 6
#define SVC_MODE_SERVICE 7
#define SVC_MODE_SETUP_INSTALL 8
#define SVC_MODE_SETUP_UNINSTALL 9
#define SVC_MODE_TCP 13
#define SVC_MODE_TCPSETUP 14
#define SVC_MODE_TRAFFIC 15
#define SVC_MODE_UIHELP 16
#define SVC_MODE_TCP_UAC 17
#define VISTA_MMCSS_KEYNAME "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Multimedia\\SystemProfile\\Tasks"
#define VISTA_MMCSS_FILENAME "mmcss_backup.dat"
#define SVC_NAME "SVC_%s_NAME"
#define SVC_TITLE "SVC_%s_TITLE"
#define SVC_DESCRIPT "SVC_%s_DESCRIPT"
#define SVC_USERMODE_SETTING_KEY "Software\\" GC_REG_COMPANY_NAME "\\PacketiX VPN\\UserMode Settings"
#define SVC_HIDETRAY_REG_VALUE "HideTray_%S"
#define SVC_CALLING_SM_PROCESS_ID_KEY "Software\\" GC_REG_COMPANY_NAME "\\PacketiX VPN\\Service Control\\%s"
#define SVC_CALLING_SM_PROCESS_ID_VALUE "ProcessId"
#define SOFTETHER_FW_SCRIPT_HASH "Software\\" GC_REG_COMPANY_NAME "\\PacketiX VPN\\FW ScriptHash"
#define MMCSS_PROFILE_KEYNAME "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Multimedia\\SystemProfile"
// Other constants
#define MS_REG_TCP_SETTING_KEY "Software\\" GC_REG_COMPANY_NAME "\\Network Settings"
// Constants about driver
#define DRIVER_INSTALL_SYS_NAME_TAG_NEW "Neo_%04u.sys"
#define DRIVER_INSTALL_SYS_NAME_TAG_MAXID 128 // Maximum number of install
// Vista driver installer related
#define VISTA_DRIVER_INSTALLER_SRC L"|vpndrvinst.exe"
#define VISTA_DRIVER_INSTALLER_DST L"%s\\vpndrvinst.exe"
2014-01-04 17:00:08 +04:00
#define DRIVER_DEVICE_ID_TAG "NeoAdapter_%s"
2021-04-05 05:48:25 +03:00
#ifdef MICROSOFT_C
2014-01-04 17:00:08 +04:00
// WCM related code on Windows 8
typedef enum _MS_WCM_PROPERTY
{
ms_wcm_global_property_domain_policy,
ms_wcm_global_property_minimize_policy,
ms_wcm_global_property_roaming_policy,
2014-01-04 17:00:08 +04:00
ms_wcm_global_property_powermanagement_policy,
ms_wcm_intf_property_connection_cost, //used to set/get cost level and flags for the connection
ms_wcm_intf_property_dataplan_status, //used by MNO to indicate plan data associated with new cost
ms_wcm_intf_property_hotspot_profile, //used to store hotspot profile (WISPr credentials)
} MS_WCM_PROPERTY, * MS_PWCM_PROPERTY;
2014-01-04 17:00:08 +04:00
typedef struct _MS_WCM_POLICY_VALUE {
BOOL fValue;
BOOL fIsGroupPolicy;
} MS_WCM_POLICY_VALUE, * MS_PWCM_POLICY_VALUE;
2014-01-04 17:00:08 +04:00
#define MS_WCM_MAX_PROFILE_NAME 256
typedef enum _MS_WCM_MEDIA_TYPE
{
ms_wcm_media_unknown,
ms_wcm_media_ethernet,
ms_wcm_media_wlan,
ms_wcm_media_mbn,
ms_wcm_media_invalid,
ms_wcm_media_max
} MS_WCM_MEDIA_TYPE, * MS_PWCM_MEDIA_TYPE;
2014-01-04 17:00:08 +04:00
typedef struct _MS_WCM_PROFILE_INFO {
WCHAR strProfileName[MS_WCM_MAX_PROFILE_NAME];
GUID AdapterGUID;
MS_WCM_MEDIA_TYPE Media;
} MS_WCM_PROFILE_INFO, * MS_PWCM_PROFILE_INFO;
2014-01-04 17:00:08 +04:00
typedef struct _MS_WCM_PROFILE_INFO_LIST {
UINT dwNumberOfItems;
2014-01-04 17:00:08 +04:00
MS_WCM_PROFILE_INFO ProfileInfo[1];
} MS_WCM_PROFILE_INFO_LIST, * MS_PWCM_PROFILE_INFO_LIST;
2014-01-04 17:00:08 +04:00
// Internal structure
typedef struct MS
{
HINSTANCE hInst;
HINSTANCE hKernel32;
bool IsNt;
bool IsAdmin;
HANDLE hCurrentProcess;
UINT CurrentProcessId;
bool MiniDumpEnabled;
char *ExeFileName;
char *ExeFileDir;
char *WindowsDir;
char *System32Dir;
char *TempDir;
char *WinTempDir;
char *WindowsDrive;
char *ProgramFilesDir;
char *ProgramFilesDirX86;
char *ProgramFilesDirX64;
char *CommonStartMenuDir;
char *CommonProgramsDir;
char *CommonStartupDir;
char *CommonAppDataDir;
char *CommonDesktopDir;
char *PersonalStartMenuDir;
char *PersonalProgramsDir;
char *PersonalStartupDir;
char *PersonalAppDataDir;
char *PersonalDesktopDir;
char *MyDocumentsDir;
char *LocalAppDataDir;
char *MyTempDir;
char *UserName;
char *UserNameEx;
wchar_t *ExeFileNameW;
wchar_t *ExeFileDirW;
wchar_t *WindowsDirW;
wchar_t *System32DirW;
wchar_t *TempDirW;
wchar_t *WinTempDirW;
wchar_t *WindowsDriveW;
wchar_t *ProgramFilesDirW;
wchar_t *ProgramFilesDirX86W;
wchar_t *ProgramFilesDirX64W;
wchar_t *CommonStartMenuDirW;
wchar_t *CommonProgramsDirW;
wchar_t *CommonStartupDirW;
wchar_t *CommonAppDataDirW;
wchar_t *CommonDesktopDirW;
wchar_t *PersonalStartMenuDirW;
wchar_t *PersonalProgramsDirW;
wchar_t *PersonalStartupDirW;
wchar_t *PersonalAppDataDirW;
wchar_t *PersonalDesktopDirW;
wchar_t *MyDocumentsDirW;
wchar_t *LocalAppDataDirW;
wchar_t *MyTempDirW;
wchar_t *UserNameW;
wchar_t *UserNameExW;
wchar_t *MinidumpBaseFileNameW;
IO *LockFile;
2016-04-24 17:49:31 +03:00
bool IsWine;
2014-01-04 17:00:08 +04:00
} MS;
typedef struct MS_EVENTLOG
{
HANDLE hEventLog;
} MS_EVENTLOG;
typedef struct MS_USERMODE_SVC_PULSE_THREAD_PARAM
{
void *hWnd;
void *GlobalPulse;
volatile bool Halt;
} MS_USERMODE_SVC_PULSE_THREAD_PARAM;
#endif // MICROSOFT_C
// Structure to suppress the warning message
typedef struct NO_WARNING
{
UINT ThreadId;
2014-01-04 17:00:08 +04:00
THREAD *NoWarningThread;
EVENT *HaltEvent;
volatile bool Halt;
wchar_t *SoundFileName;
UINT64 StartTimer;
UINT64 StartTick;
} NO_WARNING;
// ID of the root key
#define REG_CLASSES_ROOT 0 // HKEY_CLASSES_ROOT
#define REG_LOCAL_MACHINE 1 // HKEY_LOCAL_MACHINE
#define REG_CURRENT_USER 2 // HKEY_CURRENT_USER
#define REG_USERS 3 // HKEY_USERS
// Service Functions
typedef void (SERVICE_FUNCTION)();
// Process list item
typedef struct MS_PROCESS
{
char ExeFilename[MAX_PATH]; // EXE file name
wchar_t ExeFilenameW[MAX_PATH]; // EXE file name (Unicode)
UINT ProcessId; // Process ID
} MS_PROCESS;
#define MAX_MS_ADAPTER_IP_ADDRESS 64
// Network adapter
typedef struct MS_ADAPTER
{
char Title[MAX_PATH]; // Display name
wchar_t TitleW[MAX_PATH]; // Display Name (Unicode)
UINT Index; // Index
UINT Type; // Type
UINT Status; // Status
UINT Mtu; // MTU
UINT Speed; // Speed
UINT AddressSize; // Address size
UCHAR Address[8]; // Address
UINT64 RecvBytes; // Number of received bytes
UINT64 RecvPacketsBroadcast; // Number of broadcast packets received
UINT64 RecvPacketsUnicast; // Number of unicast packets received
UINT64 SendBytes; // Number of bytes sent
UINT64 SendPacketsBroadcast; // Number of sent broadcast packets
UINT64 SendPacketsUnicast; // Number of sent unicast packets
bool Info; // Whether there is detailed information
char Guid[MAX_SIZE]; // GUID
UINT NumIpAddress; // The number of IP addresses
IP IpAddresses[MAX_MS_ADAPTER_IP_ADDRESS]; // IP address
IP SubnetMasks[MAX_MS_ADAPTER_IP_ADDRESS]; // Subnet mask
UINT NumGateway; // The number of the gateway
IP Gateways[MAX_MS_ADAPTER_IP_ADDRESS]; // Gateway
bool UseDhcp; // Using DHCP flag
IP DhcpServer; // DHCP Server
UINT64 DhcpLeaseStart; // DHCP lease start date and time
UINT64 DhcpLeaseExpires; // DHCP lease expiration date and time
bool UseWins; // WINS use flag
IP PrimaryWinsServer; // Primary WINS server
IP SecondaryWinsServer; // Secondary WINS server
bool IsWireless; // Whether wireless
bool IsNotEthernetLan; // Whether It isn't a Ethernet LAN
} MS_ADAPTER;
// Network adapter list
typedef struct MS_ADAPTER_LIST
{
UINT Num; // Count
MS_ADAPTER **Adapters; // Content
} MS_ADAPTER_LIST;
2016-11-27 11:43:14 +03:00
typedef struct MS_ISLOCKED
{
HWND hWnd;
THREAD *Thread;
volatile bool IsLockedFlag;
} MS_ISLOCKED;
2014-01-04 17:00:08 +04:00
// TCP setting
typedef struct MS_TCP
{
UINT RecvWindowSize; // Receive window size
UINT SendWindowSize; // Send window size
} MS_TCP;
// Sleep prevention
typedef struct MS_NOSLEEP
{
THREAD *Thread; // Thread
EVENT *HaltEvent; // Halting event
volatile bool Halt; // Halting flag
bool NoScreenSaver; // Prevent Screensaver
// Following is for Windows Vista
wchar_t ScreenSaveActive[MAX_PATH];
wchar_t SCRNSAVE_EXE[MAX_PATH];
} MS_NOSLEEP;
// Child window enumeration
typedef struct ENUM_CHILD_WINDOW_PARAM
{
LIST *o;
bool no_recursion;
bool include_ipcontrol;
} ENUM_CHILD_WINDOW_PARAM;
// Driver version information
typedef struct MS_DRIVER_VER
{
UINT Year, Month, Day;
UINT Major, Minor, Build;
} MS_DRIVER_VER;
2015-04-03 23:58:09 +03:00
// Suspend handler
typedef struct MS_SUSPEND_HANDLER
{
HWND hWnd;
THREAD *Thread;
volatile bool AboutToClose;
} MS_SUSPEND_HANDLER;
2014-01-04 17:00:08 +04:00
// Function prototype
void MsInit();
void MsFree();
char *MsCutExeNameFromCommandLine(char *str);
wchar_t *MsCutExeNameFromUniCommandLine(wchar_t *str);
UINT MsRegAccessMaskFor64BitEx(bool force32bit, bool force64bit);
2014-01-04 17:00:08 +04:00
bool MsRegIsKey(UINT root, char *name);
bool MsRegIsKeyEx(UINT root, char *name, bool force32bit);
bool MsRegIsKeyEx2(UINT root, char *name, bool force32bit, bool force64bit);
bool MsRegIsValue(UINT root, char *keyname, char *valuename);
bool MsRegIsValueEx(UINT root, char *keyname, char *valuename, bool force32bit);
bool MsRegIsValueEx2(UINT root, char *keyname, char *valuename, bool force32bit, bool force64bit);
bool MsRegReadValueEx2(UINT root, char *keyname, char *valuename, void **data, DWORD *type, DWORD *size, bool force32bit, bool force64bit);
bool MsRegReadValueEx2W(UINT root, char *keyname, char *valuename, void **data, DWORD *type, DWORD *size, bool force32bit, bool force64bit);
2014-01-04 17:00:08 +04:00
char *MsRegReadStr(UINT root, char *keyname, char *valuename);
char *MsRegReadStrEx(UINT root, char *keyname, char *valuename, bool force32bit);
char *MsRegReadStrEx2(UINT root, char *keyname, char *valuename, bool force32bit, bool force64bit);
wchar_t *MsRegReadStrW(UINT root, char *keyname, char *valuename);
wchar_t *MsRegReadStrExW(UINT root, char *keyname, char *valuename, bool force32bit);
wchar_t *MsRegReadStrEx2W(UINT root, char *keyname, char *valuename, bool force32bit, bool force64bit);
UINT MsRegReadInt(UINT root, char *keyname, char *valuename);
UINT MsRegReadIntEx(UINT root, char *keyname, char *valuename, bool force32bit);
UINT MsRegReadIntEx2(UINT root, char *keyname, char *valuename, bool force32bit, bool force64bit);
LIST *MsRegReadStrList(UINT root, char *keyname, char *valuename);
LIST *MsRegReadStrListEx(UINT root, char *keyname, char *valuename, bool force32bit);
LIST *MsRegReadStrListEx2(UINT root, char *keyname, char *valuename, bool force32bit, bool force64bit);
BUF *MsRegReadBin(UINT root, char *keyname, char *valuename);
BUF *MsRegReadBinEx(UINT root, char *keyname, char *valuename, bool force32bit);
BUF *MsRegReadBinEx2(UINT root, char *keyname, char *valuename, bool force32bit, bool force64bit);
bool MsRegNewKeyEx2(UINT root, char *keyname, bool force32bit, bool force64bit);
bool MsRegWriteValueEx2(UINT root, char *keyname, char *valuename, UINT type, void *data, UINT size, bool force32bit, bool force64bit);
bool MsRegWriteValueEx2W(UINT root, char *keyname, char *valuename, UINT type, void *data, UINT size, bool force32bit, bool force64bit);
bool MsRegWriteStr(UINT root, char *keyname, char *valuename, char *str);
bool MsRegWriteStrEx(UINT root, char *keyname, char *valuename, char *str, bool force32bit);
bool MsRegWriteStrEx2(UINT root, char *keyname, char *valuename, char *str, bool force32bit, bool force64bit);
bool MsRegWriteStrExpand(UINT root, char *keyname, char *valuename, char *str);
bool MsRegWriteStrExpandEx(UINT root, char *keyname, char *valuename, char *str, bool force32bit);
bool MsRegWriteStrExpandEx2(UINT root, char *keyname, char *valuename, char *str, bool force32bit, bool force64bit);
bool MsRegWriteStrW(UINT root, char *keyname, char *valuename, wchar_t *str);
bool MsRegWriteStrExW(UINT root, char *keyname, char *valuename, wchar_t *str, bool force32bit);
bool MsRegWriteStrEx2W(UINT root, char *keyname, char *valuename, wchar_t *str, bool force32bit, bool force64bit);
bool MsRegWriteStrExpandW(UINT root, char *keyname, char *valuename, wchar_t *str);
bool MsRegWriteStrExpandExW(UINT root, char *keyname, char *valuename, wchar_t *str, bool force32bit);
bool MsRegWriteStrExpandEx2W(UINT root, char *keyname, char *valuename, wchar_t *str, bool force32bit, bool force64bit);
bool MsRegWriteInt(UINT root, char *keyname, char *valuename, UINT value);
bool MsRegWriteIntEx(UINT root, char *keyname, char *valuename, UINT value, bool force32bit);
bool MsRegWriteIntEx2(UINT root, char *keyname, char *valuename, UINT value, bool force32bit, bool force64bit);
bool MsRegWriteBin(UINT root, char *keyname, char *valuename, void *data, UINT size);
bool MsRegWriteBinEx(UINT root, char *keyname, char *valuename, void *data, UINT size, bool force32bit);
bool MsRegWriteBinEx2(UINT root, char *keyname, char *valuename, void *data, UINT size, bool force32bit, bool force64bit);
TOKEN_LIST *MsRegEnumKey(UINT root, char *keyname);
TOKEN_LIST *MsRegEnumKeyEx(UINT root, char *keyname, bool force32bit);
TOKEN_LIST *MsRegEnumKeyEx2(UINT root, char *keyname, bool force32bit, bool force64bit);
TOKEN_LIST *MsRegEnumValue(UINT root, char *keyname);
TOKEN_LIST *MsRegEnumValueEx(UINT root, char *keyname, bool force32bit);
TOKEN_LIST *MsRegEnumValueEx2(UINT root, char *keyname, bool force32bit, bool force64bit);
bool MsRegDeleteKey(UINT root, char *keyname);
bool MsRegDeleteKeyEx(UINT root, char *keyname, bool force32bit);
bool MsRegDeleteKeyEx2(UINT root, char *keyname, bool force32bit, bool force64bit);
bool MsRegDeleteValue(UINT root, char *keyname, char *valuename);
bool MsRegDeleteValueEx(UINT root, char *keyname, char *valuename, bool force32bit);
bool MsRegDeleteValueEx2(UINT root, char *keyname, char *valuename, bool force32bit, bool force64bit);
2015-10-19 15:30:51 +03:00
bool MsRegLoadHive(UINT root, wchar_t *keyname, wchar_t *filename);
bool MsRegUnloadHive(UINT root, wchar_t *keyname);
2014-01-04 17:00:08 +04:00
bool MsIsAdmin();
2016-04-24 17:49:31 +03:00
bool MsIsWine();
2014-01-04 17:00:08 +04:00
bool MsEnablePrivilege(char *name, bool enable);
void *MsGetCurrentProcess();
UINT MsGetCurrentProcessId();
char *MsGetExeFileName();
char *MsGetExeDirName();
wchar_t *MsGetExeDirNameW();
2016-11-27 11:43:14 +03:00
void MsStartIsLockedThread();
void MsStopIsLockedThread();
2014-01-04 17:00:08 +04:00
bool MsShutdown(bool reboot, bool force);
bool MsCheckLogon(wchar_t *username, char *password);
TOKEN_LIST *MsEnumNetworkAdapters(char *start_with_name, char *start_with_name_2);
TOKEN_LIST *MsEnumNetworkAdaptersNeo();
Correct Spelling (#458) * spelling: accepts * spelling: account * spelling: accept * spelling: accumulate * spelling: adapter * spelling: address * spelling: additional * spelling: aggressive * spelling: adhered * spelling: allowed * spelling: ambiguous * spelling: amount * spelling: anonymous * spelling: acquisition * spelling: assemble * spelling: associated * spelling: assigns * spelling: attach * spelling: attempt * spelling: attribute * spelling: authenticate * spelling: authentication * spelling: available * spelling: bridging * spelling: cascade * spelling: cancel * spelling: check * spelling: challenge * spelling: changing * spelling: characters * spelling: cloud * spelling: compare * spelling: communication * spelling: compatible * spelling: compatibility * spelling: completion * spelling: complete * spelling: computers * spelling: configure * spelling: configuration * spelling: conformant * spelling: connection * spelling: contains * spelling: continuously * spelling: continue * spelling: convert * spelling: counters * spelling: create * spelling: created * spelling: cumulate * spelling: currently * spelling: debugging * spelling: decryption * spelling: description * spelling: default * spelling: driver * spelling: delete * spelling: destination * spelling: disabled * spelling: different * spelling: dynamically * spelling: directory * spelling: disappeared * spelling: disable * spelling: doesn't * spelling: download * spelling: dropped * spelling: enable * spelling: established * spelling: ether * spelling: except * spelling: expired * spelling: field * spelling: following * spelling: forever * spelling: firewall * spelling: first * spelling: fragment * spelling: function * spelling: gateway * spelling: identifier * spelling: identify * spelling: incoming * spelling: information * spelling: initialize * spelling: injection * spelling: inner * spelling: instead * spelling: installation * spelling: inserted * spelling: integer * spelling: interrupt * spelling: intuitive * spelling: interval * spelling: january * spelling: keybytes * spelling: know * spelling: language * spelling: length * spelling: library * spelling: listener * spelling: maintain * spelling: modified * spelling: necessary * spelling: number * spelling: obsoleted * spelling: occurred * spelling: occurring * spelling: occur * spelling: original * spelling: omittable * spelling: omit * spelling: opening * spelling: operation * spelling: packet * spelling: parameters * spelling: pointed * spelling: popupmenuopen * spelling: privilege * spelling: product * spelling: protection * spelling: promiscuous * spelling: prompt * spelling: query * spelling: random * spelling: reconnection * spelling: revocation * spelling: received * spelling: red hat * spelling: registry * spelling: release * spelling: retrieve
2018-05-17 00:47:10 +03:00
bool MsGetNeoDriverFilename(char *name, UINT size, char *instance_name);
2014-01-04 17:00:08 +04:00
bool MsMakeNewNeoDriverFilename(char *name, UINT size);
void MsGenerateNeoDriverFilenameFromInt(char *name, UINT size, UINT n);
TOKEN_LIST *MsEnumNeoDriverFilenames();
char *MsGetNetworkAdapterGuid(char *tag_name, char *instance_name);
wchar_t *MsGetNetworkConnectionName(char *guid);
char *MsGetNetworkConfigRegKeyNameFromGuid(char *guid);
char *MsGetNetworkConfigRegKeyNameFromInstanceName(char *tag_name, char *instance_name);
void MsSetNetworkConfig(char *tag_name, char *instance_name, char *friendly_name, bool show_icon);
void MsInitNetworkConfig(char *tag_name, char *instance_name, char *connection_tag_name);
void MsNormalizeInterfaceDefaultGatewaySettings(char *tag_name, char *instance_name);
char *MsGetSpecialDir(int id);
wchar_t *MsGetSpecialDirW(int id);
void MsGetSpecialDirs();
bool MsCheckIsAdmin();
void MsInitTempDir();
void MsFreeTempDir();
void MsGenLockFile(wchar_t *name, UINT size, wchar_t *temp_dir);
void MsDeleteTempDir();
void MsDeleteAllFile(char *dir);
void MsDeleteAllFileW(wchar_t *dir);
bool MsInstallVLan(char *tag_name, char *connection_tag_name, char *instance_name, MS_DRIVER_VER *ver);
bool MsInstallVLanWithoutLock(char *tag_name, char *connection_tag_name, char *instance_name, MS_DRIVER_VER *ver);
bool MsInstallVLanInternal(wchar_t *infpath, wchar_t *hwid_w, char *hwid);
bool MsUpgradeVLan(char *tag_name, char *connection_tag_name, char *instance_name, MS_DRIVER_VER *ver);
bool MsUpgradeVLanWithoutLock(char *tag_name, char *connection_tag_name, char *instance_name, MS_DRIVER_VER *ver);
bool MsEnableVLan(char *instance_name);
bool MsEnableVLanWithoutLock(char *instance_name);
bool MsDisableVLan(char *instance_name);
bool MsDisableVLanWithoutLock(char *instance_name);
bool MsUninstallVLan(char *instance_name);
bool MsUninstallVLanWithoutLock(char *instance_name);
bool MsIsVLanEnabled(char *instance_name);
bool MsIsVLanEnabledWithoutLock(char *instance_name);
bool MsIsValidVLanInstanceNameForInfCatalog(char *instance_name);
void MsGetInfCatalogDir(char *dst, UINT size);
void MsRestartVLan(char *instance_name);
void MsRestartVLanWithoutLock(char *instance_name);
bool MsIsVLanExists(char *tag_name, char *instance_name);
void MsDeleteTroubleVLAN(char *tag_name, char *instance_name);
bool MsStartDriverInstall(char *instance_name, UCHAR *mac_address, char *neo_sys, UCHAR *ret_mac_address, MS_DRIVER_VER *ver);
void MsFinishDriverInstall(char *instance_name, char *neo_sys);
void MsGetDriverPath(char *instance_name, wchar_t *src_inf, wchar_t *src_sys, wchar_t *dest_inf, wchar_t *dest_sys, wchar_t *src_cat, wchar_t *dest_cat, char *neo_sys);
void MsGetDriverPathA(char *instance_name, char *src_inf, char *src_sys, char *dest_inf, char *dest_sys, char *src_cat, char *dst_cat, char *neo_sys);
void MsGenMacAddress(UCHAR *mac);
char *MsGetMacAddress(char *tag_name, char *instance_name);
void MsSetMacAddress(char *tag_name, char *instance_name, char *mac_address);
char *MsGetDriverVersion(char *tag_name, char *instance_name);
char *MsGetDriverFileName(char *tag_name, char *instance_name);
void MsTest();
void MsInitGlobalNetworkConfig();
void MsDisableNetworkOffloadingEtc();
void MsSetThreadPriorityHigh();
void MsSetThreadPriorityIdle();
void MsSetThreadPriorityRealtime();
void MsRestoreThreadPriority();
char *MsGetWindowsDir();
char *MsGetSystem32Dir();
char *MsGetTempDir();
char *MsGetProgramFilesDir();
char *MsGetCommonStartupDir();
char *MsGetMyTempDir();
wchar_t *MsGetWindowsDirW();
wchar_t *MsGetExeFileNameW();
wchar_t *MsGetExeFileDirW();
wchar_t *MsGetSystem32DirW();
wchar_t *MsGetTempDirW();
wchar_t *MsGetProgramFilesDirX64W();
wchar_t *MsGetCommonStartMenuDirW();
wchar_t *MsGetCommonProgramsDirW();
wchar_t *MsGetCommonStartupDirW();
wchar_t *MsGetCommonDesktopDirW();
wchar_t *MsGetPersonalStartMenuDirW();
wchar_t *MsGetPersonalProgramsDirW();
wchar_t *MsGetPersonalStartupDirW();
wchar_t *MsGetPersonalAppDataDirW();
wchar_t *MsGetPersonalDesktopDirW();
wchar_t *MsGetMyTempDirW();
wchar_t *MsGetUserNameW();
struct SAFE_TABLE *MsGetSafeTable();
UINT MsGetProcessId();
void MsTerminateProcess();
bool MsIsServiceInstalled(char *name);
bool MsInstallServiceExW(char *name, wchar_t *title, wchar_t *description, wchar_t *path, UINT *error_code);
bool MsInstallServiceW(char *name, wchar_t *title, wchar_t *description, wchar_t *path);
bool MsInstallDeviceDriverW(char *name, wchar_t *title, wchar_t *path, UINT *error_code);
bool MsUpdateServiceConfig(char *name);
bool MsSetServiceDescription(char *name, wchar_t *description);
bool MsUninstallService(char *name);
bool MsStartService(char *name);
bool MsStartServiceEx(char *name, UINT *error_code);
bool MsStopService(char *name);
bool MsIsServiceRunning(char *name);
bool MsIsTerminalServiceInstalled();
bool MsIsUserSwitchingInstalled();
UINT MsGetCurrentTerminalSessionId();
bool MsIsTerminalSessionActive(UINT session_id);
bool MsIsCurrentTerminalSessionActive();
wchar_t *MsGetSessionUserName(UINT session_id);
UINT MsService(char *name, SERVICE_FUNCTION *start, SERVICE_FUNCTION *stop, UINT icon, char *cmd_line);
void MsTestModeW(wchar_t *title, SERVICE_FUNCTION *start, SERVICE_FUNCTION *stop);
void MsTestMode(char *title, SERVICE_FUNCTION *start, SERVICE_FUNCTION *stop);
void MsServiceMode(SERVICE_FUNCTION *start, SERVICE_FUNCTION *stop);
void MsUserModeW(wchar_t *title, SERVICE_FUNCTION *start, SERVICE_FUNCTION *stop, UINT icon);
bool MsIsUserMode();
void MsTestOnly();
void MsPlaySound(char *name);
void MsSetThreadSingleCpu();
bool MsCheckVLanDeviceIdFromRootEnum(char *name);
LIST *MsGetProcessList();
LIST *MsGetProcessList9x();
LIST *MsGetProcessListNt();
void MsFreeProcessList(LIST *o);
int MsCompareProcessList(void *p1, void *p2);
MS_PROCESS *MsSearchProcessById(LIST *o, UINT id);
void MsGetCurrentProcessExeNameW(wchar_t *name, UINT size);
bool MsKillProcess(UINT id);
UINT MsKillProcessByExeName(wchar_t *name);
void MsKillOtherInstance();
void MsKillOtherInstanceEx(char *exclude_svcname);
bool MsGetShortPathNameA(char *long_path, char *short_path, UINT short_path_size);
bool MsGetShortPathNameW(wchar_t *long_path, wchar_t *short_path, UINT short_path_size);
void MsWriteCallingServiceManagerProcessId(char *svcname, UINT pid);
UINT MsReadCallingServiceManagerProcessId(char *svcname, bool current_user);
bool MsStopIPsecService();
char *MsGetIPsecServiceName();
bool MsStartIPsecService();
void MsGenerateUserModeSvcGlobalPulseName(char *name, UINT size, char *svc_name);
void *MsCreateUserModeSvcGlocalPulse(char *svc_name);
void MsStopUserModeSvc(char *svc_name);
void MsUserModeGlobalPulseRecvThread(THREAD *thread, void *param);
MS_ADAPTER_LIST *MsCreateAdapterListInner();
MS_ADAPTER_LIST *MsCreateAdapterListInnerEx(bool no_info);
MS_ADAPTER_LIST *MsCreateAdapterListInnerExVista(bool no_info);
void MsFreeAdapter(MS_ADAPTER *a);
void MsFreeAdapterList(MS_ADAPTER_LIST *o);
wchar_t *MsGetAdapterTypeStr(UINT type);
wchar_t *MsGetAdapterStatusStr(UINT status);
MS_ADAPTER *MsCloneAdapter(MS_ADAPTER *a);
MS_ADAPTER_LIST *MsCloneAdapterList(MS_ADAPTER_LIST *o);
void MsInitAdapterListModule();
void MsFreeAdapterListModule();
MS_ADAPTER_LIST *MsCreateAdapterList();
MS_ADAPTER_LIST *MsCreateAdapterListEx(bool no_info);
void MsGetAdapterTcpIpInformation(MS_ADAPTER *a);
MS_ADAPTER *MsGetAdapter(char *title);
MS_ADAPTER *MsGetAdapterByGuid(char *guid);
MS_ADAPTER *MsGetAdapterByGuidFromList(MS_ADAPTER_LIST *o, char *guid);
UINT ConvertMidStatusVistaToXp(UINT st);
void *MsLoadLibrary(char *name);
void *MsLoadLibraryW(wchar_t *name);
void *MsLoadLibraryAsDataFile(char *name);
void *MsLoadLibraryAsDataFileW(wchar_t *name);
void MsPrintTick();
bool MsDisableIme();
void MsGetTcpConfig(MS_TCP *tcp);
void MsSetTcpConfig(MS_TCP *tcp);
void MsSaveTcpConfigReg(MS_TCP *tcp);
bool MsLoadTcpConfigReg(MS_TCP *tcp);
bool MsIsTcpConfigSupported();
void MsApplyTcpConfig();
bool MsIsShouldShowTcpConfigApp();
void MsDeleteTcpConfigReg();
UINT MsGetConsoleWidth();
UINT MsSetConsoleWidth(UINT size);
NO_WARNING *MsInitNoWarning();
NO_WARNING *MsInitNoWarningEx(UINT start_timer);
void MsFreeNoWarning(NO_WARNING *nw);
void MsNoWarningThreadProc(THREAD *thread, void *param);
char *MsNoWarningSoundInit();
void MsNoWarningSoundFree(char *s);
bool MsCloseWarningWindow(NO_WARNING *nw, UINT thread_id);
LIST *MsEnumChildWindows(LIST *o, HWND hWnd);
void MsAddWindowToList(LIST *o, HWND hWnd);
UINT MsGetThreadLocale();
LIST *NewWindowList();
int CmpWindowList(void *p1, void *p2);
void AddWindow(LIST *o, HWND hWnd);
void FreeWindowList(LIST *o);
LIST *EnumAllChildWindow(HWND hWnd);
LIST *EnumAllChildWindowEx(HWND hWnd, bool no_recursion, bool include_ipcontrol, bool no_self);
LIST *EnumAllTopWindow();
bool MsExecDriverInstaller(char *arg);
void MsRegistWindowsFirewallEx(char *title, char *exe);
void MsRegistWindowsFirewallEx2(char *title, char *exe, char *dir);
bool MsIs64BitWindows();
bool MsIsX64();
bool MsIsIA64();
void *MsDisableWow64FileSystemRedirection();
void MsRestoreWow64FileSystemRedirection(void *p);
2014-10-03 19:09:23 +04:00
bool MsIsWindows10();
2014-02-16 22:16:50 +04:00
bool MsIsWindows81();
2014-01-04 17:00:08 +04:00
bool MsIsWindows8();
bool MsIsWindows7();
bool MsIsInfCatalogRequired();
bool MsCheckFileDigitalSignatureW(HWND hWnd, wchar_t *name, bool *danger);
bool MsIsKB3033929RequiredAndMissing();
bool MsIsSha2KernelModeSignatureSupported();
2014-01-04 17:00:08 +04:00
bool MsGetProcessExeName(char *path, UINT size, UINT id);
bool MsGetWindowOwnerProcessExeName(char *path, UINT size, HWND hWnd);
void *MsRunAsUserExW(wchar_t *filename, wchar_t *arg, bool hide);
void *MsRunAsUserExInnerW(wchar_t *filename, wchar_t *arg, bool hide);
UINT MsGetCursorPosHash();
void MsGetComputerName(char *name, UINT size);
void MsGetComputerNameFullEx(wchar_t *name, UINT size, bool with_cache);
UINT64 MsGetScreenSaverTimeout();
src/Mayaqua/Microsoft: remove unused functions (#543) [src/Mayaqua/Microsoft.c:8773]: (style) The function 'EnumAllWindow' is never used. [src/Mayaqua/Microsoft.c:1411]: (style) The function 'MsBufToRegSubkeys' is never used. [src/Mayaqua/Microsoft.c:5373]: (style) The function 'MsChangeIconOnTrayEx2' is never used. [src/Mayaqua/Microsoft.c:3426]: (style) The function 'MsCheckFileDigitalSignature' is never used. [src/Mayaqua/Microsoft.c:10764]: (style) The function 'MsCreateTempFile' is never used. [src/Mayaqua/Microsoft.c:10702]: (style) The function 'MsCreateTempFileByExt' is never used. [src/Mayaqua/Microsoft.c:1290]: (style) The function 'MsDeleteClipboard' is never used. [src/Mayaqua/Microsoft.c:12300]: (style) The function 'MsDetermineIsLockedByWtsApi' is never used. [src/Mayaqua/Microsoft.c:7296]: (style) The function 'MsEnableRemoteDesktop' is never used. [src/Mayaqua/Microsoft.c:2076]: (style) The function 'MsExecuteExW' is never used. [src/Mayaqua/Microsoft.c:2454]: (style) The function 'MsExtractCab' is never used. [src/Mayaqua/Microsoft.c:2383]: (style) The function 'MsExtractCabFromMsi' is never used. [src/Mayaqua/Microsoft.c:2549]: (style) The function 'MsExtractCabinetFileFromExe' is never used. [src/Mayaqua/Microsoft.c:2575]: (style) The function 'MsExtractCabinetFileFromExeW' is never used. [src/Mayaqua/Microsoft.c:1236]: (style) The function 'MsFreeEventLog' is never used. [src/Mayaqua/Microsoft.c:12450]: (style) The function 'MsFreeIsLocked' is never used. [src/Mayaqua/Microsoft.c:4101]: (style) The function 'MsFreeLibrary' is never used. [src/Mayaqua/Microsoft.c:2503]: (style) The function 'MsGetCabarcExeFilename' is never used. [src/Mayaqua/Microsoft.c:1300]: (style) The function 'MsGetClipboardOwnerProcessId' is never used. [src/Mayaqua/Microsoft.c:15237]: (style) The function 'MsGetCommonAppDataDir' is never used. [src/Mayaqua/Microsoft.c:15406]: (style) The function 'MsGetCommonAppDataDirW' is never used. [src/Mayaqua/Microsoft.c:15289]: (style) The function 'MsGetCommonDesktopDir' is never used. [src/Mayaqua/Microsoft.c:15281]: (style) The function 'MsGetCommonProgramsDir' is never used. [src/Mayaqua/Microsoft.c:15277]: (style) The function 'MsGetCommonStartMenuDir' is never used. [src/Mayaqua/Microsoft.c:3136]: (style) The function 'MsGetComputerNameFull' is never used. [src/Mayaqua/Microsoft.c:4984]: (style) The function 'MsGetCurrentProcessExeName' is never used. [src/Mayaqua/Microsoft.c:2763]: (style) The function 'MsGetFileVersionW' is never used. [src/Mayaqua/Microsoft.c:15241]: (style) The function 'MsGetLocalAppDataDir' is never used. [src/Mayaqua/Microsoft.c:15468]: (style) The function 'MsGetLocalAppDataDirW' is never used. [src/Mayaqua/Microsoft.c:8081]: (style) The function 'MsGetMs' is never used. [src/Mayaqua/Microsoft.c:15333]: (style) The function 'MsGetMyDocumentsDir' is never used. [src/Mayaqua/Microsoft.c:15459]: (style) The function 'MsGetMyDocumentsDirW' is never used. [src/Mayaqua/Microsoft.c:11583]: (style) The function 'MsGetNetCfgRegKeyName' is never used. [src/Mayaqua/Microsoft.c:15317]: (style) The function 'MsGetPersonalAppDataDir' is never used. [src/Mayaqua/Microsoft.c:15325]: (style) The function 'MsGetPersonalDesktopDir' is never used. [src/Mayaqua/Microsoft.c:15301]: (style) The function 'MsGetPersonalProgramsDir' is never used. [src/Mayaqua/Microsoft.c:15293]: (style) The function 'MsGetPersonalStartMenuDir' is never used. [src/Mayaqua/Microsoft.c:15309]: (style) The function 'MsGetPersonalStartupDir' is never used. [src/Mayaqua/Microsoft.c:1737]: (style) The function 'MsGetPhysicalMacAddress' is never used. [src/Mayaqua/Microsoft.c:4113]: (style) The function 'MsGetProcAddress' is never used. [src/Mayaqua/Microsoft.c:15382]: (style) The function 'MsGetProgramFilesDirW' is never used. [src/Mayaqua/Microsoft.c:15273]: (style) The function 'MsGetProgramFilesDirX64' is never used. [src/Mayaqua/Microsoft.c:15269]: (style) The function 'MsGetProgramFilesDirX86' is never used. [src/Mayaqua/Microsoft.c:15394]: (style) The function 'MsGetProgramFilesDirX86W' is never used. [src/Mayaqua/Microsoft.c:715]: (style) The function 'MsGetSystemLocaleId' is never used. [src/Mayaqua/Microsoft.c:15345]: (style) The function 'MsGetUserName' is never used. [src/Mayaqua/Microsoft.c:15349]: (style) The function 'MsGetUserNameEx' is never used. [src/Mayaqua/Microsoft.c:15480]: (style) The function 'MsGetUserNameExW' is never used. [src/Mayaqua/Microsoft.c:15353]: (style) The function 'MsGetWinTempDir' is never used. [src/Mayaqua/Microsoft.c:15484]: (style) The function 'MsGetWinTempDirW' is never used. [src/Mayaqua/Microsoft.c:15366]: (style) The function 'MsGetWindowDirW' is never used. [src/Mayaqua/Microsoft.c:9042]: (style) The function 'MsGetWindowOwnerProcessExeNameW' is never used. [src/Mayaqua/Microsoft.c:15261]: (style) The function 'MsGetWindowsDrive' is never used. [src/Mayaqua/Microsoft.c:15378]: (style) The function 'MsGetWindowsDriveW' is never used. [src/Mayaqua/Microsoft.c:1251]: (style) The function 'MsInitEventLog' is never used. [src/Mayaqua/Microsoft.c:7937]: (style) The function 'MsInstallService' is never used. [src/Mayaqua/Microsoft.c:7128]: (style) The function 'MsIsCurrentDesktopAvailableForVnc' is never used. [src/Mayaqua/Microsoft.c:2352]: (style) The function 'MsIsDirectoryW' is never used. [src/Mayaqua/Microsoft.c:1979]: (style) The function 'MsIsFileLockedW' is never used. [src/Mayaqua/Microsoft.c:1947]: (style) The function 'MsIsLocalDriveW' is never used. [src/Mayaqua/Microsoft.c:12241]: (style) The function 'MsIsPasswordEmpty' is never used. [src/Mayaqua/Microsoft.c:1587]: (style) The function 'MsIsProcessExists' is never used. [src/Mayaqua/Microsoft.c:1618]: (style) The function 'MsIsProcessExistsW' is never used. [src/Mayaqua/Microsoft.c:1581]: (style) The function 'MsIsProcessIdExists' is never used. [src/Mayaqua/Microsoft.c:7386]: (style) The function 'MsIsRemoteDesktopCanEnableByRegistry' is never used. [src/Mayaqua/Microsoft.c:7228]: (style) The function 'MsIsTerminalServiceMultiUserInstalled' is never used. [src/Mayaqua/Microsoft.c:5349]: (style) The function 'MsIsTrayInited' is never used. [src/Mayaqua/Microsoft.c:1707]: (style) The function 'MsIsUseWelcomeLogin' is never used. [src/Mayaqua/Microsoft.c:7407]: (style) The function 'MsIsWin2000' is never used. [src/Mayaqua/Microsoft.c:4017]: (style) The function 'MsLoadLibraryRawW' is never used. [src/Mayaqua/Microsoft.c:2220]: (style) The function 'MsMakeDirEx' is never used. [src/Mayaqua/Microsoft.c:12425]: (style) The function 'MsNewIsLocked' is never used. [src/Mayaqua/Microsoft.c:3112]: (style) The function 'MsNoSleepEnd' is never used. [src/Mayaqua/Microsoft.c:3079]: (style) The function 'MsNoSleepStart' is never used. [src/Mayaqua/Microsoft.c:5083]: (style) The function 'MsPrintProcessList' is never used. [src/Mayaqua/Microsoft.c:13117]: (style) The function 'MsRegAccessMaskFor64Bit' is never used. [src/Mayaqua/Microsoft.c:1382]: (style) The function 'MsRegDeleteSubkeys' is never used. [src/Mayaqua/Microsoft.c:14064]: (style) The function 'MsRegGetValueTypeAndSize' is never used. [src/Mayaqua/Microsoft.c:14109]: (style) The function 'MsRegGetValueTypeAndSizeW' is never used. [src/Mayaqua/Microsoft.c:14226]: (style) The function 'MsRegNewKey' is never used. [src/Mayaqua/Microsoft.c:13903]: (style) The function 'MsRegReadValue' is never used. [src/Mayaqua/Microsoft.c:13964]: (style) The function 'MsRegReadValueW' is never used. [src/Mayaqua/Microsoft.c:1472]: (style) The function 'MsRegSubkeysToBuf' is never used. [src/Mayaqua/Microsoft.c:13528]: (style) The function 'MsRegWriteValue' is never used. [src/Mayaqua/Microsoft.c:13566]: (style) The function 'MsRegWriteValueW' is never used. [src/Mayaqua/Microsoft.c:3205]: (style) The function 'MsRunAsUserEx' is never used. [src/Mayaqua/Microsoft.c:6401]: (style) The function 'MsScmDispatcher' is never used. [src/Mayaqua/Microsoft.c:2849]: (style) The function 'MsSetFileToHiddenW' is never used. [src/Mayaqua/Microsoft.c:8099]: (style) The function 'MsSetThreadPriorityLow' is never used. [src/Mayaqua/Microsoft.c:3511]: (style) The function 'MsSetWow64FileSystemRedirectionEnable' is never used. [src/Mayaqua/Microsoft.c:12469]: (style) The function 'MsShutdownEx' is never used. [src/Mayaqua/Microsoft.c:5740]: (style) The function 'MsStopUserModeFromService' is never used. [src/Mayaqua/Microsoft.c:2260]: (style) The function 'MsUniDirectoryDelete' is never used. [src/Mayaqua/Microsoft.c:2290]: (style) The function 'MsUniFileDelete' is never used. [src/Mayaqua/Microsoft.c:6053]: (style) The function 'MsUserMode' is never used. [src/Mayaqua/Microsoft.c:1200]: (style) The function 'MsWriteEventLog' is never used. [src/Mayaqua/Microsoft.c:7684]: (style) The function 'EnumAllWindowEx' is never used. [src/Mayaqua/Microsoft.c:9587]: (style) The function 'MsCreateTempFileNameByExt' is never used. [src/Mayaqua/Microsoft.c:1794]: (style) The function 'MsDirectoryDelete' is never used. [src/Mayaqua/Microsoft.c:1876]: (style) The function 'MsExtractCabFromMsiW' is never used. [src/Mayaqua/Microsoft.c:1937]: (style) The function 'MsExtractCabW' is never used. [src/Mayaqua/Microsoft.c:2047]: (style) The function 'MsExtractResourceFromExeW' is never used. [src/Mayaqua/Microsoft.c:1806]: (style) The function 'MsFileDelete' is never used. [src/Mayaqua/Microsoft.c:13842]: (style) The function 'MsGetCommonAppDataDir' is never used. [src/Mayaqua/Microsoft.c:2105]: (style) The function 'MsGetFileVersion' is never used. [src/Mayaqua/Microsoft.c:1344]: (style) The function 'MsGetPhysicalMacAddressFromApi' is never used. [src/Mayaqua/Microsoft.c:1415]: (style) The function 'MsGetPhysicalMacAddressFromNetbios' is never used. [src/Mayaqua/Microsoft.c:7975]: (style) The function 'MsGetProcessExeNameW' is never used. [src/Mayaqua/Microsoft.c:1253]: (style) The function 'MsGetProcessNameFromId' is never used. [src/Mayaqua/Microsoft.c:1534]: (style) The function 'MsIsFileLocked' is never used. [src/Mayaqua/Microsoft.c:1495]: (style) The function 'MsIsLocalDrive' is never used. [src/Mayaqua/Microsoft.c:11079]: (style) The function 'MsIsLockedThreadProc' is never used. [src/Mayaqua/Microsoft.c:6314]: (style) The function 'MsIsRemoteDesktopEnabled' is never used. [src/Mayaqua/Microsoft.c:2184]: (style) The function 'MsNoSleepThread' is never used. [src/Mayaqua/Microsoft.c:2224]: (style) The function 'MsNoSleepThreadVista' is never used. [src/Mayaqua/Microsoft.c:12681]: (style) The function 'MsRegGetValueTypeAndSizeEx' is never used. [src/Mayaqua/Microsoft.c:12722]: (style) The function 'MsRegGetValueTypeAndSizeExW' is never used. [src/Mayaqua/Microsoft.c:12835]: (style) The function 'MsRegNewKeyEx' is never used. [src/Mayaqua/Microsoft.c:12528]: (style) The function 'MsRegReadValueEx' is never used. [src/Mayaqua/Microsoft.c:12585]: (style) The function 'MsRegReadValueExW' is never used. [src/Mayaqua/Microsoft.c:12161]: (style) The function 'MsRegWriteValueEx' is never used. [src/Mayaqua/Microsoft.c:12195]: (style) The function 'MsRegWriteValueExW' is never used. [src/Mayaqua/Microsoft.c:2460]: (style) The function 'MsRunAsUserExInner' is never used. [src/Mayaqua/Microsoft.c:2162]: (style) The function 'MsSetFileToHidden' is never used. [src/Mayaqua/Microsoft.c:1818]: (style) The function 'MsUniIsDirectory' is never used. [src/Mayaqua/Microsoft.c:8771]: (style) The function 'MsCreateTempFileName' is never used. [src/Mayaqua/Microsoft.c:1619]: (style) The function 'MsExtractResourceFromExe' is never used. [src/Mayaqua/Microsoft.c:1595]: (style) The function 'MsGetCabarcExeFilenameW' is never used. [src/Mayaqua/Microsoft.c:1568]: (style) The function 'MsIsDirectory' is never used. [src/Mayaqua/Microsoft.c:10153]: (style) The function 'MsIsLockedWindowHandlerWindowProc' is never used. [src/Mayaqua/Microsoft.c:5621]: (style) The function 'MsIsRemoteDesktopAvailable' is never used. [src/Mayaqua/Microsoft.c:11787]: (style) The function 'MsRegGetValueTypeAndSizeEx2W' is never used. [src/Mayaqua/Microsoft.c:11502]: (style) The function 'MsRegGetValueTypeAndSizeEx2' is never used.
2018-05-30 00:20:47 +03:00
2014-01-04 17:00:08 +04:00
bool MsUniMakeDir(wchar_t *name);
void MsUniMakeDirEx(wchar_t *name);
bool MsMakeDir(char *name);
bool MsExecute(char *exe, char *arg);
bool MsExecute2(char *exe, char *arg, bool runas);
bool MsExecuteW(wchar_t *exe, wchar_t *arg);
bool MsExecute2W(wchar_t *exe, wchar_t *arg, bool runas);
bool MsExecuteEx(char *exe, char *arg, void **process_handle);
bool MsExecuteEx2(char *exe, char *arg, void **process_handle, bool runas);
bool MsExecuteEx2W(wchar_t *exe, wchar_t *arg, void **process_handle, bool runas);
void MsCloseHandle(void *handle);
UINT MsWaitProcessExit(void *process_handle);
void MsUpdateSystem();
UINT64 MsGetHiResCounter();
double MsGetHiResTimeSpan(UINT64 diff);
UINT64 MsGetHiResTimeSpanUSec(UINT64 diff);
void MsRestartMMCSS();
bool MsIsMMCSSNetworkThrottlingEnabled();
void MsSetMMCSSNetworkThrottlingEnable(bool enable);
void MsSetShutdownParameters(UINT level, UINT flag);
bool MsIsWinXPOrWinVista();
bool MsGetFileInformation(void *h, void *info);
void MsSetErrorModeToSilent();
void MsSetEnableMinidump(bool enabled);
bool MsIsMinidumpEnabled();
2014-01-04 17:00:08 +04:00
void MsWriteMinidump(wchar_t *filename, void *ex);
void *MsInitGlobalLock(char *name, bool ts_local);
void MsGlobalLock(void *p);
void MsGlobalUnlock(void *p);
void MsFreeGlobalLock(void *p);
void *MsOpenOrCreateGlobalPulse(char *name);
bool MsWaitForGlobalPulse(void *p, UINT timeout);
void MsCloseGlobalPulse(void *p);
void MsSendGlobalPulse(void *p);
bool MsPerformMsChapV2AuthByLsa(char *username, UCHAR *challenge8, UCHAR *client_response_24, UCHAR *ret_pw_hash_hash);
void MsDisableWcmNetworkMinimize();
bool MsSetFileSecureAcl(wchar_t *path);
bool MsGetMsiInstalledDir(char *component_code, wchar_t *dir, UINT dir_size);
bool MsMsiUninstall(char *product_code, HWND hWnd, bool *reboot_required);
UINT MsGetUserLocaleId();
bool MsIsCurrentUserLocaleIdJapanese();
TOKEN_LIST *MsEnumResources(void *hModule, char *type);
void *MsGetCurrentModuleHandle();
bool MsIsAeroEnabled();
bool MsIsAeroColor();
bool MsIsInVmMain();
bool MsIsInVm();
void MsTest();
bool MsSaveSystemInfo(wchar_t *dst_filename);
bool MsCollectVpnInfo(BUF *bat, char *tmpdir, char *svc_name, wchar_t *config_name, wchar_t *logdir_name);
void MsInitProcessCallOnce();
2014-01-04 17:00:08 +04:00
2015-04-03 23:58:09 +03:00
MS_SUSPEND_HANDLER *MsNewSuspendHandler();
void MsFreeSuspendHandler(MS_SUSPEND_HANDLER *h);
void MsBeginVLanCard();
void MsEndVLanCard();
bool MsIsVLanCardShouldStop();
void MsProcEnterSuspend();
void MsProcLeaveSuspend();
2015-05-31 13:02:35 +03:00
UINT64 MsGetSuspendModeBeginTick();
2015-04-03 23:58:09 +03:00
2014-01-04 17:00:08 +04:00
// Inner functions
2021-04-05 05:48:25 +03:00
#ifdef MICROSOFT_C
#include <SetupAPI.h>
2014-01-04 17:00:08 +04:00
LONG CALLBACK MsExceptionHandler(struct _EXCEPTION_POINTERS *ExceptionInfo);
HKEY MsGetRootKeyFromInt(UINT root);
void MsDestroyDevInfo(HDEVINFO info);
HDEVINFO MsGetDevInfoFromDeviceId(SP_DEVINFO_DATA *dev_info_data, char *device_id);
bool MsStartDevice(HDEVINFO info, SP_DEVINFO_DATA *dev_info_data);
bool MsStopDevice(HDEVINFO info, SP_DEVINFO_DATA *dev_info_data);
bool MsDeleteDevice(HDEVINFO info, SP_DEVINFO_DATA *dev_info_data);
bool MsIsDeviceRunning(HDEVINFO info, SP_DEVINFO_DATA *dev_info_data);
void CALLBACK MsServiceDispatcher(DWORD argc, LPTSTR *argv);
void CALLBACK MsServiceHandler(DWORD opcode);
2014-01-04 17:00:08 +04:00
bool MsServiceStopProc();
void MsServiceStoperMainThread(THREAD *t, void *p);
void MsServiceStarterMainThread(THREAD *t, void *p);
LRESULT CALLBACK MsUserModeWindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
bool MsShowIconOnTray(HWND hWnd, HICON icon, wchar_t *tooltip, UINT msg);
void MsRestoreIconOnTray();
void MsChangeIconOnTray(HICON icon, wchar_t *tooltip);
bool MsChangeIconOnTrayEx(HICON icon, wchar_t *tooltip, wchar_t *info_title, wchar_t *info, UINT info_flags, bool add);
void MsHideIconOnTray();
void MsUserModeTrayMenu(HWND hWnd);
bool MsAppendMenu(HMENU hMenu, UINT flags, UINT_PTR id, wchar_t *str);
bool MsInsertMenu(HMENU hMenu, UINT pos, UINT flags, UINT_PTR id_new_item, wchar_t *lp_new_item);
BOOL CALLBACK MsEnumChildWindowProc(HWND hWnd, LPARAM lParam);
2014-01-04 17:00:08 +04:00
BOOL CALLBACK EnumTopWindowProc(HWND hWnd, LPARAM lParam);
BOOL CALLBACK MsEnumThreadWindowProc(HWND hWnd, LPARAM lParam);
2014-01-04 17:00:08 +04:00
HANDLE MsCreateUserToken();
SID *MsGetSidFromAccountName(char *name);
void MsFreeSid(SID *sid);
BOOL CALLBACK MsEnumResourcesInternalProc(HMODULE hModule, const char *type, char *name, LONG_PTR lParam);
2015-04-03 23:58:09 +03:00
LRESULT CALLBACK MsSuspendHandlerWindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
void MsSuspendHandlerThreadProc(THREAD *thread, void *param);
2021-04-05 05:48:25 +03:00
#endif // MICROSOFT_C
2015-04-03 23:58:09 +03:00
2021-04-05 05:48:25 +03:00
#endif // MICROSOFT_H
2014-01-04 17:00:08 +04:00
2021-04-05 05:48:25 +03:00
#endif // OS_WIN32