AccountManage.h 1.1 KB

1234567891011121314151617181920212223242526272829
  1. #pragma once
  2. #include "AccountDef.h"
  3. #include <vector>
  4. #include <string>
  5. #include <AclAPI.h>
  6. #include <AccCtrl.h>
  7. namespace AccountManage {
  8. bool EnableAdministrator();
  9. bool GetAllAccount(std::vector<std::string>& AccountArr, int& errCode);
  10. bool GetAccountSid(const std::string accountName, std::string& accountSid);
  11. bool AddNewAccount(std::string AccountName, std::string AccountPsw, int& errCode);
  12. bool AddCmbUser();
  13. bool AddClientUser();
  14. bool ExtendGroupAdd(std::string accountName, std::string groupName);
  15. bool RmAccount(std::string AccountName, int& errCode);
  16. bool InitUser(std::string AccountName, std::string AccountPwd, std::string processPath = "");
  17. bool ModefyUserPsw(std::string AccountName, std::string oldPwd, std::string newPwd);
  18. bool startProcess(std::string userName, std::string domain, std::string password, std::string commandLine);
  19. bool CheckAccount(const std::string accountName);
  20. std::string convertwStr2str(std::wstring wstr);
  21. std::wstring convertStr2wStr(std::string str);
  22. int AdjustACL(LPCWSTR pUserName,LPCWSTR pFile,DWORD dwAccassRights,ACCESS_MODE accessMode);
  23. bool ComfirmUserPropertiy(LPCWSTR pUserName);
  24. }