In the test_myDriver.cpp application I have the code

----------
char *sLinkName = "\\\\.\\myDevice0";


return CreateFile(sLinkName, GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ,
NULL,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,
NULL);

-------------

Unfortunately in debug (on MS Visual C++ 6.0), CreateFile
() is failing to get a handle to myDevice and whenever I
start the driver using Numega EzDriverInstaller or the
Hardware Installation Wizard the OS (WinXP) crashes and
sometimes I get the Blue Screen (sometimes the machine
goes automatically into reboot.) If it means anything, I
am running myDriver on the host machine (ain't got the
funding for a dedicated target machine).

Can anyone offer any suggestions? Thanks.

Antranik

Re: SDK CreateFile() failing to open device by Gary

Gary
Fri Sep 05 08:26:14 CDT 2003

Yes but you probably won't like it. Get yourself a proper kernel debug
environment, either SoftIce or a remote/target system. SoftIce will cost
about $700 US and a second machine will cost less than $600 US.

That, plus the DDK and an MSDN subscription, is the cost of doing driver
development. If you or your company can't afford the tools, then you don't
need to be developing device drivers.

--
Gary G. Little

"Antranik" <ardziv1@freenet.am> wrote in message
news:2a7301c373ab$cfc74210$a501280a@phx.gbl...
> In the test_myDriver.cpp application I have the code
>
> ----------
> char *sLinkName = "\\\\.\\myDevice0";
>
>
> return CreateFile(sLinkName, GENERIC_READ | GENERIC_WRITE,
> FILE_SHARE_READ,
> NULL,
> OPEN_EXISTING,
> FILE_ATTRIBUTE_NORMAL,
> NULL);
>
> -------------
>
> Unfortunately in debug (on MS Visual C++ 6.0), CreateFile
> () is failing to get a handle to myDevice and whenever I
> start the driver using Numega EzDriverInstaller or the
> Hardware Installation Wizard the OS (WinXP) crashes and
> sometimes I get the Blue Screen (sometimes the machine
> goes automatically into reboot.) If it means anything, I
> am running myDriver on the host machine (ain't got the
> funding for a dedicated target machine).
>
> Can anyone offer any suggestions? Thanks.
>
> Antranik



Re: SDK CreateFile() failing to open device by Zuka

Zuka
Fri Sep 05 09:40:47 CDT 2003

You can even buy a used computer for your second machine.
It doesn't have to be very fast.
My first machine is AMD Thunderbird 2GHz and I'm debugging with my Celeron
700 portable with only 128Megs of RAM



"Gary G. Little" <gary.g.little.nospam@seagate.com> wrote in message
news:W906b.718$X%7.194@newssvr23.news.prodigy.com...
> Yes but you probably won't like it. Get yourself a proper kernel debug
> environment, either SoftIce or a remote/target system. SoftIce will cost
> about $700 US and a second machine will cost less than $600 US.
>
> That, plus the DDK and an MSDN subscription, is the cost of doing driver
> development. If you or your company can't afford the tools, then you don't
> need to be developing device drivers.
>
> --
> Gary G. Little
>
> "Antranik" <ardziv1@freenet.am> wrote in message
> news:2a7301c373ab$cfc74210$a501280a@phx.gbl...
> > In the test_myDriver.cpp application I have the code
> >
> > ----------
> > char *sLinkName = "\\\\.\\myDevice0";
> >
> >
> > return CreateFile(sLinkName, GENERIC_READ | GENERIC_WRITE,
> > FILE_SHARE_READ,
> > NULL,
> > OPEN_EXISTING,
> > FILE_ATTRIBUTE_NORMAL,
> > NULL);
> >
> > -------------
> >
> > Unfortunately in debug (on MS Visual C++ 6.0), CreateFile
> > () is failing to get a handle to myDevice and whenever I
> > start the driver using Numega EzDriverInstaller or the
> > Hardware Installation Wizard the OS (WinXP) crashes and
> > sometimes I get the Blue Screen (sometimes the machine
> > goes automatically into reboot.) If it means anything, I
> > am running myDriver on the host machine (ain't got the
> > funding for a dedicated target machine).
> >
> > Can anyone offer any suggestions? Thanks.
> >
> > Antranik
>
>



Re: SDK CreateFile() failing to open device by Antranik

Antranik
Sat Sep 06 02:25:45 CDT 2003

Thanks for the reply. I myself am a provacateur and will
show your response to my boss and try to squeeze some more
money out of his wallet. Actually, I already got SoftIce
and the Win2k DDK. For the target machine and other stuff
it ain't so much not having the money as convincing the
echelon to spend it my way. It doesn't help that I am the
only one in the company that understands anything about
device driver development and the boss(es) are not s/w
engineers but bean-counters.

Antranik



