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.

87 lines
2.4 KiB

  1. //=================================================================
  2. //
  3. // UserEnvApi.h
  4. //
  5. // Copyright (c) 1999-2001 Microsoft Corporation, All Rights Reserved
  6. //
  7. //=================================================================
  8. #ifndef _UserEnvAPI_H_
  9. #define _UserEnvAPI_H_
  10. /******************************************************************************
  11. * #includes to Register this class with the CResourceManager.
  12. *****************************************************************************/
  13. #include "DllWrapperBase.h"
  14. extern const GUID g_guidUserEnvApi;
  15. extern const TCHAR g_tstrUserEnv[];
  16. /******************************************************************************
  17. * Function pointer typedefs. Add new functions here as required.
  18. *****************************************************************************/
  19. typedef BOOL (WINAPI *PFN_UserEnv_GET_DISK_FREE_SPACE_EX)
  20. (
  21. LPCTSTR lpDirectoryName,
  22. PULARGE_INTEGER lpFreeBytesAvailableToCaller,
  23. PULARGE_INTEGER lpTotalNumberOfBytes,
  24. PULARGE_INTEGER lpTotalNumberOfFreeBytes
  25. );
  26. typedef BOOL ( WINAPI *PFN_UserEnv_CREATEENVIRONMENTBLOCK )
  27. (
  28. OUT LPVOID *lpEnvironment,
  29. IN HANDLE hToken,
  30. IN BOOL bInherit
  31. );
  32. typedef BOOL ( WINAPI *PFN_UserEnv_DESTROYENVIRONMENTBLOCK )
  33. (
  34. IN LPVOID lpEnvironment
  35. );
  36. /******************************************************************************
  37. * Wrapper class for UserEnv load/unload, for registration with CResourceManager.
  38. ******************************************************************************/
  39. class __declspec(uuid("3CA401C6-D477-11d2-B35E-00104BC97924")) CUserEnvApi : public CDllWrapperBase
  40. {
  41. private:
  42. // Member variables (function pointers) pointing to UserEnv functions.
  43. // Add new functions here as required.
  44. PFN_UserEnv_DESTROYENVIRONMENTBLOCK m_pfnDestroyEnvironmentBlock ;
  45. PFN_UserEnv_CREATEENVIRONMENTBLOCK m_pfnCreateEnvironmentBlock ;
  46. public:
  47. // Constructor and destructor:
  48. CUserEnvApi ( LPCTSTR a_tstrWrappedDllName ) ;
  49. ~CUserEnvApi () ;
  50. // Inherrited initialization function.
  51. virtual bool Init();
  52. // Member functions wrapping UserEnv functions.
  53. // Add new functions here as required:
  54. BOOL CreateEnvironmentBlock (
  55. OUT LPVOID *lpEnvironment,
  56. IN HANDLE hToken,
  57. IN BOOL bInherit
  58. );
  59. BOOL DestroyEnvironmentBlock (
  60. IN LPVOID lpEnvironment
  61. );
  62. };
  63. #endif