Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.5 KiB

  1. #if !defined(AFX_REMOTEENV_H__1B164072_460A_432a_99C0_26941B44FC53__INCLUDED_)
  2. #define AFX_REMOTEENV_H__1B164072_460A_432a_99C0_26941B44FC53__INCLUDED_
  3. #if _MSC_VER > 1000
  4. #pragma once
  5. #endif // _MSC_VER > 1000
  6. /////////////////////////////////////////////////////////////////////////////
  7. class CRemoteExpandEnvironmentStrings
  8. {
  9. public:
  10. CRemoteExpandEnvironmentStrings();
  11. ~CRemoteExpandEnvironmentStrings();
  12. BOOL SetMachineName(IN LPCTSTR szMachineName);
  13. BOOL NewRemoteEnvironment();
  14. void DeleteRemoteEnvironment();
  15. NET_API_STATUS RemoteExpandEnvironmentStrings(IN LPCTSTR UnexpandedString,OUT LPTSTR * ExpandedString);
  16. protected:
  17. PVOID m_pEnvironment;
  18. LPTSTR m_lpszUncServerName;
  19. private:
  20. DWORD SetOtherEnvironmentValues(void **pEnv);
  21. BOOL SetEnvironmentVariables(void **pEnv);
  22. BOOL IsLocalMachine(LPCTSTR psz);
  23. BOOL SetEnvironmentVariableInBlock(void **pEnv, LPTSTR lpVariable,LPTSTR lpValue, BOOL bOverwrite);
  24. BOOL SetUserEnvironmentVariable(void **pEnv, LPTSTR lpVariable, LPTSTR lpValue, BOOL bOverwrite);
  25. BOOL BuildEnvironmentPath(void **pEnv, LPTSTR lpPathVariable, LPTSTR lpPathValue);
  26. DWORD ExpandUserEnvironmentStrings(void *pEnv, LPTSTR lpSrc, LPTSTR lpDst, DWORD nSize);
  27. DWORD GetRegKeyMaxSizes(IN HKEY WinRegHandle,OUT LPDWORD MaxKeywordSize OPTIONAL,OUT LPDWORD MaxValueSize OPTIONAL);
  28. };
  29. /////////////////////////////////////////////////////////////////////////////
  30. #endif // !defined(AFX_REMOTEENV_H__1B164072_460A_432a_99C0_26941B44FC53__INCLUDED_)