Oh, I’ve seen recursion in a file system driver and that too with a bunch of
native and struct variables…
How hard it is to blow up the stack space?
Give me couple grands, i will device test case that would blow the stack at
will or even at random. I could make it even so random that would look like
living in ghost town …
Anyway, I’m letting my branch get pruned now ( not a feasible search branch
for subject matter of this thd :-).
-pro
----- Original Message -----
From: “Alberto Moreira”
To: “Windows System Software Devs Interest List”
Sent: Saturday, November 17, 2007 3:24 AM
Subject: Re: [ntdev] Porting usb device driver to Vista 64
> Hi, Pro,
>
> Oh, I hate macros. Actually, you forgot one of my favorites: big data
> structures on the stack.
>
> Happy Thanskgiving to you too!
>
> Alberto.
>
>
> ----- Original Message -----
> From: “Prokash Sinha”
> To: “Windows System Software Devs Interest List”
> Sent: Saturday, November 17, 2007 10:01 AM
> Subject: Re: [ntdev] Porting usb device driver to Vista 64
>
>
>> Cmd boxes are … this is what I realized about 4 years ago, and
>> mentioned it here in another discussion.
>>
>> It is really a matter of taste, comfortness, already an expert in some
>> area etc. etc. For newbie, it makes sense to use the IDE first.
>>
>> One thing I found though is when a newbie starts on kernel mode they
>> hardly have any clue, and more often than not they are more careful in
>> crafting code than those who are heavily experienced in user mode, and
>> come play with kernel mode. Some of the nice thing I’ve seen ( and I hate
>> most are )
>>
>> - No comments at all
>> - Variable names does not make sense
>> - c files and under #include
>> - massive use of macros ( instead of inline )
>> - functions are more than 100 lines long
>> - global variables are their’s parental property
>> - same function statically defined in more than one files
>> - less use of header files, instead put all these definition/declarations
>> inside c files
>> - and many more …
>>
>> Since some newbie would also read this, I’ve a question to ask here —
>>
>> What is a good program?
>>
>> My answer is "If most of the components are easily replaceable " (Pls
>> give it a thought)
>>
>> Happy thanksgiving!
>>
>> -pro
>>
>> ----- Original Message -----
>> From: “Alberto Moreira”
>> To: “Windows System Software Devs Interest List”
>> Sent: Saturday, November 17, 2007 5:11 AM
>> Subject: Re: [ntdev] Porting usb device driver to Vista 64
>>
>>
>>> Hi, Michal,
>>>
>>> It actually has to do with the compiler,not with the build environment.
>>> Try this: put a line pointing to your DDK binary directory right on top
>>> of your MSVC 2005 C++ Executable directory list. Now try to compile
>>> something complex, such as a C++ application that uses templates. The
>>> compiler’s going to issue error messages on perfectly acceptable code.
>>>
>>> As for creating a “standard driver” first, I disagree. I find the
>>> build.exe method byzantine, and in this day and age it is way easier for
>>> a beginner to take a standard MSVC environment and learn to use it than
>>> to master the ins and outs of a cmd box. I also believe that if someone
>>> doesn’t know how to use an IDE such as VS2005 to build and run code, he
>>> or she should not try to write drivers; a driver writer should be able
>>> to move up and down the kernel-user line with ease. I believe that the
>>> best approach to start someone in driver development is to wipe out the
>>> cmd box from the system altogether, and force the newbie to become
>>> GUI-oriented. Cmd boxes are, well, so twentieth century. 
>>>
>>> Alberto.
>>>
>>>
>>> ----- Original Message -----
>>> From: “Michal Vodicka”
>>> To: “Windows System Software Devs Interest List”
>>> Sent: Saturday, November 17, 2007 12:05 AM
>>> Subject: RE: [ntdev] Porting usb device driver to Vista 64
>>>
>>>
>>>> ----------
>>>> From:
>>>> xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com]
>>>> on behalf of Alberto Moreira[SMTP:xxxxx@ieee.org]
>>>> Reply To: Windows System Software Devs Interest List
>>>> Sent: Saturday, November 17, 2007 4:21 AM
>>>> To: Windows System Software Devs Interest List
>>>> Subject: Re: [ntdev] Porting usb device driver to Vista 64
>>>>
>>>> I would get rid of VC6 and use either the DDK compiler or the compiler
>>>> that
>>>> comes with VS2003, VS2005 or VS2008.
>>>>
>>> Great. We didn’t have compilers flamewar here for some time 
>>>
>>>> My driver, for example, builds and
>>>> works fine with either of those. In fact, I prefer to use standard MSVC
>>>> compilers, because it’s a royal pain to switch environments when I have
>>>> to
>>>> build a test app - the DDK compiler doesn’t like full-fledged C++ apps
>>>> very
>>>> much!
>>>>
>>> It has nothing to do with compiler but with the DDK environment. Yes,
>>> it’d be nice if it is improved.
>>>
>>>> Also, this allows me to have an MSVC solution that has multiple
>>>> projects, some for kernel-side code and some for user-side code: I have
>>>> the
>>>> option of batch building them all by capitalizing on the “dependencies”
>>>> ability of the IDE, or I can build them separate when I need it.
>>>>
>>> Congratulations! You reinvented build.exe inside this crazy environment
>>>
Next time you can do the same using Java if you want something even
>>> more crappy 
>>>
>>>> To add to
>>>> the heresy, we have a few Python scripts that checkout and build the
>>>> whole
>>>> nine yards, drivers and apps, 32 and 64 bits, debug and release, every
>>>> night,
>>>>
>>> This isn’t heresy, this is very reasonable approach. In the long term
>>> and from some company size the only maintainable one. We don’t use
>>> Python but bash + make for the same thing and I can’t imagine to work
>>> without it.
>>>
>>>> and they invoke devenv.exe to build the driver and its associated
>>>> applications.
>>>>
>>> We started with the same years before because it was the easiest way how
>>> to convert existing VS projects under the buildengine. Then we converted
>>> almost all project to use our scripts natively (scripts use command line
>>> compilers for many platforms). Today I said last two people using VS to
>>> convert their projects or they’re on their own.
>>>
>>> Reason? One for many: it is necessary to have an easy way how to set
>>> standard project settings and variants at one place. With VS projects it
>>> is impossible and they’re unmaintainable. It can be good for
>>> one-man-company who controls everything but not for more teams which
>>> have to cooperate.
>>>
>>>> You can call setenv.bat to setup your environment and then call
>>>> build.exe,
>>>> for example, from a buildmydriver.bat file tied up to the build
>>>> toolbar, or
>>>> if you’re more adventurous, you can invoke setenv.bat as a pre-build
>>>> step
>>>> and use the standard IDE build toolbar.
>>>>
>>>> And if you’re really adventurous, you can package the whole thing
>>>> inside an
>>>> MSVC addin. I didn’t do that yet, but I’m seriously considering it.
>>>>
>>> Alberto, OP needs to create standard driver build at first. Standard way
>>> using WDK and build.exe. Once his driver is buildable from command line,
>>> he can start play with integration to a preferred IDE. Not start with
>>> it. It seems he is far from it just now and the reason is somebody
>>> before was really adventurous and created VS project 
>>>
>>> Best regards,
>>>
>>> Michal Vodicka
>>> UPEK, Inc.
>>> [xxxxx@upek.com, http://www.upek.com]
>>>
>>> —
>>> 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
>>>
>>> —
>>> 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
>>
>>
>> —
>> 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
>
>
> —
> 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