>-----Original Message-----
>Yes but you probably won't like it. Get yourself a
proper kernel debug
>environment, either SoftIce or a remote/target system.
SoftIce will cost
>about $700 US and a second machine will cost less than
$600 US.
>
>That, plus the DDK and an MSDN subscription, is the cost
of doing driver
>development. If you or your company can't afford the
tools, then you don't
>need to be developing device drivers.
>
>--
>Gary G. Little
>
>"Antranik" <ardziv1@freenet.am> wrote in message
>news:2a7301c373ab$cfc74210$a501280a@phx.gbl...
>> In the test_myDriver.cpp application I have the code
>>
>> ----------
>> char *sLinkName = "\\\\.\\myDevice0";
>>
>>
>> return CreateFile(sLinkName, GENERIC_READ |
GENERIC_WRITE,
>> FILE_SHARE_READ,
>> NULL,
>> OPEN_EXISTING,
>> FILE_ATTRIBUTE_NORMAL,
>> NULL);
>>
>> -------------
>>
>> Unfortunately in debug (on MS Visual C++ 6.0),
CreateFile
>> () is failing to get a handle to myDevice and whenever I
>> start the driver using Numega EzDriverInstaller or the
>> Hardware Installation Wizard the OS (WinXP) crashes and
>> sometimes I get the Blue Screen (sometimes the machine
>> goes automatically into reboot.) If it means anything, I
>> am running myDriver on the host machine (ain't got the
>> funding for a dedicated target machine).
>>
>> Can anyone offer any suggestions? Thanks.
>>
>> Antranik
>
>
>.
>

Re: SDK CreateFile() failing to open device by Antranik

Antranik
Sat Sep 06 03:14:46 CDT 2003

Thank you very much for your reply.

In the setupapi.log is the following:
---------
#-019 Searching for hardware ID(s): 1394
\myCompany&myDevice1
#I022 Found "1394\myCompany&myDevice1" in
c:\mydriver\sys\objchk\i386\mydriver.inf; Device:
"myDevice"; Driver: "myDevice"; Provider: "My Software
Company"; Mfg: "My Software Company"; Section name:
"myDriver".
#I087 Driver node not trusted, rank changed from
0x00000000 to 0x0000c000.
#I023 Actual install section: [myDriver]. Rank:
0x0000c000. Effective driver date: 08/21/2003.
#-166 Device install function: DIF_SELECTBESTCOMPATDRV.
#I063 Selected driver installs from section [myDriver]
in "c:\myDriver\sys\objchk\i386\myDriver.inf".
#I320 Class GUID of device remains: {4D36E97D-E325-11CE-
BFC1-08002BE10318}.
#I060 Set selected driver.
#I058 Selected best compatible driver.
#-124 Doing copy-only install of "ROOT\SYSTEM\0003".
#E360 An unsigned or incorrectly signed
file "c:\myDriver\sys\objchk\i386\myDriver.inf" for driver
"myDevice" will be installed (Policy=Ignore). Error
0xe000022f: The third-party INF does not
contain digital signature information.
#-166 Device install function: DIF_REGISTER_COINSTALLERS.
#I056 Coinstallers registered.
#-166 Device install function: DIF_INSTALLINTERFACES.
#-011 Installing section [myDriver.Interfaces]
from "c:\myDriver\sys\objchk\i386\myDriver.inf".
#I054 Interfaces installed.
#-166 Device install function: DIF_INSTALLDEVICE.
#I123 Doing full install of "ROOT\SYSTEM\0003".
#E360 An unsigned or incorrectly signed
file "c:\myDriver\sys\objchk\i386\myDriver.inf" for driver
"ProtectBufDevice" will be installed (Policy=Ignore).
Error 0xe000022f: The third-party INF does not
contain digital signature information.
[2003/08/21 18:04:02 564.4]
#-198 Command line processed: C:\WINDOWS\system32
\services.exe
#W383 "certclas.PNF" migrate: PNF Language = 0409, Thread
= 0419.
[2003/08/21 18:03:53 564.3 Driver Install]
------------

Could the absence of driver signature cause the driver to
be unopenable from CreateFile(), and could that be the
cause of my system crash when I use the hardware installer
wizard? Also, when I use the SoftIce debugger the system
still crashes.

Antranik


>-----Original Message-----
>This suggests you have a problem with your drivers code.
Installation should
>never crash.
>Even if it doesn't crash it doesn't mean allways your
installation is
>complete.
>Take a look at c:\windows\setupapi.log
>to see how your installation went
>
>
>Zuka
>
>"Antranik" <ardziv1@freenet.am> wrote in message
>news:2a7301c373ab$cfc74210$a501280a@phx.gbl...
>> In the test_myDriver.cpp application I have the code
>>
>> ----------
>> char *sLinkName = "\\\\.\\myDevice0";
>>
>>
>> return CreateFile(sLinkName, GENERIC_READ |
GENERIC_WRITE,
>> FILE_SHARE_READ,
>> NULL,
>> OPEN_EXISTING,
>> FILE_ATTRIBUTE_NORMAL,
>> NULL);
>>
>> -------------
>>
>> Unfortunately in debug (on MS Visual C++ 6.0),
CreateFile
>> () is failing to get a handle to myDevice and whenever I
>> start the driver using Numega EzDriverInstaller or the
>> Hardware Installation Wizard the OS (WinXP) crashes and
>> sometimes I get the Blue Screen (sometimes the machine
>> goes automatically into reboot.) If it means anything, I
>> am running myDriver on the host machine (ain't got the
>> funding for a dedicated target machine).
>>
>> Can anyone offer any suggestions? Thanks.
>>
>> Antranik
>
>
>.
>

Re: SDK CreateFile() failing to open device by Zuka

Zuka
Sat Sep 06 06:27:56 CDT 2003


>
> Could the absence of driver signature cause the driver to
> be unopenable from CreateFile(), and could that be the
> cause of my system crash when I use the hardware installer
> wizard? Also, when I use the SoftIce debugger the system
> still crashes.

No.
Signature absence makes windows display that horrible message about how
unsecure it is. That's all. If you answer "install anyway" everything is ok.

I think you have to debug your driver's code


>
> Antranik
>