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.

47 lines
904 B

  1. /*++
  2. Copyright (C) 1999 Microsoft Coporation
  3. Module Name:
  4. readdb.c
  5. Abstract:
  6. This module reads the configuration from the db into MM data
  7. structures for whistler+
  8. --*/
  9. #include <precomp.h>
  10. DWORD
  11. DhcpeximReadDatabaseConfiguration(
  12. IN OUT PM_SERVER *Server
  13. )
  14. {
  15. DWORD Error;
  16. HMODULE hDll;
  17. FARPROC pDhcpOpenAndReadDatabaseConfig;
  18. hDll = LoadLibrary(TEXT("DHCPSSVC.DLL"));
  19. if( NULL == hDll ) return GetLastError();
  20. pDhcpOpenAndReadDatabaseConfig = GetProcAddress(
  21. hDll, "DhcpOpenAndReadDatabaseConfig" );
  22. if( NULL == pDhcpOpenAndReadDatabaseConfig ) {
  23. Error = GetLastError();
  24. } else {
  25. Error = (DWORD)pDhcpOpenAndReadDatabaseConfig(
  26. DhcpEximOemDatabaseName, DhcpEximOemDatabasePath,
  27. Server );
  28. }
  29. FreeLibrary(hDll);
  30. return Error;
  31. }