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.

57 lines
1.0 KiB

  1. typedef struct _nds_context_handle {
  2. LIST_ENTRY List ;
  3. ULONG RefCount ;
  4. DWORD Flags ;
  5. LPWSTR pszNDSTreeName;
  6. CCredentials *pCredentials;
  7. NWDSContextHandle hContext;
  8. BOOL fLoggedIn;
  9. } NDS_CONTEXT, *PNDS_CONTEXT;
  10. typedef HANDLE NDS_CONTEXT_HANDLE, *PNDS_CONTEXT_HANDLE;
  11. #define MAX_BIND_CACHE_SIZE 100
  12. #define ENTER_BIND_CRITSECT() EnterCriticalSection(&BindCacheCritSect)
  13. #define LEAVE_BIND_CRITSECT() LeaveCriticalSection(&BindCacheCritSect)
  14. #define NDS_CACHE_INVALID (0x00000001)
  15. HRESULT
  16. BindCacheAllocEntry(
  17. NDS_CONTEXT **ppCacheEntry
  18. ) ;
  19. VOID
  20. BindCacheInvalidateEntry(
  21. NDS_CONTEXT *pCacheEntry
  22. ) ;
  23. PNDS_CONTEXT
  24. BindCacheLookup(
  25. LPWSTR pszNDSTreeName,
  26. CCredentials& Credentials
  27. ) ;
  28. HRESULT
  29. BindCacheAdd(
  30. LPWSTR pszNDSTreeName,
  31. CCredentials& Credentials,
  32. BOOL fLoggedIn,
  33. NDS_CONTEXT *pCacheEntry
  34. ) ;
  35. DWORD
  36. BindCacheDeref(
  37. NDS_CONTEXT *pCacheEntry
  38. ) ;
  39. VOID
  40. BindCacheInit(
  41. VOID
  42. );
  43. VOID
  44. BindCacheCleanup(
  45. VOID
  46. );