Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista Drivers > What header files should be included in SCSI miniport driver?

Reply
Thread Tools Display Modes

What header files should be included in SCSI miniport driver?

 
 
flyingfly
Guest
Posts: n/a

 
      07-19-2010
Hi:

I am writing a simple SCSI miniport driver for Windows XP, and I have the
header files <SCSI.h> and <miniport.h>.
But there are errors in <srb.h> during compilitation

such as:
srb.h(63): error C2061 : syntax error : identifier 'SCSI_PHISYCAL_ADDRESS'
srb.h(63): error C2059 : syntax error : ';'
srb.h(63): error C2059 : syntax error : ','
srb.h(66): error C2061 : C requires that a struct or union has at least one
member

And there are huge amount of error, so that the last error i can see is :
error C10003 : error count exceeds 100; stopping compilation

I am so confused with these errors, can anyone help me to solve them?

Much appreciate!

PS: why there is no SCSI miniport sample drive in WDK, and my version is
7600.16385.1. it it really difficult to develop a SCSI miniport driver with
just the documentaions.


 
Reply With Quote
 
 
 
 
Scott Noone
Guest
Posts: n/a

 
      07-19-2010
"flyingfly" <> wrote in message
news:76AE6EE2-6988-4D1C-A20C-
> srb.h(63): error C2061 : syntax error : identifier 'SCSI_PHISYCAL_ADDRESS'


Did you type that or copy/paste it? Note that "physical" is spelled wrong,
if you did a copy/paste of that then your header is trashed somehow.

-scott

--
Scott Noone
Consulting Associate
OSR Open Systems Resources, Inc.
http://www.osronline.com


"flyingfly" <> wrote in message
news:76AE6EE2-6988-4D1C-A20C-...
> Hi:
>
> I am writing a simple SCSI miniport driver for Windows XP, and I have the
> header files <SCSI.h> and <miniport.h>.
> But there are errors in <srb.h> during compilitation
>
> such as:
> srb.h(63): error C2061 : syntax error : identifier 'SCSI_PHISYCAL_ADDRESS'
> srb.h(63): error C2059 : syntax error : ';'
> srb.h(63): error C2059 : syntax error : ','
> srb.h(66): error C2061 : C requires that a struct or union has at least
> one
> member
>
> And there are huge amount of error, so that the last error i can see is :
> error C10003 : error count exceeds 100; stopping compilation
>
> I am so confused with these errors, can anyone help me to solve them?
>
> Much appreciate!
>
> PS: why there is no SCSI miniport sample drive in WDK, and my version is
> 7600.16385.1. it it really difficult to develop a SCSI miniport driver
> with
> just the documentaions.
>
>

 
Reply With Quote
 
flyingfly
Guest
Posts: n/a

 
      07-20-2010
sorry i just typed it wrong, it should be SCSI_PHYSICAL_ADDRESS

"Scott Noone" wrote:

> "flyingfly" <> wrote in message
> news:76AE6EE2-6988-4D1C-A20C-
> > srb.h(63): error C2061 : syntax error : identifier 'SCSI_PHISYCAL_ADDRESS'

>
> Did you type that or copy/paste it? Note that "physical" is spelled wrong,
> if you did a copy/paste of that then your header is trashed somehow.
>
> -scott
>
> --
> Scott Noone
> Consulting Associate
> OSR Open Systems Resources, Inc.
> http://www.osronline.com
>
>
> "flyingfly" <> wrote in message
> news:76AE6EE2-6988-4D1C-A20C-...
> > Hi:
> >
> > I am writing a simple SCSI miniport driver for Windows XP, and I have the
> > header files <SCSI.h> and <miniport.h>.
> > But there are errors in <srb.h> during compilitation
> >
> > such as:
> > srb.h(63): error C2061 : syntax error : identifier 'SCSI_PHISYCAL_ADDRESS'
> > srb.h(63): error C2059 : syntax error : ';'
> > srb.h(63): error C2059 : syntax error : ','
> > srb.h(66): error C2061 : C requires that a struct or union has at least
> > one
> > member
> >
> > And there are huge amount of error, so that the last error i can see is :
> > error C10003 : error count exceeds 100; stopping compilation
> >
> > I am so confused with these errors, can anyone help me to solve them?
> >
> > Much appreciate!
> >
> > PS: why there is no SCSI miniport sample drive in WDK, and my version is
> > 7600.16385.1. it it really difficult to develop a SCSI miniport driver
> > with
> > just the documentaions.
> >
> >

 
Reply With Quote
 
