Doubt regarding DLL and SYS files

Hello

I have a doubt regarding .dll and .sys files . What is the exact difference
between them ? Is it only Entry points are different ? If not what else is
different ?
Instead of using 'build ’ on command prompt , can I use the VC++ IDE to
create .sys file using ‘Windows DLL’ option ? If I can create a .sys file
will it be equivalent to the .sys file created using the standard Driver
procedure?
A friend of mine created .sys file using the above method what I mentioned .
The driver created that way still works . I was not able to figure out what
is the difference between them . I could not find much documentation on that
also. Can you help me out with an logical explanation why it did work . If
so why microsoft has chosen command utilites way ?
I need your reply very urgently .

Thanks and regards

**********************************************************
Srinivasa Deevi
Transilica Inc.
(858) 558-6088 Ext: 173
www.transilica.com
**********************************************************


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

This is a question I wondered as well. From the doc I had it seems
reasonable to think the only differences between a dll and a .sys file are
the following ones:

ImageBase - points to a KM address in a sys file while to a UM address for a
dll

Subsystem - Win32 for a dll, while native for a .sys

am i correct? can someone shed some light on this ?

Thanks
Matteo

----- Original Message -----
From: “Srinivasa Rao Deevi”
To: “NT Developers Interest List”
Sent: Tuesday, April 10, 2001 10:10 PM
Subject: [ntdev] Doubt regarding DLL and SYS files

> Hello
>
> I have a doubt regarding .dll and .sys files . What is the exact
difference
> between them ? Is it only Entry points are different ? If not what else is
> different ?
> Instead of using 'build ’ on command prompt , can I use the VC++ IDE to
> create .sys file using ‘Windows DLL’ option ? If I can create a .sys file
> will it be equivalent to the .sys file created using the standard Driver
> procedure?
> A friend of mine created .sys file using the above method what I mentioned
.
> The driver created that way still works . I was not able to figure out
what
> is the difference between them . I could not find much documentation on
that
> also. Can you help me out with an logical explanation why it did work . If
> so why microsoft has chosen command utilites way ?
> I need your reply very urgently .
>
> Thanks and regards
>
>
>
> Srinivasa Deevi
> Transilica Inc.
> (858) 558-6088 Ext: 173
> www.transilica.com
>

>
>
> —
> You are currently subscribed to ntdev as: xxxxx@dolce.it
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

A .sys file is basically a .dll file, in that it exports entry points. The
convention is that the main entry for .sys is DriverEntry, but I’ve read
that one can instruct the linker to use a different name. That is, the OS
will look for the main entry point, however named.

One can use VC++ to build drivers. I’ve done so. (But note that the word
in the field is that “Microsoft won’t help out with drivers built that
way”; eg, if it breaks, don’t go crying to MS.) Mark Roddy explains some
techniques at www.hollistech.com.

James Antognini
IBM Research

Internet address – antognini@us.ibm.com
Notes address – James Antognini/Watson/xxxxx@IBMUS

Phone – external: 914-784-7258; tieline: 863-7258


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

> I have a doubt regarding .dll and .sys files . What is the exact
difference

between them ?

One bit in the header and the base address above 0x80000000

Instead of using 'build ’ on command prompt , can I use the VC++ IDE to
create .sys file using ‘Windows DLL’ option ? If I can create a .sys file
will it be equivalent to the .sys file created using the standard Driver
procedure?

No, “Windows DLL” will not help, you will need to specify lots of linker’s
command line settings there. Better to use the DDK’s BUILD.

Max


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

I thought the same until I tried using LoadLibrary and LoadLibraryEx with a .sys file. It just doesn’t work. (Not exactly - it returns a success value but components but it had an unexpected behaviour… dependencies were not laoded). So, I guess there is something more between a .dll and a .sys than just the entry point.

In addition I tried building a do-nothing .sys file and load it in user mode. It doesn’t work at all…

