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.

159 lines
5.0 KiB

  1. //==========================================================================;
  2. //
  3. // compmani.h
  4. //
  5. // Copyright (c) 1994 - 1995 Microsoft Corporation. All Rights Reserved.
  6. //
  7. // Description:
  8. // Internal COMPMAN header file. Defines some internal
  9. // data structures and things not needed outside of COMPMAN itself.
  10. //
  11. // History:
  12. // 07/07/94 frankye
  13. //
  14. //==========================================================================;
  15. #if !defined NUMELMS
  16. #define NUMELMS(aa) (sizeof(aa)/sizeof((aa)[0]))
  17. #define FIELDOFF(type,field) (&(((type)0)->field))
  18. #define FIELDSIZ(type,field) (sizeof(((type)0)->field))
  19. #endif
  20. //--------------------------------------------------------------------------;
  21. //
  22. // ICMGARB structure
  23. //
  24. //
  25. // This structure contains information (ICM Garbage) that is global but
  26. // on a per-process basis. Currently this is required only for 16-bit
  27. // builds and the structues are maintained in a linked list whose head
  28. // is pointed to by the gplig global variable.
  29. //
  30. //--------------------------------------------------------------------------;
  31. typedef struct tICMGARB
  32. {
  33. struct tICMGARB*pigNext; // next garb structure
  34. DWORD pid; // process id associated with this garb
  35. UINT cUsage; // usage count for this process
  36. //
  37. // 16-to-32 thunk related data
  38. //
  39. BOOL fThunksInitialized;
  40. BOOL fThunkError;
  41. DWORD dwMsvfw32Handle;
  42. LPVOID lpvThunkEntry;
  43. } ICMGARB, *PICMGARB, FAR *LPICMGARB;
  44. extern PICMGARB gplig;
  45. //--------------------------------------------------------------------------;
  46. //
  47. // misc data structures
  48. //
  49. //--------------------------------------------------------------------------;
  50. //
  51. //
  52. //
  53. typedef struct {
  54. DWORD dwSmag; // 'Smag'
  55. HTASK hTask; // owner task.
  56. DWORD fccType; // converter type ie 'vidc'
  57. DWORD fccHandler; // converter id ie 'rle '
  58. HDRVR hDriver; // handle of driver
  59. LPARAM dwDriver; // driver id for functions
  60. DRIVERPROC DriverProc; // function to call
  61. DWORD dnDevNode; // devnode id iff pnp driver
  62. #ifdef NT_THUNK16
  63. //
  64. // h32 : 32-bit driver handle
  65. // lpstd : 16:16 ptr to current status thunk descriptor
  66. //
  67. DWORD h32;
  68. struct tICSTATUSTHUNKDESC FAR* lpstd;
  69. #endif
  70. } IC, *PIC;
  71. //
  72. // This structure is similar in use to the ICINFO structure except
  73. // that it is only used internally and not passed to apps.
  74. //
  75. // !!! If you add anything to this structure that requires thunking,
  76. // then you're going to need to thunk it in thunk.c
  77. //
  78. typedef struct {
  79. DWORD dnDevNode; // devnode id iff pnp driver
  80. } ICINFOI, NEAR *NPICINFOI, *PICINFOI, FAR *LPICINFOI ;
  81. //--------------------------------------------------------------------------;
  82. //
  83. // GetCurrentProcessId prototype
  84. //
  85. //--------------------------------------------------------------------------;
  86. //--------------------------------------------------------------------------;
  87. //
  88. // DWORD GetCurrentProcessId
  89. //
  90. // Description:
  91. // This function returns the current process id
  92. //
  93. // Arguments:
  94. //
  95. // Return (DWORD):
  96. // Id of current process
  97. //
  98. // History:
  99. // 04/25/94 frankye
  100. //
  101. // Notes:
  102. //
  103. // WIN32:
  104. // This function exists in the 32-bit kernels on both Chicago and
  105. // Daytona and we provide no prototype for WIN32 compiles.
  106. //
  107. // 16-bit Chicago:
  108. // It is exported as in internal API by the 16-bit Chicago kernel.
  109. // We provide the prototype here and import it in the def file.
  110. //
  111. // 16-bit Daytona:
  112. // Has no such 16-bit function and really doesn't need one since all
  113. // 16-bit tasks are part of the same process under Daytona. Therefore
  114. // we just #define this to return (1) for 16-bit non-Chicago builds.
  115. //
  116. //--------------------------------------------------------------------------;
  117. #ifndef _WIN32
  118. #ifdef CHICAGO
  119. DWORD WINAPI GetCurrentProcessId(void);
  120. #else
  121. #define GetCurrentProcessId() (1)
  122. #endif
  123. #endif
  124. //--------------------------------------------------------------------------;
  125. //
  126. // Thunk initialization and termination function protos
  127. //
  128. //--------------------------------------------------------------------------;
  129. PICMGARB WINAPI thunkInitialize(VOID);
  130. VOID WINAPI thunkTerminate(PICMGARB pid);
  131. //--------------------------------------------------------------------------;
  132. //
  133. // pig function protos
  134. //
  135. //--------------------------------------------------------------------------;
  136. PICMGARB FAR PASCAL pigNew(void);
  137. PICMGARB FAR PASCAL pigFind(void);
  138. void FAR PASCAL pigDelete(PICMGARB pig);
  139. //--------------------------------------------------------------------------;
  140. //
  141. // misc function protos
  142. //
  143. //--------------------------------------------------------------------------;
  144. BOOL VFWAPI ICInfoInternal(DWORD fccType, DWORD fccHandler, ICINFO FAR * lpicinfo, ICINFOI FAR * lpicinfoi);