home *** CD-ROM | disk | FTP | other *** search
/ cyber.net 2 / cybernet2.ISO / qtw111 / mplayer / common.h < prev    next >
C/C++ Source or Header  |  1993-03-18  |  5KB  |  130 lines

  1.  
  2. // ---------------------------------------------------------------------
  3. //
  4. // Common.h - Common Routines - QuickTime for Windows
  5. //
  6. //            Version 1.0
  7. //
  8. //            (c) 1988-1992 Apple Computer, Inc. All Rights Reserved.
  9. //
  10. // ---------------------------------------------------------------------
  11.  
  12.  
  13.  
  14. // Prevent multiple inclusion
  15. // --------------------------
  16.    #ifndef COMMON_H
  17.       #define COMMON_H
  18.  
  19.  
  20. // Constants
  21. // ---------
  22.    #define CCHMAXPATH 264
  23.    #define COMMON_STRING_MAX 256
  24.  
  25.  
  26. // Module Names & Entrypoints
  27. // --------------------------
  28.    #define QTPREFIX "QT"
  29.  
  30.    #define QTW_PROFILE "QTW.INI"
  31.  
  32.  
  33.  
  34. // Functions
  35. // -----------------------------------------------------------------------
  36.    #ifdef __cplusplus
  37.       extern "C" {
  38.    #endif
  39.  
  40. // -----------------------------------------------------------------------
  41. // CommonAlloc allocates some memory from the heap. It returns a far
  42. // pointer to that memory, or NULL if an error occurred.
  43. //
  44. //   LONG lBytes;            /* Size of memory to allocate */
  45. //
  46.      VOID FAR * FAR CommonAlloc (LONG lBytes);
  47.  
  48. // -----------------------------------------------------------------------
  49. // CommonFormatMessage formats a message in memory from a string in a
  50. // resource-only DLL.
  51. //
  52. //   HINSTANCE hResources;   /* Handle to resource-only DLL */
  53. //   WORD idMsg;             /* ID of message string in DLL */
  54. //   LPSTR lpszMsg;          /* Area in which to build message */
  55. //   ...                     /* Substitution symbols (like vsprintf) */
  56. //
  57.      LPSTR FAR CommonFormatMessage (HINSTANCE hResources, WORD idMsg, LPSTR lpszMsg, ...);
  58.  
  59. // -----------------------------------------------------------------------
  60. // CommonFree frees memory allocated by CommonAlloc.
  61. //
  62. //   VOID FAR *pvMemory;     /* -->Memory allocated by CommonAlloc */
  63. //
  64.      VOID FAR CommonFree (VOID FAR *pvMemory);
  65.  
  66. // --------------------------------------------------------------------
  67. // CommonGetDirectoryOfModule returns the directory path of the calling routine.
  68. // The returned path DOES NOT contain a final '\'
  69. //
  70. //   HINSTANCE hInstance;      /* Application's instance handle */
  71. //   LPSTR lpPath;             /* pointer to path buffer */
  72. //
  73.      LPSTR FAR CommonGetDirectoryOfModule (HINSTANCE hInstance, LPSTR lpPath );
  74.  
  75. // -----------------------------------------------------------------------
  76. // CommonGetLocalizedHelpFile returns the name of the application's
  77. // localized Help File.
  78. //
  79. //   LPSTR lpszAppl;          /* Application's root name, eg: INST */
  80. //   LPSTR lpszName;          /* Area in which to build help file name */
  81. //   HINSTANCE hInstance;     /* Application's instance handle */
  82. //
  83.      LPSTR FAR CommonGetLocalizedHelpFile (LPSTR lpszAppl, LPSTR lpszName, HINSTANCE hInstance);
  84.  
  85. // -----------------------------------------------------------------------
  86. // CommonGetLocalizedResources returns the handle of the application's
  87. // localized resource-only DLL.
  88. //
  89. //   LPSTR lpszAppl;         /* Application's root name, eg: INST */
  90. //   HINSTANCE hInstance;    /* Application's instance handle */
  91. //   WORD idNoMemMsg;        /* Application's no-memory message */
  92. //
  93.      HINSTANCE FAR CommonGetLocalizedResources (LPSTR lpszAppl, HINSTANCE hInstance, WORD idNoMemMsg);
  94.  
  95. // -----------------------------------------------------------------------
  96. // CommonGetCurrentRegion returns the Mac region code corresponding
  97. // to the current Windows language code.
  98. //
  99. //
  100.      UINT FAR CommonGetCurrentRegion (VOID);
  101.  
  102. // -----------------------------------------------------------------------
  103. // CommonTellUser displays a message to the user from a string in a
  104. // resource-only DLL. CommonTellUser returns the user reply directly
  105. // from the Windows MessageBox function.
  106. //
  107. //   HINSTANCE hResources;   /* Handle to resource-only DLL */
  108. //   WORD idMsg;             /* ID of message string in DLL */
  109. //   WORD idCaption;         /* ID of caption string in DLL */
  110. //   WORD idStyle;           /* Message box styles */
  111. //   ...                     /* Substitution symbols (like sprintf) */
  112. //
  113.      int FAR CommonTellUser (HINSTANCE hResources, WORD idMsg, WORD idCaption, WORD idStyle, ...);
  114.  
  115. // -----------------------------------------------------------------------
  116. // CommonSpeed returns an approximation of the speed of the processor.
  117. //
  118.      DWORD FAR CommonSpeed (VOID);
  119.  
  120. // -----------------------------------------------------------------------
  121.    #ifdef __cplusplus
  122.       }
  123.    #endif
  124. // -----------------------------------------------------------------------
  125.  
  126.  
  127. // End of Common.H
  128. // ---------------
  129.    #endif
  130.