Hi all, I don't know if this is a stupid question, but I'm not solving the problem so:
I've a "drv" and "inc" folders in the project one.
In the inc folder there is a header file named drv.h.
In the drv folder there is the main driver source file, and
the "sources" file here:
TARGETNAME=kd
TARGETTYPE=DRIVER
INCLUDES=$(INCLUDES);..\inc
TARGETLIBS=$(TARGETLIBS) \
$(IFSKIT_LIB_PATH)\fltMgr.lib \
$(IFSKIT_LIB_PATH)\Ntoskrnl.lib
SOURCES=stdafx.cpp \
kdbg.cpp
Now I get C2039 error 'DeviceObject' is not a member of 'S' with S (in drv.h):
typedef struct S{
PDRIVER_OBJECT DriverObject;
PDEVICE_OBJECT DeviceObject;
PFLT_FILTER filter;
}S, *PS; extern S s;
on those lines:
ntstatus = IoCreateDevice(pDriverObject, 0, &ControlDevice, FILE_DEVICE_DISK_FILE_SYSTEM,
FILE_DEVICE_SECURE_OPEN, FALSE, &s.DeviceObject);
IoDeleteDevice(s.DeviceObject);
(I'm calling those functions in two routines called in DriverEntry).
I'm compiling with fre enviroment of wdk on win7 32bit.
How can I solve this error?
Here the includes of:
DRIVER
#include <fltKernel.h>
#include <drv.h>
//#include <ndk\kdfuncs.h>
#include <str.h>
HEADER (where S struct is)
#include <fltKernel.h>
#include <dontuse.h>
#include <ntddk.h>
#include <str.h>
#include <suppress.h>
|