Matteo
----- Original Message -----
From: James Antognini
To: NT Developers Interest List
Sent: Tuesday, April 10, 2001 10:24 PM
Subject: [ntdev] Re: Doubt regarding DLL and SYS files

A .sys file is basically a .dll file, in that it exports entry points. The convention is that the main entry for .sys is DriverEntry, but I’ve read that one can instruct the linker to use a different name. That is, the OS will look for the main entry point, however named.

One can use VC++ to build drivers. I’ve done so. (But note that the word in the field is that “Microsoft won’t help out with drivers built that way”; eg, if it breaks, don’t go crying to MS.) Mark Roddy explains some techniques at www.hollistech.com.

James Antognini
IBM Research

Internet address – antognini@us.ibm.com
Notes address – James Antognini/Watson/xxxxx@IBMUS

Phone – external: 914-784-7258; tieline: 863-7258 — You are currently subscribed to ntdev as: xxxxx@dolce.it To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

HI Max

But how did the driver created the way I mentioned working fine ? What could
be the logical explanation for it ? We are able to see the Debug Print
output on the WinDbg also which was going through all the motions that are
required .

By the way what is the one bit in the header ?

Thanks and regards
Srinvas

-----Original Message-----
From: Maxim S. Shatskih [mailto:xxxxx@storagecraft.com]
Sent: Tuesday, April 10, 2001 1:49 PM
To: NT Developers Interest List
Subject: [ntdev] Re: Doubt regarding DLL and SYS files

I have a doubt regarding .dll and .sys files . What is the exact
difference
between them ?

One bit in the header and the base address above 0x80000000

Instead of using 'build ’ on command prompt , can I use the VC++ IDE to
create .sys file using ‘Windows DLL’ option ? If I can create a .sys file
will it be equivalent to the .sys file created using the standard Driver
procedure?

No, “Windows DLL” will not help, you will need to specify lots of linker’s
command line settings there. Better to use the DDK’s BUILD.

Max


You are currently subscribed to ntdev as: xxxxx@transilica.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Mostly you are treading on holy ground and may incur the wrath of whatever
GOD is reading email at the time either using the IDE or BUILD only is
mentioned.

Personally, I have been using the IDE for over 5 years now and prefer it
over the Build/Nmake environment. You can use SRC2DSP to take a SOURCES file
to a DSP. Walter Oney provides a wizard that will allow you to create a
project and provides template code as well for most driver types you need.

Either way will produce a functional driver. The fact that MS won’t support
an IDE built driver? Big deal. It’s my code, my job to support my code, and
I have never seen nor heard of a driver fault that was directly related to
using the IDE for VS/VC++ 6.0, SP4.

Gary

-----Original Message-----
From: Srinivasa Rao Deevi [mailto:xxxxx@Transilica.com]
Sent: Tuesday, April 10, 2001 2:27 PM
To: NT Developers Interest List
Subject: [ntdev] Re: Doubt regarding DLL and SYS
files

HI Max

But how did the driver created the way I mentioned working
fine ? What could
be the logical explanation for it ? We are able to see the
Debug Print
output on the WinDbg also which was going through all the
motions that are
required .

By the way what is the one bit in the header ?

Thanks and regards
Srinvas

-----Original Message-----
From: Maxim S. Shatskih [mailto:xxxxx@storagecraft.com]
Sent: Tuesday, April 10, 2001 1:49 PM
To: NT Developers Interest List
Subject: [ntdev] Re: Doubt regarding DLL and SYS files

I have a doubt regarding .dll and .sys files . What is the
exact
difference
> between them ?

One bit in the header and the base address above 0x80000000

Instead of using 'build ’ on command prompt , can I use
the VC++ IDE to
> create .sys file using ‘Windows DLL’ option ? If I can
create a .sys file
> will it be equivalent to the .sys file created using the
standard Driver
> procedure?

No, “Windows DLL” will not help, you will need to specify
lots of linker’s
command line settings there. Better to use the DDK’s BUILD.

