Hi everyone,
I’m new here. I’m pretty new to driver development as well. But I know enough to be dangerous.
I’m working on a codebase done by a developer who insisted on using a funky makefile to build the drivers. I decided to do away with this practice and rebuilt the driver to integrate fully with Visual Studio 2005. I had another driver that compiled just fine under 2005.
For somereason, I’m bumping into problems linking. I had many problems linking, but I thought I resolved most of them. Unfortunately, despite my belief that I included the right libraries, the linker has problems finding a few important symbols.
__imp__KeQueryTimeIncrement is the first one that comes up. I was under the assumption that it should be in ntoskrnl.lib, which is included (building against 3790.1830 DDK).
Anyone have any ideas as to why I can’t find this one?
Thanks
Jason Nelson
Did the funky makefile also have a file named SOURCES? If so you threw out
the only approved way to build a driver, and set your project back quite a
bit. The standard way to build drivers for Windows involves the BUILD
command (which needs a makefile Microsoft provides) and a SOURCES file you
provide.
Building in Visual Studio is a really stupid thing to do. Not only can you
hit the stuff you have with the wrong includes, you have to get the compile
settings and the version of the compiler just right (or you can get subtle
bugs). Of course you also are blocking yourself from using tools like
prefast and SDV which means you code will have a lot more bugs.
–
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply
wrote in message news:xxxxx@ntdev…
> Hi everyone,
>
> I’m new here. I’m pretty new to driver development as well. But I know
> enough to be dangerous.
>
> I’m working on a codebase done by a developer who insisted on using a
> funky makefile to build the drivers. I decided to do away with this
> practice and rebuilt the driver to integrate fully with Visual Studio
> 2005. I had another driver that compiled just fine under 2005.
>
> For somereason, I’m bumping into problems linking. I had many problems
> linking, but I thought I resolved most of them. Unfortunately, despite
> my belief that I included the right libraries, the linker has problems
> finding a few important symbols.
>
> imp KeQueryTimeIncrement is the first one that comes up. I was under
> the assumption that it should be in ntoskrnl.lib, which is included
> (building against 3790.1830 DDK).
>
> Anyone have any ideas as to why I can’t find this one?
>
> Thanks
>
> Jason Nelson
>
>
> I decided to do away with this practice and rebuilt the driver to integrate
fully with Visual Studio 2005.
What do you expect to win this way???
For somereason, I’m bumping into problems
What else would you expect when using a hammer for screws ???
I had many problems linking, but I thought I resolved most of them.
Even if you resolve them all, it does not mean that this is the end of all trouble - there may be some not-so-obvious bugs that will reveal themselves only when you run your code, and it does not necessarily imply they reveal themselves on the very first run. As Don explained to you already, WDK build is the only environment that is optimized for generating Windows driver code…
Anton Bassov
Well… I still have the sourcebase. Part of the problem is that the source had not fully divested itself from an older chip of ours and was a mess to cleanup, so I decided to start fresh with a port from linux.
I had another project which used the “custom build configuration” in vs2005… which allows you to simply launch your own batch file to build the stuff… sticking in a SETENV command, the old source built just fine. My beef with it was that the line numbers for errors didn’t get returned back to VS properly… and therefore there wasn’t all that much value gained from doing it this way.
What I really want… although noone probably really cares about what I want… is a fully-integrated modern setup… ideally with an integrated debugger (someday) that is not WinDBG. Maybe I’m too much of an idealist…
I should have added if what you are looking for is a way to build inside a
GUI environment, accept build but then look at the excellent DDKBUILD tools
free from either OSR or http://www.hollistech.com/ They give you the user
interface and browsing.
Remember Windows driver development is a tiny community, It is hard to
expect the full VS type environment for a community that most technical
books sell less than 20,000 copies.
–
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply
wrote in message news:xxxxx@ntdev…
>> I decided to do away with this practice and rebuilt the driver to
>> integrate
>> fully with Visual Studio 2005.
>
> What do you expect to win this way???
>
>> For somereason, I’m bumping into problems
>
> What else would you expect when using a hammer for screws ???
>
>
>
>> I had many problems linking, but I thought I resolved most of them.
>
> Even if you resolve them all, it does not mean that this is the end of all
> trouble - there may be some not-so-obvious bugs that will reveal
> themselves only when you run your code, and it does not necessarily imply
> they reveal themselves on the very first run. As Don explained to you
> already, WDK build is the only environment that is optimized for
> generating Windows driver code…
>
>
>
> Anton Bassov
>
Well I am very new here, and I’d be happy to launch the build environment from a batch file like I had done before, if I could figure out what switch I could throw at it to get it to return the error line numbers back to VS in the appropriate format. If you have a quick answer for that one, I’d appreciate it.
Thanks in advance,
jason
DDKBUILD see my other post will do that and browsing support.
–
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply
wrote in message news:xxxxx@ntdev…
> Well I am very new here, and I’d be happy to launch the build environment
> from a batch file like I had done before, if I could figure out what
> switch I could throw at it to get it to return the error line numbers back
> to VS in the appropriate format. If you have a quick answer for that one,
> I’d appreciate it.
>
> Thanks in advance,
> jason
>
>
>
>I should have added if what you are looking for is a way to build inside a
GUI environment, accept build but then look at the excellent DDKBUILD tools
free from either OSR or http://www.hollistech.com/ They give you the user
interface and browsing.
Thanks Don, I’ll look into this. I feel like I’m intruding into a secret club that I know very little about at the moment.
If the BUILD command is the only way approved to build drivers, I can only wonder why my predecessors chose to ignore it in our legacy drivers. My first assignment here was to fix issues with newer motherboards on some of our older products… which were built using VS6 which I upgraded to VS2005 (was this a bad idea!? whoops! although our customers are much happier I will say now).
As it stands, unfortunately, I am the only Windows Driver Developer in my company and unfortunately, my background in N-Tier distributed multiprocessing applications. Driver development is a discipline I had always wished I had to time to explore before… so … well here I am!
thanks for the tips,
Jason
xxxxx@digitaltundra.com wrote:
I’m new here. I’m pretty new to driver development as well. But I know enough to be dangerous.
I’m working on a codebase done by a developer who insisted on using a funky makefile to build the drivers. I decided to do away with this practice and rebuilt the driver to integrate fully with Visual Studio 2005. I had another driver that compiled just fine under 2005.
For somereason, I’m bumping into problems linking. I had many problems linking, but I thought I resolved most of them. Unfortunately, despite my belief that I included the right libraries, the linker has problems finding a few important symbols.
__imp__KeQueryTimeIncrement is the first one that comes up. I was under the assumption that it should be in ntoskrnl.lib, which is included (building against 3790.1830 DDK).
And indeed it is, as a quick dump of 3790.1830\lib\wxp\ntoskrnl.lib
shows. Actually, the symbol is __imp__KeQueryTimeIncrement@0. Is that
exactly what you see? Are you specifying 3790.1830\lib\wxp as your
library search list? The Windows 2000 version of ntoskrnl.lib does NOT
include KeQueryTimeIncrement. It is a relatively new interface. So, if
you are using 3790.1830\lib\w2k, you won’t find it.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
Jason,
We try not to be a secret club, feel free to ask questions. I do
recommend you search the archives of this group since that your question is
pretty common. If you are truly a newbie, I stll recomend the paper
http://www.microsoft.com/whdc/driver/foundation/DrvDev_Intro.mspx. It is a
little out of date since it misses the new things like WDF, and of course I
am biased, but I still think it helps.
–
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply
wrote in message news:xxxxx@ntdev…
> >I should have added if what you are looking for is a way to build inside
> >a
>> GUI environment, accept build but then look at the excellent DDKBUILD
>> tools
>> free from either OSR or http://www.hollistech.com/ They give you the
>> user
>> interface and browsing.
>
> Thanks Don, I’ll look into this. I feel like I’m intruding into a secret
> club that I know very little about at the moment.
>
> If the BUILD command is the only way approved to build drivers, I can only
> wonder why my predecessors chose to ignore it in our legacy drivers. My
> first assignment here was to fix issues with newer motherboards on some of
> our older products… which were built using VS6 which I upgraded to VS2005
> (was this a bad idea!? whoops! although our customers are much happier I
> will say now).
>
> As it stands, unfortunately, I am the only Windows Driver Developer in my
> company and unfortunately, my background in N-Tier distributed
> multiprocessing applications. Driver development is a discipline I had
> always wished I had to time to explore before… so … well here I am!
>
> thanks for the tips,
> Jason
>
>
>
DDKBUILD should bring the compiler/linker errors back to visual studio so
that you can easily click to the appropriate source file location. It also
has the advantage of leaving you with a driver package that can be built
without ddkbuild using the standard WDK command line build tools, and you
can incorporate ddkbuild into a toplevel makefile that can generate complex
interelated project trees using assorted build tools.
On Jan 7, 2008 12:15 PM, wrote:
> Well I am very new here, and I’d be happy to launch the build environment
> from a batch file like I had done before, if I could figure out what switch
> I could throw at it to get it to return the error line numbers back to VS in
> the appropriate format. If you have a quick answer for that one, I’d
> appreciate it.
>
> Thanks in advance,
> jason
>
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
–
Mark Roddy
Thanks for the tips guys, I really appreciate it! I promised I’d have this thing built before my 1:00CST meeting. Hopefully I’ll be able to get it done.
I would suspect that the output from the WDKs might not parse well if you were using VS 6 as the IDE or anything earlier. I guess more details would help in finding a solution to his problem. Be specific as to DDK/WDK version and options used to invoke it. What IDE and how does it invoke the build process such as makefile type or a GUI IDE controlled build. Also to answer future questions, details about targeted OS versions would be useful. Maybe some info about the hardware stack involved, if any.
“Mark Roddy” wrote in message news:xxxxx@ntdev…
DDKBUILD should bring the compiler/linker errors back to visual studio so that you can easily click to the appropriate source file location. It also has the advantage of leaving you with a driver package that can be built without ddkbuild using the standard WDK command line build tools, and you can incorporate ddkbuild into a toplevel makefile that can generate complex interelated project trees using assorted build tools.
On Jan 7, 2008 12:15 PM, wrote:
Well I am very new here, and I’d be happy to launch the build environment from a batch file like I had done before, if I could figure out what switch I could throw at it to get it to return the error line numbers back to VS in the appropriate format. If you have a quick answer for that one, I’d appreciate it.
Thanks in advance,
jason
—
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
–
Mark Roddy
David,
I use Mark’s DDKBUILD with VS6 all the time. In fact I am writing
this while compiling with the latest beta Server 2008 WDK no problems what
so ever.
–
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply
“David Craig” wrote in message news:xxxxx@ntdev…
I would suspect that the output from the WDKs might not parse well if you
were using VS 6 as the IDE or anything earlier. I guess more details would
help in finding a solution to his problem. Be specific as to DDK/WDK
version and options used to invoke it. What IDE and how does it invoke the
build process such as makefile type or a GUI IDE controlled build. Also to
answer future questions, details about targeted OS versions would be useful.
Maybe some info about the hardware stack involved, if any.
“Mark Roddy” wrote in message news:xxxxx@ntdev…
DDKBUILD should bring the compiler/linker errors back to visual studio so
that you can easily click to the appropriate source file location. It also
has the advantage of leaving you with a driver package that can be built
without ddkbuild using the standard WDK command line build tools, and you
can incorporate ddkbuild into a toplevel makefile that can generate complex
interelated project trees using assorted build tools.
On Jan 7, 2008 12:15 PM, wrote:
Well I am very new here, and I’d be happy to launch the build
environment from a batch file like I had done before, if I could figure out
what switch I could throw at it to get it to return the error line numbers
back to VS in the appropriate format. If you have a quick answer for that
one, I’d appreciate it.
Thanks in advance,
jason
—
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
–
Mark Roddy
Why you degrade and humiliate yourself by stooping down from your lofty
development perch to help the feeble with their microwave-oven
class problems is beyond me, but I just might have to recommend you for a
DDK MVP spot, and then what would you do?
On Jan 7, 2008 12:08 PM, wrote:
> > I decided to do away with this practice and rebuilt the driver to
> integrate
> > fully with Visual Studio 2005.
>
> What do you expect to win this way???
>
> > For somereason, I’m bumping into problems
>
> What else would you expect when using a hammer for screws ???
>
>
>
> > I had many problems linking, but I thought I resolved most of them.
>
> Even if you resolve them all, it does not mean that this is the end of all
> trouble - there may be some not-so-obvious bugs that will reveal themselves
> only when you run your code, and it does not necessarily imply they reveal
> themselves on the very first run. As Don explained to you already, WDK build
> is the only environment that is optimized for generating Windows driver
> code…
>
>
>
> Anton Bassov
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
–
Mark Roddy
ddkbuild has very little interference in it between build output and VS
error parsing, and has worked with all of the endless array of vs releases
since I wrote it back in the 94-95 timeframe. I’d be surprised if it didn’t
work with VS6 and the WDK. However I think the OP claims to be using VS 2005
and I know that combination works just fine.
On Jan 7, 2008 1:37 PM, David Craig wrote:
> I would suspect that the output from the WDKs might not parse well if you
> were using VS 6 as the IDE or anything earlier. I guess more details would
> help in finding a solution to his problem. Be specific as to DDK/WDK
> version and options used to invoke it. What IDE and how does it invoke the
> build process such as makefile type or a GUI IDE controlled build. Also to
> answer future questions, details about targeted OS versions would be
> useful. Maybe some info about the hardware stack involved, if any.
>
> “Mark Roddy” wrote in message news:xxxxx@ntdev…
> DDKBUILD should bring the compiler/linker errors back to visual studio so
> that you can easily click to the appropriate source file location. It also
> has the advantage of leaving you with a driver package that can be built
> without ddkbuild using the standard WDK command line build tools, and you
> can incorporate ddkbuild into a toplevel makefile that can generate complex
> interelated project trees using assorted build tools.
>
> On Jan 7, 2008 12:15 PM, wrote:
>
> > Well I am very new here, and I’d be happy to launch the build
> > environment from a batch file like I had done before, if I could figure out
> > what switch I could throw at it to get it to return the error line numbers
> > back to VS in the appropriate format. If you have a quick answer for that
> > one, I’d appreciate it.
> >
> > Thanks in advance,
> > jason
> >
> >
> >
> > —
> > NTDEV is sponsored by OSR
> >
> > For our schedule of WDF, WDM, debugging and other seminars visit:
> > http://www.osr.com/seminars
> >
> > To unsubscribe, visit the List Server section of OSR Online at
> > http://www.osronline.com/page.cfm?name=ListServer
> >
>
>
>
> –
> Mark Roddy
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
–
Mark Roddy
Mark Roddy wrote:
Why you degrade and humiliate yourself by stooping down from your
lofty development perch to help the feeble with their microwave-oven
class problems is beyond me, but I just might have to recommend you
for a DDK MVP spot, and then what would you do?
You know, this reminds me of a story. Back in 7th grade or so, I commented to my home economics teacher that one of her new, upcoming classes centered around cooking using the microwave seemed quite unnecessary. After all, what’s there to know? Put in the time and press start! Of course, she didn’t appreciate my point of view and I got yelled at, much like I did most days for various offenses.
OKAY Update:
The line numbers weren’t coming out of the build because I was using an older DDK. The 5512 DDK seems to report the errors properly.
There is not 5512 DDK. There was a beta release of the WDK with that
number, but it long ago expired. Any submissions done with it will probably
get rejected. The license says it can’t be used for drivers to run on
released operating systems except for test. If a client finds out, they may
send in the lawyers to entertain you.
wrote in message news:xxxxx@ntdev…
> OKAY Update:
>
> The line numbers weren’t coming out of the build because I was using an
> older DDK. The 5512 DDK seems to report the errors properly.
>
> What I really want… although noone probably really cares about what I
want… is
fully-integrated modern setup… ideally with an integrated debugger (someday)
that
is not WinDBG. Maybe I’m too much of an idealist…
Visual Studio’s project options screens are much worse then SOURCES file, for
instance, you cannot use includes there, and it is hard to see all these
options at hand.
–
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com