flyingfly
Guest
Posts: n/a

 
      07-20-2010
Hi:
Thanks for your help, your method helped to solve the previous problem,but
there are still some other errors

in my "private.h" :

private.h(26) : error C2061 : syntax error : identifier 'DriverEntry'
private.h(26) : error C2056 : syntax error : ';'
private.h(34) : error C2148 : syntax error : missing ')' before identifier
'ConfigInfo'
private.h(34) : error C2081 : 'PPORT_CONFIGURATION_INFORMATION' : name in
formal parameter list illegal
private.h(34) : error C2061 : syntax error : identifier 'ConfigInfo'

the corresponding code in private.h is shown here:

21: typedef struct _XX_DEVICE_EXTENSION{
22: XX_REGS Regs;
23: PUCHAR RegsBase;
24: }XX_DEVICE_EXTENSION, *PXX_DEVICE_EXTENSION;
25:
26 : DRIVER_INITIALIZE DriverEntry;
27:
28: ULONG
29: xxFindAdapter(
30: IN PVOID DeviceExtension,
31: IN PVOID HwContext,
32: IN PVOID BusInformation,
33: IN PCHAR ArgumentString,
34: IN OUT PPORT_CONFIGURATION_INFORMATION ConfigInfo,
35: OUT PBOOLEAN Again
36 );

and also errors about 'PSCSI_REQUEST_BLOCK'

have i missed some header files that have defined the structs above?

Thanks again!





And there are some other mistakes at ..\inc\api\e

"Burkhardt Braun" wrote:

> Hello,
> I made a quick-shot and I introduced the headers
> #include <scsi.h>
> #include <miniport.h>
> #include <srb.h>
>
> in an existing project.
> I was able to compile with no errors, but ONLY if I placed these files
> above
> #include "precomp"
> #pragma hdrstop
>
> I assume there is something wrong with your build environment.
> I used 7600 Checked Buid for XP
>
> Good luck
> Burkhardt Braun
>
> On 19 Jul., 07:58, flyingfly <flying...@discussions.microsoft.com>
> wrote:
> > Hi:
> >
> > I am writing a simple SCSI miniport driver for Windows XP, and I have the
> > header files <SCSI.h> and <miniport.h>.
> > But there are errors in <srb.h> during compilitation
> >
> > such as:
> > srb.h(63): error C2061 : syntax error : identifier 'SCSI_PHISYCAL_ADDRESS'
> > srb.h(63): error C2059 : syntax error : ';'
> > srb.h(63): error C2059 : syntax error : ','
> > srb.h(66): error C2061 : C requires that a struct or union has at least one
> > member
> >
> > And there are huge amount of error, so that the last error i can see is :
> > error C10003 : error count exceeds 100; stopping compilation
> >
> > I am so confused with these errors, can anyone help me to solve them?
> >
> > Much appreciate!
> >
> > PS: why there is no SCSI miniport sample drive in WDK, and my version is
> > 7600.16385.1. it it really difficult to develop a SCSI miniport driver with
> > just the documentaions.

>
> .
>

 
Reply With Quote
 
flyingfly
Guest
Posts: n/a

 
      07-20-2010
I tried to minimize my project size to figure out the problem.
Now I have these files in my project folder:
XX.c, makefile, sources, XX.inf

sources file is:
TARGETNAME = XX
TARGETTYPE = MINIPORT

TARGETLIBS = $(DDK_LIB_PATH)\scsiport.lib

SOURCES = XX.c


the XX.c file is constructed as follows:

#include <scsi.h>
#include <miniport.h>
#include <srb.h>

// some macro definition
....

tpyedef struct _XX_REGS_{
// the contents of the PCI regs
...
}XX_REGS, *PXX_REGS;

typedef struct _XX_DEVICE_EXTENSION{
PXX_REGS Regs;
PUCHAR RegsBase;
}XX_DEVICE_EXTENSION, *PXX_DEVICE_EXTSION;

// function prototypes
ULONG DriverEntry( ...);
ULONG XXFindAdapter(...);
BOLEAN XXInitialize(...);
BOOLEAN XXStartIo(...);
BOOLEAN XXResetBus(...);
SCSI_ADAPTER_CONTROL_STATUS XXAdapterControl(...);
VOID XXRTimer(...);

