Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista Drivers > Minifilter driver problem with minifilter's struct error C2039

Reply
Thread Tools Display Modes

Minifilter driver problem with minifilter's struct error C2039

 
 
Numa Fariseo
Guest
Posts: n/a

 
      4 Weeks Ago
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>







 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Document Imaging problem after applying Office 2003 sp3 bill foster Windows Update 1 04-03-2010 01:02 AM
cannot install Vista ACPI error Salsakidd Windows Vista Installation 6 10-10-2007 11:12 AM
BUGCODE_USB_DRIVER with external USB HDD PHILIPS Deathwing00 Windows Vista Hardware 11 06-15-2007 08:02 PM
americas army stuttering under vista premium ernie Windows Vista Games 0 02-27-2007 11:20 PM
problem in dxdiag Peewee64 Windows Vista Games 0 02-14-2007 10:49 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59