Max


You are currently subscribed to ntdev as:
xxxxx@transilica.com
To unsubscribe send a blank email to
leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as:
xxxxx@delphieng.com
To unsubscribe send a blank email to
leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

The reason the NT group uses build instead of VC:

* Build supports multi processor building
* build works NATIVELY on non X86 operatings system (alpha, IA64, etc)
* Build\sources\makefile.def are designed to work with massively large
projects (we generate many thousands of binaries each time we build the
OS).

Our build environment uses the same compiler and linker as VC. But sources
and makefile.def allows us to centralize all the compiler and linker
switches in one large makefile, and just include the minimal amount of
stuff in sources. So we can fix a linker switch in one file (makefile.def)
and it’ll apply to the 1000 DLLs or 500.sys files we build

So you can use the VC IDE as long as you are *very careful* to use the same
compiler and linker switches as build\sources\makefile.def generates for
the particular component you build. (the difference between a .dll, .sys,
exe, .cpl, etc, etc are just compiler and linker switches)

Each time you get a new DDK, you must reverify the compiler and linker
switches used by build\sources\makefile.def to pickup any changes we had to
make.

NOTE: To be more confusing, some swithces we pass are tied to the OS you
are targeting, while some switches are tied to the compiler and linker you
are using. So if you use VC and have a different compiler\linker version
than what is in the DDK, you have to spend some time understand what each
compiler and linker switch actually means.


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Hi :
I like the way to build the driver by IDE which will give me the browse=

function, However, I facing some difficult as following:

  1. SRC2DSP is usefully , but it do not work while TARGETTYPE=3DLIBRAR=
    Y or
    EXPORT_DRIVER.
  2. The Wizard which provide by Walter Oney. it good , but there are al=
    so
    have above limitation .
    I really like the way provide by Mark (see www.hollistech.com)which use=
    a
    batch file in IDE, However, I run into trouble , I get Out of environme=
    nt
    space message while use this approach.
    I try to modify the config.sys by add SHELL=3DC:\WINDOWS\COMMAND.COM

/e:4096 /k. However, it do not work.
Can Any one help me on that.

Thanks
Michael Cheng

=
=20
Gary Little =
=20
Interest List" =20
m> cc: =
=20
Sent by: Fax to: =
=20
xxxxx@lis Subject: [ntdev] R=
e: Doubt regarding DLL and SYS files =20
ts.osr.com =
=20
=
=20
=
=20
2001/04/11 05:50 AM =
=20
Please respond to “NT =
=20
Developers Interest =
=20
List” =
=20
=
=20
=
=20

Mostly you are treading on holy ground and may incur the wrath of whate=
ver
GOD is reading email at the time either using the IDE or BUILD only is
mentioned.

Personally, I have been using the IDE for over 5 years now and prefer i=
t
over the Build/Nmake environment. You can use SRC2DSP to take a SOURCES=

file to a DSP. Walter Oney provides a wizard that will allow you to cre=
ate
a project and provides template code as well for most driver types you
need.

Either way will produce a functional driver. The fact that MS won’t sup=
port
an IDE built driver? Big deal. It’s my code, my job to support my code,=
and
I have never seen nor heard of a driver fault that was directly related=
to
using the IDE for VS/VC++ 6.0, SP4.

Gary

-----Original Message-----
From:=A0=A0 Srinivasa=A0 Rao Deevi [mailto:xxxxx@Transilica.com]
Sent:=A0=A0 Tuesday, April 10, 2001 2:27 PM
To:=A0=A0=A0=A0 NT Developers Interest List
Subject:=A0=A0=A0=A0=A0=A0=A0 [ntdev] Re: Doubt regarding DLL and =
SYS files

HI Max

But how did the driver created the way I mentioned working fine ? =
What
could
be the logical explanation for it ? We are able to see the Debug P=
rint
output on the WinDbg also which was going through all the motions =
that
are
required .

By the way what is the one bit in the header ?