//the implementation of the above functions
....


Now after my compilation, the previous errors accur again:
srb.h(63): error C2061 : syntax error : identifier 'SCSI_PHISYCAL_ADDRESS'
srb.h(63): error C2059 : syntax error : ';'
srb.h(63): error C2059 : syntax error : ','
srb.h(66): error C2061 : C requires that a struct or union has at least one
member

along with huge number of similiar errors.

My building enviroment is 7600.16385.1 and I am using XP SP3.

What can the actual problem be?

Thanks very much!! I'm so confused..

 
Reply With Quote
 
flyingfly
Guest
Posts: n/a

 
      07-21-2010


"Burkhardt Braun" wrote:

> Hello!
> On 20 Jul., 11:50, flyingfly <flying...@discussions.microsoft.com>
> wrote:
> > I tried to minimize my project size to figure out the problem.

> That is a good idea.
>
> >
> > Now after my compilation, the previous errors accur again:
> > srb.h(63): error C2061 : syntax error : identifier 'SCSI_PHISYCAL_ADDRESS'
> > srb.h(63): error C2059 : syntax error : ';'
> > srb.h(63): error C2059 : syntax error : ','
> > srb.h(66): error C2061 : C requires that a struct or union has at least one
> > member
> >
> > along with huge number of similiar errors.
> >
> > My building enviroment is 7600.16385.1 and I am using XP SP3.
> >
> > What can the actual problem be?

> Seemingly a wrong configuration / build environment.
> ( Or a wrong header. PHISYCAL again is strange )

sorry, i wrote the code by myself without copy(and not able to copy..)and i
am really used to spell PHYSICAL into PHISYCAL, that's a historic problem for
me..
>
> >
> > Thanks very much!! I'm so confused..

> You can try what I did:
> Take a working example and introduce the headers.
> That works for me in an arbitrary example ( see above ).
> From that point adapt the working example to your needs step by step.

Thanks again, I'll try this and hope it will work.

>
> Kind regards and good luck
> Burkhardt Braun
>
>
>
>
>
> .
>

 
Reply With Quote
 
flyingfly
Guest
Posts: n/a

 
      07-23-2010
Thanks a lot!
I find the sample and modify its code to generate my project ,and it works!


"eagersh" wrote:

> On Jul 18, 11:58 pm, flyingfly <flying...@discussions.microsoft.com>
> wrote:
> > Hi:
> >
> > I am writing a simple SCSI miniport driver for Windows XP, and I have the
> > header files <SCSI.h> and <miniport.h>.
> > But there are errors in <srb.h> during compilitation
> >
> > such as:
> > srb.h(63): error C2061 : syntax error : identifier 'SCSI_PHISYCAL_ADDRESS'
> > srb.h(63): error C2059 : syntax error : ';'
> > srb.h(63): error C2059 : syntax error : ','
> > srb.h(66): error C2061 : C requires that a struct or union has at least one
> > member
> >
> > And there are huge amount of error, so that the last error i can see is :
> > error C10003 : error count exceeds 100; stopping compilation
> >
> > I am so confused with these errors, can anyone help me to solve them?
> >
> > Much appreciate!
> >
> > PS: why there is no SCSI miniport sample drive in WDK, and my version is
> > 7600.16385.1. it it really difficult to develop a SCSI miniport driver with
> > just the documentaions.

>
> You should load an older version of DDK which contains a miniport SCSI
> driver sample. For example, you still could download DDK for 2003
> through Microsoft Connect.
> This DDK contains sample of miniport SCSI -
> \WinDDK\3790.1830\src\storage\miniport\aha154x
> The sample build perfectly and you could use as a source to build your
> project.
>
> Igor Sharovar
> .
>

 
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
Game Compatibility BCurrey Windows Vista Games 6 11-29-2007 08:11 PM
My PnP Monitor is seen as Non PnP??? Colin Windows Vista Hardware 1 11-29-2007 05:01 PM
Going Golfing but not with Vista markbyrn Windows Vista Games 15 03-08-2007 10:59 AM
americas army stuttering under vista premium ernie Windows Vista Games 0 02-27-2007 10:20 PM
problem in dxdiag Peewee64 Windows Vista Games 0 02-14-2007 09: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