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.

49 lines
1008 B

  1. #include <pch.cpp>
  2. #pragma hdrstop
  3. static DWORD g_dwHandleListUseCount;
  4. static PPROV_LIST_ITEM g_pProvList = NULL; // ptr to loaded providers
  5. extern HANDLE hServerStopEvent;
  6. extern DWORD g_dwLastHandleIssued;
  7. // sacp.cpp
  8. BOOL InitMyProviderHandle();
  9. void UnInitMyProviderHandle();
  10. PROV_LIST_ITEM g_liProv = {0}; // global list item for base prov.
  11. BOOL ListConstruct()
  12. {
  13. // create internal provider handle
  14. if(!InitMyProviderHandle())
  15. return FALSE;
  16. return TRUE;
  17. }
  18. void ListTeardown()
  19. {
  20. // free internal provider handle
  21. UnInitMyProviderHandle();
  22. }
  23. // internal: prov search by name
  24. PPROV_LIST_ITEM SearchProvListByID(const PST_PROVIDERID* pProviderID)
  25. {
  26. SS_ASSERT(pProviderID != NULL);
  27. static const GUID guidBaseProvider = MS_BASE_PSTPROVIDER_ID;
  28. if( memcmp( &guidBaseProvider, pProviderID, sizeof(guidBaseProvider) ) != 0 )
  29. return NULL;
  30. return &g_liProv;
  31. }