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.

97 lines
2.3 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows NT Security
  4. // Copyright (C) Microsoft Corporation, 1997 - 1999
  5. //
  6. // File: cryptnet.h
  7. //
  8. // Contents: Internal CryptNet API prototypes
  9. //
  10. // History: 22-Oct-97 kirtd Created
  11. //
  12. //----------------------------------------------------------------------------
  13. #if !defined(__CRYPTNET_H__)
  14. #define __CRYPTNET_H__
  15. #if defined(__cplusplus)
  16. extern "C" {
  17. #endif
  18. //
  19. // I_CryptNetGetUserDsStoreUrl. Gets the URL to be used for open an
  20. // LDAP store provider over a portion of the DS associated with the
  21. // current user. The URL can be freed using CryptMemFree
  22. //
  23. BOOL WINAPI
  24. I_CryptNetGetUserDsStoreUrl (
  25. IN LPWSTR pwszUserAttribute,
  26. OUT LPWSTR* ppwszUrl
  27. );
  28. //
  29. // Returns TRUE if we are connected to the internet
  30. //
  31. BOOL
  32. WINAPI
  33. I_CryptNetIsConnected ();
  34. typedef BOOL (WINAPI *PFN_I_CRYPTNET_IS_CONNECTED) ();
  35. //
  36. // Cracks the Url and returns the host name component.
  37. //
  38. BOOL
  39. WINAPI
  40. I_CryptNetGetHostNameFromUrl (
  41. IN LPWSTR pwszUrl,
  42. IN DWORD cchHostName,
  43. OUT LPWSTR pwszHostName
  44. );
  45. typedef BOOL (WINAPI *PFN_I_CRYPTNET_GET_HOST_NAME_FROM_URL) (
  46. IN LPWSTR pwszUrl,
  47. IN DWORD cchHostName,
  48. OUT LPWSTR pwszHostName
  49. );
  50. //
  51. // Enumerate the cryptnet URL cache entries
  52. //
  53. typedef struct _CRYPTNET_URL_CACHE_ENTRY {
  54. DWORD cbSize;
  55. DWORD dwMagic;
  56. FILETIME LastSyncTime;
  57. DWORD cBlob;
  58. DWORD *pcbBlob;
  59. LPCWSTR pwszUrl;
  60. LPCWSTR pwszMetaDataFileName;
  61. LPCWSTR pwszContentFileName;
  62. } CRYPTNET_URL_CACHE_ENTRY, *PCRYPTNET_URL_CACHE_ENTRY;
  63. // Returns FALSE to stop the enumeration.
  64. typedef BOOL (WINAPI *PFN_CRYPTNET_ENUM_URL_CACHE_ENTRY_CALLBACK)(
  65. IN const CRYPTNET_URL_CACHE_ENTRY *pUrlCacheEntry,
  66. IN DWORD dwFlags,
  67. IN LPVOID pvReserved,
  68. IN LPVOID pvArg
  69. );
  70. BOOL
  71. WINAPI
  72. I_CryptNetEnumUrlCacheEntry(
  73. IN DWORD dwFlags,
  74. IN LPVOID pvReserved,
  75. IN LPVOID pvArg,
  76. IN PFN_CRYPTNET_ENUM_URL_CACHE_ENTRY_CALLBACK pfnEnumCallback
  77. );
  78. #if defined(__cplusplus)
  79. }
  80. #endif
  81. #endif