Source code of Windows XP (NT5)
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.

57 lines
1.3 KiB

  1. /*** hinfo.c - helpgetinfo support
  2. *
  3. * Copyright <C> 1989, Microsoft Corporation
  4. *
  5. * Purpose:
  6. *
  7. * Revision History:
  8. *
  9. * [] 09-Mar-1989 LN Created
  10. *
  11. *************************************************************************/
  12. #include <stdio.h>
  13. #if defined (OS2)
  14. #else
  15. #include <windows.h>
  16. #endif
  17. #include "help.h" /* global (help & user) decl */
  18. #include "helpfile.h" /* help file format definition */
  19. #include "helpsys.h" /* internal (help sys only) decl*/
  20. /*
  21. ** external definitions
  22. */
  23. f pascal near LoadFdb (mh, fdb far *);
  24. /*** HelpGetInfo - Return public info to caller
  25. *
  26. * Returns a data structure to the caller which allows him into some of
  27. * our internal data.
  28. *
  29. * Input:
  30. * ncInfo = nc requesting info on
  31. * fpDest = pointer to location to place into
  32. * cbDest = size of destination
  33. *
  34. * Output:
  35. * Returns NULL on success, count of bytes required if cbDest too small,
  36. * or -1 on any other error
  37. *
  38. *************************************************************************/
  39. int far pascal LOADDS HelpGetInfo (
  40. nc ncInfo,
  41. helpinfo far *fpDest,
  42. int cbDest
  43. ) {
  44. if (cbDest < sizeof (helpinfo))
  45. return sizeof (helpinfo);
  46. if (LoadFdb (ncInfo.mh, &(fpDest->fileinfo))) {
  47. fpDest->filename[0] = 0;
  48. return 0;
  49. }
  50. return -1;
  51. /* end HelpGetInfo */}