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.

96 lines
1.2 KiB

  1. /*++
  2. Copyright (c) 1990 Microsoft Corporation
  3. Module Name:
  4. mbrfile.c
  5. Abstract:
  6. BSC database file Opening and closing code for the MS Editor
  7. browser extension.
  8. Author:
  9. Ramon Juan San Andres (ramonsa) 06-Nov-1990
  10. Revision History:
  11. --*/
  12. #include "mbr.h"
  13. #include <fcntl.h>
  14. /**************************************************************************/
  15. flagType
  16. pascal
  17. OpenDataBase (
  18. IN char * Path
  19. )
  20. /*++
  21. Routine Description:
  22. Opens a BSC database.
  23. Arguments:
  24. Path - Name of file containing database
  25. Return Value:
  26. TRUE if database opened successfully, FALSE otherwise.
  27. --*/
  28. {
  29. if (BscInUse) {
  30. CloseBSC();
  31. }
  32. if (!FOpenBSC(Path)) {
  33. BscInUse = FALSE;
  34. } else {
  35. BscInUse = TRUE;
  36. }
  37. return BscInUse;
  38. }
  39. /**************************************************************************/
  40. void
  41. pascal
  42. CloseDataBase (
  43. void
  44. )
  45. /*++
  46. Routine Description:
  47. Closes current BSC database.
  48. Arguments:
  49. None
  50. Return Value:
  51. None.
  52. --*/
  53. {
  54. CloseBSC();
  55. BscInUse = FALSE;
  56. }