Thanks and regards
Srinvas

-----Original Message-----
From: Maxim S. Shatskih [mailto:xxxxx@storagecraft.com]
Sent: Tuesday, April 10, 2001 1:49 PM
To: NT Developers Interest List
Subject: [ntdev] Re: Doubt regarding DLL and SYS files

> I have a doubt regarding .dll and .sys files . What is the exact=

difference
> between them ?

One bit in the header and the base address above 0x80000000

> Instead of using 'build ’ on command prompt , can I use the VC++=
IDE
to
> create .sys file using ‘Windows DLL’=A0 option ? If I can create=
a
.sys file
> will it be equivalent to the .sys file created using the standar=
d
Driver
> procedure?

No, “Windows DLL” will not help, you will need to specify lots of
linker’s
command line settings there. Better to use the DDK’s BUILD.

=A0=A0=A0 Max


You are currently subscribed to ntdev as: xxxxx@transilica.com
To unsubscribe send a blank email to xxxxx@lists.osr.c=
om


You are currently subscribed to ntdev as: xxxxx@delphieng.com
To unsubscribe send a blank email to xxxxx@lists.osr.c=
om


You are currently subscribed to ntdev as: michael_cheng@ap.logitech.com=

To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

=


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

If you put your build.exe call lines in the custom build box, you can have
the best of both worlds.

Alberto.

-----Original Message-----
From: Gary Little [mailto:xxxxx@Broadstor.com]
Sent: Tuesday, April 10, 2001 5:51 PM
To: NT Developers Interest List
Subject: [ntdev] Re: Doubt regarding DLL and SYS files

Mostly you are treading on holy ground and may incur the wrath of whatever
GOD is reading email at the time either using the IDE or BUILD only is
mentioned.

Personally, I have been using the IDE for over 5 years now and prefer it
over the Build/Nmake environment. You can use SRC2DSP to take a SOURCES file
to a DSP. Walter Oney provides a wizard that will allow you to create a
project and provides template code as well for most driver types you need.

Either way will produce a functional driver. The fact that MS won’t support
an IDE built driver? Big deal. It’s my code, my job to support my code, and
I have never seen nor heard of a driver fault that was directly related to
using the IDE for VS/VC++ 6.0, SP4.

Gary

BM__MailData-----Original Message-----
From: Srinivasa Rao Deevi [ mailto:xxxxx@Transilica.com
mailto:xxxxx ]
Sent: Tuesday, April 10, 2001 2:27 PM
To: NT Developers Interest List
Subject: [ntdev] Re: Doubt regarding DLL and SYS files

HI Max

But how did the driver created the way I mentioned working fine ?
What could
be the logical explanation for it ? We are able to see the Debug Print
output on the WinDbg also which was going through all the motions that are
required .

By the way what is the one bit in the header ?

Thanks and regards
Srinvas

-----Original Message-----
From: Maxim S. Shatskih [mailto:xxxxx@storagecraft.com
mailto:xxxxx]
Sent: Tuesday, April 10, 2001 1:49 PM
To: NT Developers Interest List
Subject: [ntdev] Re: Doubt regarding DLL and SYS files

> I have a doubt regarding .dll and .sys files . What is the exact
difference
> between them ?

One bit in the header and the base address above 0x80000000

> Instead of using 'build ’ on command prompt , can I use the VC++
IDE to
> create .sys file using ‘Windows DLL’ option ? If I can create a .sys file

> will it be equivalent to the .sys file created using the standard Driver
> procedure?

No, “Windows DLL” will not help, you will need to specify lots of
linker’s
command line settings there. Better to use the DDK’s BUILD.

Max


You are currently subscribed to ntdev as: xxxxx@transilica.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@delphieng.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@compuware.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com</mailto:xxxxx></mailto:xxxxx>

> Instead of using 'build ’ on command prompt , can I use the VC++ IDE to

