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.

45 lines
873 B

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