ReactOS 0.4.15-dev-7788-g1ad9096
dumpinfo.c File Reference
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <ddk/ntddk.h>
Include dependency graph for dumpinfo.c:

Go to the source code of this file.

Macros

#define BUF_SIZE   1024
 
#define MAX_BASIC_INFO_SIZE   512
 

Functions

 NTSTATUS (WINAPI *QueryObject)(IN HANDLE ObjectHandle
 
VOID DumpInfo (LPCWSTR Name, NTSTATUS Status, LPCWSTR Comment, HANDLE Port)
 

Variables

IN CINT ObjectInformationClass
 
IN CINT OUT PVOID ObjectInformation
 
IN CINT OUT PVOID IN ULONG Length
 
IN CINT OUT PVOID IN ULONG OUT PULONG ResultLength
 
IN CINT PortInformationClass
 
IN CINT OUT PVOID PortInformation
 
IN CINT OUT PVOID IN ULONG PortInformationLength
 
IN CINT OUT PVOID IN ULONG OUT PULONG ReturnLength
 

Macro Definition Documentation

◆ BUF_SIZE

#define BUF_SIZE   1024

Definition at line 21 of file dumpinfo.c.

◆ MAX_BASIC_INFO_SIZE

#define MAX_BASIC_INFO_SIZE   512

Definition at line 22 of file dumpinfo.c.

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,
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),
98 );
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,
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/*
143FIXME: 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,
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,
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}
@ ObjectTypeInformation
Definition: DriverTester.h:56
@ ObjectBasicInformation
Definition: DriverTester.h:54
@ ObjectNameInformation
Definition: DriverTester.h:55
@ Comment
Definition: asmpp.cpp:34
IN CINT OUT PVOID IN ULONG OUT PULONG ResultLength
Definition: dumpinfo.c:33
IN CINT OUT PVOID ObjectInformation
Definition: dumpinfo.c:30
#define BUF_SIZE
Definition: dumpinfo.c:21
#define printf
Definition: freeldr.h:93
Status
Definition: gdiplustypes.h:25
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
CPPORT Port[4]
Definition: headless.c:35
@ ObjectDataInformation
Definition: winternl.h:852
#define L(x)
Definition: ntvdm.h:50
#define STATUS_SUCCESS
Definition: shellext.h:65
uint32_t ULONG
Definition: typedefs.h:59
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG _Out_ PULONG ResultLength
Definition: wdfdevice.h:3776
#define wprintf(...)
Definition: whoami.c:18
unsigned char BYTE
Definition: xxhash.c:193

Referenced by TryConnectPort(), and TryCreatePort().

◆ NTSTATUS()

NTSTATUS ( WINAPI QueryObject)

Variable Documentation

◆ Length

Definition at line 31 of file dumpinfo.c.

◆ ObjectInformation

IN CINT OUT PVOID ObjectInformation

Definition at line 30 of file dumpinfo.c.

Referenced by DumpInfo().

◆ ObjectInformationClass

IN CINT ObjectInformationClass

Definition at line 29 of file dumpinfo.c.

◆ PortInformation

IN CINT OUT PVOID PortInformation

Definition at line 40 of file dumpinfo.c.

Referenced by KdPortGetByteEx(), KdPortInitializeEx(), and KdPortPutByteEx().

◆ PortInformationClass

IN CINT PortInformationClass

Definition at line 39 of file dumpinfo.c.

◆ PortInformationLength

IN CINT OUT PVOID IN ULONG PortInformationLength

Definition at line 41 of file dumpinfo.c.

◆ ResultLength

Definition at line 32 of file dumpinfo.c.

Referenced by DumpInfo().

◆ ReturnLength

Definition at line 42 of file dumpinfo.c.

Referenced by AcpiExGetProtocolBufferLength(), AdjustTokenGroups(), AdjustTokenPrivileges(), BuildDesktopNameList(), BuildWindowStationNameList(), CmpQueryKeyName(), CreateProcessAsUserCommon(), CreateRemoteThread(), DefaultQueryInfoBufferCheck(), ExGetPoolTagInfo(), ExpQueryModuleInformation(), FltpGetObjectName(), GetCallerLuid(), GetLogicalProcessorInformation(), GetLongPathNameW(), GetPrivateObjectSecurity(), GetShortPathNameW(), GetSystemDirectoryW(), GetSystemTimes(), GetSystemWindowsDirectoryW(), GetTListInfo(), GetTokenInformation(), HeapQueryInformation(), ImpersonateLoggedOnUser(), IoGetDeviceProperty(), IopParseDevice(), IopQueryName(), IopQueryNameInternal(), IoQueryFileDosDeviceName(), IsGlobalDeviceMap(), IsGlobalSymbolicLink(), KdpTrap(), KeI386VdmInitialize(), KeQueryIntervalProfile(), KiInitMachineDependent(), KsecGatherEntropyData(), ListDirectory(), LpcpCopyRequestData(), MiQueryMemoryBasicInformation(), MiQueryMemorySectionName(), MmGetFileNameForFileObject(), NtAdjustGroupsToken(), NtAdjustPrivilegesToken(), NtQueryDirectoryObject(), NtQueryEvent(), NtQueryInformationAtom(), NtQueryInformationJobObject(), NtQueryInformationProcess(), NtQueryInformationThread(), NtQueryInformationToken(), NtQuerySemaphore(), NtQuerySystemEnvironmentValue(), NtQuerySystemInformation(), NtQueryTimer(), NtQueryVirtualMemory(), NtReadRequestData(), NtSetInformationDebugObject(), NtSystemDebugControl(), NtWriteRequestData(), ObjectBasicInformationTests(), ObQueryNameString(), ObQueryTypeInfo(), PrintProcess(), PrintThreads(), PspQueryDescriptorThread(), QueryDosDeviceW(), QueryNameProc(), RawQueryFsAttributeInfo(), RtlAcquirePrivilege(), RtlAdjustPrivilege(), RtlDefaultNpAcl(), RtlFormatMessage(), RtlFormatMessageEx(), RtlGetSetBootStatusData(), RtlIsDosDeviceName_Ustr(), RtlpSysVolTakeOwnership(), RtlQueryHeapInformation(), RtlQuerySecurityObject(), RtlRemovePrivileges(), SeDefaultObjectMethod(), SeInitializeProcessAuditName(), SepCleanupLUIDDeviceMapDirectory(), SHCreateSessionKey(), START_TEST(), StorPortGetBusData(), StorPortSetBusDataByOffset(), Test_Flags(), test_GetSystemTimes(), Test_KernelDebugger(), Test_ProcessWx86Information(), test_query_basic(), test_query_cache(), test_query_cpu(), test_query_data_alignment(), test_query_handle(), test_query_handle_ex(), test_query_interrupt(), test_query_kerndebug(), test_query_module(), test_query_performance(), test_query_process(), test_query_process_basic(), test_query_process_handlecount(), test_query_process_image_file_name(), test_query_process_io(), test_query_process_priority(), test_query_process_times(), test_query_process_vm(), test_query_process_wow64(), test_query_procperf(), test_query_regquota(), test_query_timeofday(), Test_TimeAdjustment(), and VfdQueryImage().