create .sys file using ‘Windows DLL’ option ? If I can create a .sys file
will it be equivalent to the .sys file created using the standard Driver
procedure?

If you want to build within theMSVC++ IDE, the only valid way to do this is
by running “build” as an external build step. We’ve published how to do
this several times in The NT Insider. We’re planning to put an updated
procedure (that’ll work properly with the WinXP DDKs) on our web site – and
write this up in The NT Insider – very soon.

It is ALWAYS A MISTAKE to try to correctly set the switches, options, and
other environment variables appropriately directly in the MSVC++ IDE. The
reasons for this include:

a) The switches and options may (and in fact do) change from release to
release of the DDK.

b) The linker shipped with the DDK may not be the same linker as is used by
your installation of MSVC++

c) Starting with WinXP, the current plan (THIS MAY CHANGE PRIOR TO RELEASE)
is that the DDK will include the appropriate supported compiler for building
drivers. This is presently true for the WinXP Beta 2 DDK. This is likely
not the same compiler as you are using with your installation of Visual
Studio, or whatever.

If any of you have seen the famous problem of building a driver that the
loader won’t load… you’ve seen the problems that having the wrong version
of the linker can create.

This is the sort of problem that I place into the category “Why Tempt Fate”.
You like the IDE? Good. Build drivers right from within the IDE by using
BUILD as an external build step. This works fine, and results in all the
good things (browse files, jumping directly to lines with errors, etc) that
you can do in the IDE. This procedure has no drawbacks. Why do something
that’s risky in your build process, when there’s an alternative that has
zero risk? I, for one, have enough trouble just getting my drivers to work
properly. I really don’t wanna have to worry about the tools I use doing
the right thing.

Peter


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

> -----Original Message-----

From: Peter Viscarola [mailto:xxxxx@osr.com]
Sent: Wednesday, April 11, 2001 12:42 PM
To: NT Developers Interest List
Subject: [ntdev] Re: Doubt regarding DLL and SYS files

If you want to build within theMSVC++ IDE, the only valid way
to do this is
by running “build” as an external build step. We’ve
published how to do
this several times in The NT Insider.

I only saw the original article describing ddkbuild.bat in the archive. Are
there others that didn’t get into the online archive? I use a modified
version of ddkbuild, personally.

We’re planning to put
an updated
procedure (that’ll work properly with the WinXP DDKs) on our
web site – and
write this up in The NT Insider – very soon.

This is very good news.

[snip]

This is the sort of problem that I place into the category
“Why Tempt Fate”.
You like the IDE? Good. Build drivers right from within the
IDE by using
BUILD as an external build step. This works fine, and
results in all the
good things (browse files, jumping directly to lines with
errors, etc) that
you can do in the IDE.

[snip]

OK, I can do all of that. Do you know how to teach the MSVC IDE how to show
me the parameters for DDK functions, like it does for functions provided in
the PSDK? For example, ExAllocatePool()? I know that other editors, such
as CodeWright, can scan the include directories for new functions, but I
haven’t successfully persuaded or coerced MSVC to do the same thing.

Thanks,

Phil


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

> ----------

From: Barila, Phil[SMTP:xxxxx@intel.com]
Reply To: NT Developers Interest List
Sent: Wednesday, April 11, 2001 10:09 PM
To: NT Developers Interest List
Subject: [ntdev] Re: Doubt regarding DLL and SYS files

OK, I can do all of that. Do you know how to teach the MSVC IDE how to
show
me the parameters for DDK functions, like it does for functions provided
in
the PSDK? For example, ExAllocatePool()? I know that other editors, such
as CodeWright, can scan the include directories for new functions, but I
haven’t successfully persuaded or coerced MSVC to do the same thing.

Well, I don’t use MSVC any more so only guess… Have you tried to add DDK
includes to list of include directories?

Best regards,

