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.

183 lines
3.4 KiB

  1. /****************************************************************************
  2. Copyright (c) 1995-1999 Microsoft Corporation
  3. Module Name: private.h
  4. ****************************************************************************/
  5. #pragma once
  6. #include "tapsrv.h"
  7. #ifdef __cplusplus
  8. extern "C"{
  9. #endif
  10. //***************************************************************************
  11. //***************************************************************************
  12. //***************************************************************************
  13. void AllocNewID( HKEY MainKey, LPDWORD lpdw );
  14. void PASCAL WideStringToNotSoWideString( LPBYTE lpBase, LPDWORD lpdwThing );
  15. PWSTR PASCAL MultiToWide( LPCSTR lpStr );
  16. PWSTR PASCAL NotSoWideStringToWideString( LPCSTR lpStr, DWORD dwLength );
  17. //***************************************************************************
  18. //***************************************************************************
  19. //***************************************************************************
  20. typedef enum
  21. {
  22. Dword,
  23. lpDword,
  24. hXxxApp,
  25. hXxxApp_NULLOK,
  26. // lpsz,
  27. lpszW,
  28. lpGet_SizeToFollow,
  29. lpSet_SizeToFollow,
  30. lpSet_Struct,
  31. lpGet_Struct,
  32. Size,
  33. Hwnd
  34. } ARG_TYPE;
  35. typedef struct _FUNC_ARGS
  36. {
  37. DWORD Flags;
  38. ULONG_PTR Args[MAX_TAPI_FUNC_ARGS];
  39. BYTE ArgTypes[MAX_TAPI_FUNC_ARGS];
  40. } FUNC_ARGS, *PFUNC_ARGS;
  41. typedef struct _UI_REQUEST_THREAD_PARAMS
  42. {
  43. BOOL bRequestCompleted;
  44. PFUNC_ARGS pFuncArgs;
  45. LONG lResult;
  46. } UI_REQUEST_THREAD_PARAMS, *PUI_REQUEST_THREAD_PARAMS;
  47. typedef struct _INIT_DATA
  48. {
  49. DWORD dwKey;
  50. DWORD dwInitOptions;
  51. union
  52. {
  53. HWND hwnd;
  54. HANDLE hEvent;
  55. HANDLE hCompletionPort;
  56. };
  57. union
  58. {
  59. LINECALLBACK lpfnCallback;
  60. DWORD dwCompletionKey;
  61. };
  62. HLINEAPP hXxxApp;
  63. BOOL bPendingAsyncEventMsg;
  64. DWORD dwNumTotalEntries;
  65. DWORD dwNumUsedEntries;
  66. PASYNC_EVENT_PARAMS pEventBuffer;
  67. PASYNC_EVENT_PARAMS pValidEntry;
  68. PASYNC_EVENT_PARAMS pFreeEntry;
  69. DWORD dwNumLines;
  70. BOOL bLine;
  71. DWORD dwThreadID;
  72. DWORD hInitData;
  73. } INIT_DATA, *PINIT_DATA;
  74. //
  75. // Private Error codes
  76. //
  77. #define TAPIERR_NOSERVICECONTROL 0xF100
  78. #define TAPIERR_INVALRPCCONTEXT 0xF101
  79. #if DBG
  80. #define DBGOUT(arg) DbgPrt arg
  81. VOID
  82. DbgPrt(
  83. IN DWORD dwDbgLevel,
  84. IN LPTSTR DbgMessage,
  85. IN ...
  86. );
  87. extern DWORD gdwDebugLevel;
  88. #define DOFUNC(arg1,arg2) DoFunc(arg1,arg2)
  89. LONG
  90. WINAPI
  91. DoFunc(
  92. PFUNC_ARGS pFuncArgs,
  93. char *pszFuncName
  94. );
  95. #else
  96. #define DBGOUT(arg)
  97. #define DOFUNC(arg1,arg2) DoFunc(arg1)
  98. LONG
  99. WINAPI
  100. DoFunc(
  101. PFUNC_ARGS pFuncArgs
  102. );
  103. #endif
  104. BOOL
  105. WINAPI
  106. SetTlsPCtxHandle(
  107. PCONTEXT_HANDLE_TYPE phCtxHandle
  108. );
  109. PCONTEXT_HANDLE_TYPE
  110. WINAPI
  111. GetTlsPCtxHandle(
  112. void
  113. );
  114. #ifdef __cplusplus
  115. }
  116. #endif
  117. #if DBG
  118. #define DWORD_CAST(v,f,l) (((v)>MAXDWORD)?(DbgPrt(0,L"DWORD_CAST: information will be lost during cast from %p in file %s, line %d",(v),(f),(l)), DebugBreak(),((DWORD)(v))):((DWORD)(v)))
  119. #else
  120. #define DWORD_CAST(v,f,l) (DWORD)(v)
  121. #endif //DBG