Source code of Windows XP (NT5)
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.

115 lines
2.1 KiB

  1. #if !defined( _NSEPM_INCLUDE )
  2. #define _NSEPM_INCLUDE
  3. #define INITIAL_HANDLE_TABLE_SIZE 16
  4. #define HANDLE_TABLE_REALLOC_JUMP 16
  5. class OPEN_CTX {
  6. public:
  7. OPEN_CTX( DWORD dwAccess );
  8. ~OPEN_CTX();
  9. LPSTR GetPath() { return m_asPath.Get(); }
  10. BOOL SetPath( LPSTR pszPath ) { return m_asPath.Set( pszPath ); }
  11. BOOL AppendPath( LPSTR pszPath ) { return m_asPath.Append( pszPath ); }
  12. DWORD GetAccess() const { return m_dwAccess; }
  13. DWORD GetHandle() const { return m_dwHandle; }
  14. static OPEN_CTX* MapHandleToContext( DWORD dwHandle );
  15. static DWORD InitializeHandleTable();
  16. static DWORD TerminateHandleTable();
  17. private:
  18. static OPEN_CTX ** sm_pHandleTable;
  19. static CRITICAL_SECTION sm_csHandleTableLock;
  20. static DWORD sm_cHandleEntries;
  21. static DWORD sm_cMaxHandleEntries;
  22. CAllocString m_asPath;
  23. DWORD m_dwAccess;
  24. DWORD m_dwHandle;
  25. };
  26. typedef OPEN_CTX* POPEN_CTX;
  27. BOOL
  28. NseAddObj(
  29. LPSTR pszPath
  30. );
  31. BOOL
  32. NseDeleteObj(
  33. LPSTR pszPath
  34. );
  35. BOOL
  36. NseGetProp(
  37. LPSTR pszPath,
  38. PMETADATA_RECORD pMD,
  39. LPDWORD pdwReq
  40. );
  41. BOOL
  42. NseGetPropByIndex(
  43. LPSTR pszPath,
  44. PMETADATA_RECORD pMD,
  45. DWORD dwI,
  46. LPDWORD pdwReq
  47. );
  48. BOOL
  49. NseGetAllProp(
  50. LPSTR pszPath,
  51. DWORD dwMDAttributes,
  52. DWORD dwMDUserType,
  53. DWORD dwMDDataType,
  54. DWORD *pdwMDNumDataEntries,
  55. DWORD *pdwMDDataSetNumber,
  56. DWORD dwMDBufferSize,
  57. unsigned char *pbBuffer,
  58. DWORD *pdwMDRequiredBufferSize
  59. );
  60. BOOL
  61. NseEnumObj(
  62. LPSTR pszPath,
  63. LPBYTE pszMDName,
  64. DWORD dwMDEnumObjectIndex
  65. );
  66. BOOL
  67. NseSetProp(
  68. LPSTR pszPath,
  69. PMETADATA_RECORD pMD
  70. );
  71. BOOL
  72. NseReleaseObjs(
  73. );
  74. BOOL
  75. NseOpenObjs(
  76. LPSTR pszPath
  77. );
  78. BOOL
  79. NseCloseObjs(
  80. BOOL
  81. );
  82. BOOL
  83. NseSaveObjs(
  84. );
  85. BOOL
  86. NseMappingInitialize(
  87. );
  88. BOOL
  89. NseMappingTerminate(
  90. );
  91. extern IMDCOM* g_pMdIf;
  92. #endif