ReactOS  0.4.15-dev-499-g1f31905
dumpinfo.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

VOID DumpInfo (LPCWSTR Name, NTSTATUS Status, LPCWSTR Comment, HANDLE Port)
 

Function Documentation

◆ DumpInfo()

VOID DumpInfo ( LPCWSTR  Name,
NTSTATUS  Status,
LPCWSTR  Comment,
HANDLE  Port 
)

Definition at line 70 of file dumpinfo.c.

76 {
79 
80  wprintf(
81  L"Port \"%s\" %s:\n",
82  Name,
83  Comment
84  );
85 
86  printf("\tStatus = %08X\n",Status);
87  printf("\tPort = %08X\n\n",Port);
88  /*
89  * Query object information.
90  */
91  printf("Basic Information:\n");
92  Status = QueryObject(
93  Port,
96  sizeof (LPC_PORT_BASIC_INFORMATION),
97  & ResultLength
98  );
99  if (Status == STATUS_SUCCESS)
100  {
101  PLPC_PORT_BASIC_INFORMATION i;
102 
103  i = (PLPC_PORT_BASIC_INFORMATION) ObjectInformation;
104 
105  printf( "\tUnknown01 = 0x%08X\n", i->Unknown0 );
106  printf( "\tUnknown02 = 0x%08X\n", i->Unknown1 );
107  printf( "\tUnknown03 = 0x%08X\n", i->Unknown2 );
108  printf( "\tUnknown04 = 0x%08X\n", i->Unknown3 );
109  printf( "\tUnknown05 = 0x%08X\n", i->Unknown4 );
110  printf( "\tUnknown06 = 0x%08X\n", i->Unknown5 );
111  printf( "\tUnknown07 = 0x%08X\n", i->Unknown6 );
112  printf( "\tUnknown08 = 0x%08X\n", i->Unknown7 );
113  printf( "\tUnknown09 = 0x%08X\n", i->Unknown8 );
114  printf( "\tUnknown10 = 0x%08X\n", i->Unknown9 );
115  printf( "\tUnknown11 = 0x%08X\n", i->Unknown10 );
116  printf( "\tUnknown12 = 0x%08X\n", i->Unknown11 );
117  printf( "\tUnknown13 = 0x%08X\n", i->Unknown12 );
118  printf( "\tUnknown14 = 0x%08X\n", i->Unknown13 );
119  }
120  else
121  {
122  printf("\tStatus = %08X\n",Status);
123  }
124  printf("Type Information:\n");
125  Status = QueryObject(
126  Port,
129  sizeof ObjectInformation,
130  & ResultLength
131  );
132  if (Status == STATUS_SUCCESS)
133  {
135 
137 
138  wprintf(
139  L"\tName: \"%s\"\n",
140  (i->Name.Length ? i->Name.Buffer : L"")
141  );
142 /*
143 FIXME: why this always raise an access violation exception?
144  wprintf(
145  L"\tType: \"%s\"\n",
146  (i->Type.Length ? i->Type.Buffer : L"")
147  );
148 /**/
149  printf(
150  "\tTotal Handles: %d\n",
151  i->TotalHandles
152  );
153  printf(
154  "\tReference Count: %d\n",
155  i->ReferenceCount
156  );
157  }
158  else
159  {
160  printf("\tStatus = %08X\n",Status);
161  }
162  printf("Name Information:\n");
163  Status = QueryObject(
164  Port,
167  sizeof ObjectInformation,
168  & ResultLength
169  );
170  if (Status == STATUS_SUCCESS)
171  {
173 
175  wprintf(
176  L"\tName: \"%s\"\n",
177  (i->Name.Length ? i->Name.Buffer : L"")
178  );
179  }
180  else
181  {
182  printf("\tStatus = %08X\n",Status);
183  }
184  printf("Data Information:\n");
185  Status = QueryObject(
186  Port,
189  sizeof ObjectInformation,
190  & ResultLength
191  );
192  if (Status == STATUS_SUCCESS)
193  {
195 
197  printf(
198  "\tInherit Handle: %s\n",
199  (i->bInheritHandle ? "TRUE" : "FALSE")
200  );
201  printf(
202  "\tProtect from Close: %s\n",
203  (i->bProtectFromClose ? "TRUE" : "FALSE")
204  );
205  }
206  else
207  {
208  printf("\tStatus = %08X\n",Status);
209  }
210 //---
211  printf("Port Information:\n");
212 /* Status = QueryInformationPort(
213  Port,
214  1, /* info class * /
215  ObjectInformation,
216  sizeof ObjectInformation,
217  & ResultLength
218  );
219  if (Status == STATUS_SUCCESS)
220  {
221  DWORD * i = ObjectInformation;
222  int j = 0;
223 
224  while (j < ResultLength / sizeof (DWORD))
225  {
226  printf("\t%08X\n",i[j]);
227  ++j;
228  }
229  }
230  else
231  {
232  printf("\tStatus = %08X\n",Status);
233  }
234 */
235 }
CPPORT Port[4]
Definition: headless.c:34
#define wprintf(...)
Definition: whoami.c:18
IN CINT OUT PVOID IN ULONG OUT PULONG ResultLength
Definition: dumpinfo.c:29
IN CINT OUT PVOID ObjectInformation
Definition: dumpinfo.c:29
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define BUF_SIZE
Definition: dumpinfo.c:21
static const WCHAR L[]
Definition: oid.c:1250
unsigned char BYTE
Definition: xxhash.c:193
Status
Definition: gdiplustypes.h:24
unsigned int ULONG
Definition: retypes.h:1
return STATUS_SUCCESS
Definition: btrfs.c:3014
#define printf
Definition: config.h:203

Referenced by TryConnectPort(), and TryCreatePort().