ReactOS  0.4.15-dev-489-g75a0787
ntobjfs.cpp File Reference
#include <precomp.h>
#include "ntobjfs.h"
#include "regfs.h"
Include dependency graph for ntobjfs.cpp:

Go to the source code of this file.

Classes

struct  NTDLL
 
struct  UnicodeString
 

Macros

#define CONSTRUCT_NTDLLFCT(x)   x(TEXT("NTDLL"), #x)
 

Typedefs

typedef DWORD(__stdcallNTOBJECTOPENFUNCTIONS) (HANDLE *, DWORD, OpenStruct *)
 

Functions

static DWORD NtOpenObject (OBJECT_TYPE type, HANDLE *phandle, DWORD access, LPCWSTR path)
 

Variables

NTDLLg_NTDLL = NULL
 

Macro Definition Documentation

◆ CONSTRUCT_NTDLLFCT

#define CONSTRUCT_NTDLLFCT (   x)    x(TEXT("NTDLL"), #x)

Definition at line 36 of file ntobjfs.cpp.

Typedef Documentation

◆ NTOBJECTOPENFUNCTIONS

typedef DWORD(__stdcall* NTOBJECTOPENFUNCTIONS) (HANDLE *, DWORD, OpenStruct *)

Definition at line 38 of file ntobjfs.cpp.

Function Documentation

◆ NtOpenObject()

static DWORD NtOpenObject ( OBJECT_TYPE  type,
HANDLE phandle,
DWORD  access,
LPCWSTR  path 
)
static

Definition at line 151 of file ntobjfs.cpp.

152 {
153  UnicodeString ustr(path);
154  OpenStruct open_struct = {sizeof(OpenStruct), 0x00, &ustr, 0x40};
155 
158 
159  /* if (xflag)
160  access |= GENERIC_READ; */
161 
162  DWORD ioStatusBlock[2]; // IO_STATUS_BLOCK
163 
165  return g_NTDLL->_ObjectOpenFunctions[type](phandle, access|STANDARD_RIGHTS_READ, &open_struct);
166  else if (type == FILE_OBJECT)
167  return (*g_NTDLL->NtOpenFile)(phandle, access, &open_struct, ioStatusBlock, FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, 0/*OpenOptions*/);
168  else
169  return ERROR_INVALID_FUNCTION;
170 }
#define ERROR_INVALID_FUNCTION
Definition: dderror.h:6
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
#define FILE_SHARE_WRITE
Definition: nt_native.h:681
#define FILE_SHARE_READ
Definition: compat.h:125
NTDLL * g_NTDLL
Definition: ntobjfs.cpp:132
#define FILE_LIST_DIRECTORY
Definition: nt_native.h:629
unsigned long DWORD
Definition: ntddk_ex.h:95
#define FILE_SHARE_DELETE
Definition: nt_native.h:682
#define STANDARD_RIGHTS_READ
Definition: nt_native.h:65
NTOBJECTOPENFUNCTIONS _ObjectOpenFunctions[23]
Definition: ntobjfs.cpp:93
GLuint GLint GLboolean GLint GLenum access
Definition: glext.h:7866
DynamicFct< DWORD(__stdcall *)(HANDLE *, DWORD, void *, DWORD *, DWORD, OpenStruct *)> NtOpenFile
Definition: ntobjfs.cpp:105

Referenced by NtObjDirectory::read_directory().

Variable Documentation

◆ g_NTDLL

NTDLL* g_NTDLL = NULL