#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <ddk/ntddk.h>
#include "dumpinfo.h"
Go to the source code of this file.
◆ BUF_SIZE
◆ LPC_CONNECT_FLAG1
#define LPC_CONNECT_FLAG1 0x00000001 |
◆ LPC_CONNECT_FLAG2
#define LPC_CONNECT_FLAG2 0x00000010 |
◆ LPC_CONNECT_FLAG3
#define LPC_CONNECT_FLAG3 0x00000100 |
◆ LPC_CONNECT_FLAG4
#define LPC_CONNECT_FLAG4 0x00001000 |
◆ LPC_CONNECT_FLAG5
#define LPC_CONNECT_FLAG5 0x00010000 |
◆ MAXARG
◆ PROTO_LPC
◆ main()
Definition at line 135 of file creport.c.
136{
138
140 {
141 printf(
"WNT LPC Port Creator\n");
144 }
145 printf(
"LoadLibrary(NTDLL)\n");
148 {
149 printf(
"Could not load NTDLL\n");
151 }
152 printf(
"GetProcAddress(NTDLL.NtCreatePort)\n");
154 ntdll,
155 "NtCreatePort"
156 );
157 if (CreatePort ==
NULL)
158 {
160 printf(
"Could not find NTDLL.NtCreatePort\n");
162 }
163 printf(
"GetProcAddress(NTDLL.NtQueryObject)\n");
165 ntdll,
166 "NtQueryObject"
167 );
168 if (QueryObject ==
NULL)
169 {
171 printf(
"Could not find NTDLL.NtQueryObject\n");
173 }
174 printf(
"GetProcAddress(NTDLL.NtYieldExecution)\n");
176 ntdll,
177 "NtYieldExecution"
178 );
179 if (YieldExecution ==
NULL)
180 {
182 printf(
"Could not find NTDLL.NtYieldExecution\n");
184 }
189}
VOID TryCreatePort(char *port_name)
#define GetProcAddress(x, y)
◆ NTSTATUS()
◆ TryCreatePort()
Definition at line 51 of file creport.c.
52{
59 int dwx = 0;
60 char * port_name_save = port_name;
61
62
63
64
65 for (
67 ( *port_name
69 );
70 )
71 {
73 }
75
79
80
81
89 0;
94
95
96
101 0,
102 0,
104 );
106 {
110 "created",
112 );
113
114 for (dwx=0; dwx<
MAXARG; ++dwx)
115 {
116 YieldExecution();
117 }
119 {
121 "Could not close the port handle %08X.\n",
123 );
124 }
125 return;
126 }
128 "Creating port \"%s\" failed (Status = %08X).\n",
129 port_name_save,
131 );
132}
static UNICODE_STRING PortName
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
#define LPC_CONNECT_FLAG5
VOID DumpInfo(LPCWSTR Name, NTSTATUS Status, LPCWSTR Comment, HANDLE Port)
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
struct _OBJECT_ATTRIBUTES OBJECT_ATTRIBUTES
Referenced by main().
◆ DesiredAccess
◆ Flags
◆ Length
◆ ObjectInformation
◆ ObjectInformationClass
IN CINT ObjectInformationClass |
◆ OPTIONAL
◆ ResultLength
◆ Unknown3