Michal Vodicka
Veridicom
(RKK - Skytale)
[WWW: http://www.veridicom.com , http://www.skytale.com]


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

-----Original Message-----
From: Vodicka, Michal [mailto:xxxxx@rkk.cz]
Sent: Wednesday, April 11, 2001 1:20 PM
To: NT Developers Interest List
Subject: [ntdev] Re: Doubt regarding DLL and SYS files

Well, I don’t use MSVC any more so only guess… Have you tried to add
DDK
includes to list of include directories?

Yes, I did that a long time ago. DDK\inc and DDK\inc\ddk, actually. I
still can’t get auto-complete on ExAllocatePool, as one example. One very
ugly hack to get around it is to simply copy the declarations into the
source, guarded by defines that will never be defined

example:
#ifdef FrooD
NTKERNELAPI
PVOID
ExAllocatePool(
IN POOL_TYPE PoolType,
IN SIZE_T NumberOfBytes
);
#endif

That will never get compiled, because I will never define FrooD. However, I
shouldn’t need to do this, and I don’t do it for DDK functions. When I’m
doing a lot with DDK data structures, like UNICODE_STRING or
KEY_VALUE_FULL_INFORMATION, it saves a lot of window hopping. But I haven’t
come across any way to make the IDE show it, without this ugly hack.

Phil


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

'So all right … I surrender … I’ll stop using the evil IDE … :slight_smile:

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Peter Viscarola
Sent: Wednesday, April 11, 2001 12:42 PM
To: NT Developers Interest List
Subject: [ntdev] Re: Doubt regarding DLL and SYS files

Instead of using 'build ’ on command prompt , can I use the VC++ IDE to
create .sys file using ‘Windows DLL’ option ? If I can create a .sys file
will it be equivalent to the .sys file created using the standard Driver
procedure?

If you want to build within theMSVC++ IDE, the only valid way to do this is
by running “build” as an external build step. We’ve published how to do
this several times in The NT Insider. We’re planning to put an updated
procedure (that’ll work properly with the WinXP DDKs) on our web site – and
write this up in The NT Insider – very soon.

It is ALWAYS A MISTAKE to try to correctly set the switches, options, and
other environment variables appropriately directly in the MSVC++ IDE. The
reasons for this include:

a) The switches and options may (and in fact do) change from release to
release of the DDK.

b) The linker shipped with the DDK may not be the same linker as is used by
your installation of MSVC++

c) Starting with WinXP, the current plan (THIS MAY CHANGE PRIOR TO RELEASE)
is that the DDK will include the appropriate supported compiler for building
drivers. This is presently true for the WinXP Beta 2 DDK. This is likely
not the same compiler as you are using with your installation of Visual
Studio, or whatever.

If any of you have seen the famous problem of building a driver that the
loader won’t load… you’ve seen the problems that having the wrong version
of the linker can create.

This is the sort of problem that I place into the category “Why Tempt Fate”.
You like the IDE? Good. Build drivers right from within the IDE by using
BUILD as an external build step. This works fine, and results in all the
good things (browse files, jumping directly to lines with errors, etc) that
you can do in the IDE. This procedure has no drawbacks. Why do something
that’s risky in your build process, when there’s an alternative that has
zero risk? I, for one, have enough trouble just getting my drivers to work
properly. I really don’t wanna have to worry about the tools I use doing
the right thing.

Peter


You are currently subscribed to ntdev as: xxxxx@delphieng.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

link.exe — read help for options
cl.exe /help — do the same

For clues on how to set up valid flags for linker and C compiler see makefile.def & i386mk.inc files , they are located located in the BIN folder of 2kDDK. I look at them every time I get a new DDK version . If you understand whats there and the reasons why the switches are set the way they are set , youll be able to create a driver using even third party IDE’s , several non MS C compilers , MSVC IDE , or assemblers like MASM , NASM and free PE linkers + small handmade utils to complement lack of certain features in free linkers. (I dont know if this will work in the future on XP )

However , what Mr Viscarola said is true. Don;t force your luck. build.exe is a very nice tool , which can handle a lot
of tasks for you. And if you ask me , any IDE is an overkill for plain C. I find them usefull only for large C++ projects.

just me 5 cents


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Michael,

I have no idea what your problem is. If I understand correctly you are
running on windows 2000, you have visual studio and the W2K DDK installed.
This configuration is completely normal, and as far as I know, nobody else
is having problems with using Ddkbuild. I’d suggest doing a clean install of
the os followed by visual studio, sdk, and ddk on your build system. Its a
bit drastic but quite frankly something seems very wrong with your system.

Mark Roddy
Windows 2000/NT Consultant
Hollis Technology Solutions
xxxxx@hollistech.com
603 321 1032
www.hollistech.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of
Michael_Cheng@ap.logitech.com
Sent: Wednesday, April 11, 2001 5:30 AM
To: NT Developers Interest List
Subject: [ntdev] Re: Doubt regarding DLL and SYS files

Hi :
I like the way to build the driver by IDE which will give me the browse
function, However, I facing some difficult as following:

  1. SRC2DSP is usefully , but it do not work while TARGETTYPE=LIBRARY or
    EXPORT_DRIVER.
  2. The Wizard which provide by Walter Oney. it good , but there are also
    have above limitation .
    I really like the way provide by Mark (see www.hollistech.com)which use a
    batch file in IDE, However, I run into trouble , I get Out of environment
    space message while use this approach.
    I try to modify the config.sys by add SHELL=C:\WINDOWS\COMMAND.COM
    > /e:4096 /k. However, it do not work.
    Can Any one help me on that.

Thanks
Michael Cheng

Gary Little

> Developers Interest List"
> m> cc:
>
> Sent by: Fax to:
>
> xxxxx@lis Subject:
> [ntdev] Re: Doubt regarding DLL and SYS files
> ts.osr.com
>
>
>
>
>
> 2001/04/11 05:50 AM
>
> Please respond to “NT
>
> Developers Interest
>
> List”
>
>
>
>
>
>
>
>
>
>
>
> Mostly you are treading on holy ground and may incur the wrath of whatever
> GOD is reading email at the time either using the IDE or BUILD only is
> mentioned.
>
> Personally, I have been using the IDE for over 5 years now and prefer it
> over the Build/Nmake environment. You can use SRC2DSP to take a SOURCES
> file to a DSP. Walter Oney provides a wizard that will allow you to create
> a project and provides template code as well for most driver types you
> need.
>
> Either way will produce a functional driver. The fact that MS
> won’t support
> an IDE built driver? Big deal. It’s my code, my job to support my
> code, and
> I have never seen nor heard of a driver fault that was directly related to
> using the IDE for VS/VC++ 6.0, SP4.
>
> Gary
>
> -----Original Message-----
> From: Srinivasa Rao Deevi [mailto:xxxxx@Transilica.com]
> Sent: Tuesday, April 10, 2001 2:27 PM
> To: NT Developers Interest List
> Subject: [ntdev] Re: Doubt regarding DLL and SYS files
>
> HI Max
>
> But how did the driver created the way I mentioned working
> fine ? What
> could
> be the logical explanation for it ? We are able to see the
> Debug Print
> output on the WinDbg also which was going through all the
> motions that
> are
> required .
>
> By the way what is the one bit in the header ?
>
> Thanks and regards
> Srinvas
>
> -----Original Message-----
> From: Maxim S. Shatskih [mailto:xxxxx@storagecraft.com]
> Sent: Tuesday, April 10, 2001 1:49 PM
> To: NT Developers Interest List
> Subject: [ntdev] Re: Doubt regarding DLL and SYS files
>
> > I have a doubt regarding .dll and .sys files . What is the exact
> difference
> > between them ?
>
> One bit in the header and the base address above 0x80000000
>
> > Instead of using 'build ’ on command prompt , can I use
> the VC++ IDE
> to
> > create .sys file using ‘Windows DLL’ option ? If I can create a
> .sys file
> > will it be equivalent to the .sys file created using the standard
> Driver
> > procedure?
>
> No, “Windows DLL” will not help, you will need to specify lots of
> linker’s
> command line settings there. Better to use the DDK’s BUILD.
>
> Max
>
> —
> You are currently subscribed to ntdev as: xxxxx@transilica.com
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>
> —
> You are currently subscribed to ntdev as: xxxxx@delphieng.com
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>
> —
> You are currently subscribed to ntdev as: michael_cheng@ap.logitech.com
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@wattanuck.mv.com
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>
>


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

> > Subject: [ntdev] Re: Doubt regarding DLL and SYS files

>
> If you want to build within theMSVC++ IDE, the only valid way
> to do this is
> by running “build” as an external build step. We’ve
> published how to do
> this several times in The NT Insider. We’re planning to put an updated
> procedure (that’ll work properly with the WinXP DDKs) on our web site –
and
> write this up in The NT Insider – very soon.

I only saw the original article describing ddkbuild.bat in the
archive. Are
there others that didn’t get into the online archive?

No, there was only the one article on building inside the IDE using an
external command script. Some total luser who no longer works at OSR wrote
it. There were also occasional sniglets on various ways to turn on/off
useful things in sources files like browsing, but that was the only article
on ddkbuild.

I’m sure glad that peter has finally come around to seeing things my way :slight_smile:

The current version of ddkbuild is of course available on my website. If
anyone has suggestions on how to improve it or, for example, how to add XP
compatability to it, I’d be happy to evaluate and if possible and reasonable
incorporate those changes into ddkbuild.

Mark Roddy
Windows 2000/NT Consultant
Hollis Technology Solutions
xxxxx@hollistech.com
603 321 1032
www.hollistech.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

I come from the world of Graphics, where people are more used to bypass
Windows than to comply with it, and my initial reaction is, if I take care
when I initially set up the environment, I don’t need to bother about
build.exe any more. And that makes me a bit more MS independent, which I
like. But then, it takes a bit of self-sufficiency to keep things that way,
it’s not for the fainthearted. And after all, our DriverWorks does give us
drivers that can be built from the IDE.

Alberto.

-----Original Message-----
From: Dan Partelly [mailto:danp@jb.rdsor.ro]
Sent: Wednesday, April 11, 2001 5:38 PM
To: NT Developers Interest List
Subject: [ntdev] Re: Doubt regarding DLL and SYS files

link.exe — read help for options
cl.exe /help — do the same

For clues on how to set up valid flags for linker and C compiler see
makefile.def & i386mk.inc files , they are located located in the BIN
folder of 2kDDK. I look at them every time I get a new DDK version . If you
understand whats there and the reasons why the switches are set the way
they are set , youll be able to create a driver using even third party
IDE’s , several non MS C compilers , MSVC IDE , or assemblers like MASM ,
NASM and free PE linkers + small handmade utils to complement lack of
certain features in free linkers. (I dont know if this will work in the
future on XP )

However , what Mr Viscarola said is true. Don;t force your luck. build.exe
is a very nice tool , which can handle a lot
of tasks for you. And if you ask me , any IDE is an overkill for plain C. I
find them usefull only for large C++ projects.

just me 5 cents

You are currently subscribed to ntdev as: xxxxx@compuware.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Has anyone used or looked at

http://www.codeguru.com/system/KbdClass.shtml

This also describes methods to use DevStudio for driver development.

Let us know what you/to think of it!


Bartjan.

At 09:53 AM 4/12/2001 -0400, you wrote:

I come from the world of Graphics, where people are more used to bypass
Windows than to comply with it, and my initial reaction is, if I take care
when I initially set up the environment, I don’t need to bother about
build.exe any more. And that makes me a bit more MS independent, which I
like. But then, it takes a bit of self-sufficiency to keep things that
way, it’s not for the fainthearted. And after all, our DriverWorks does
give us drivers that can be built from the IDE.


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com