adamkod
Wed Nov 12 15:21:51 CST 2003
During intialization, the Device Manager should load your driver from the
release directory. Do you see any indication of this in the debug output?
---
Adam Kodeda [MS]
Windows CE File Systems/Storage
To reply directly, remove "online." from my e-mail address.
This posting is provided AS IS with no warranties, and confers no rights.
--------------------
>From: "sc" <shui@no.com>
>References: <uilHt8NlDHA.2616@TK2MSFTNGP11.phx.gbl>
<u0tVo0OlDHA.1960@TK2MSFTNGP12.phx.gbl>
<uUXBVsPlDHA.2536@tk2msftngp13.phx.gbl>
<OGBvM7PlDHA.2512@TK2MSFTNGP09.phx.gbl>
<#efKLoQlDHA.988@TK2MSFTNGP10.phx.gbl>
<O1oaqXklDHA.2444@TK2MSFTNGP09.phx.gbl>
<#8X3ChulDHA.2404@TK2MSFTNGP12.phx.gbl>
>Subject: Re: CreateFile() for stream stream file fail
>Date: Mon, 20 Oct 2003 08:56:37 -0400
>Lines: 248
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
>Message-ID: <#O10NjwlDHA.3504@TK2MSFTNGP11.phx.gbl>
>Newsgroups: microsoft.public.windowsce.platbuilder
>NNTP-Posting-Host: iquum-gw.bitn1-gw1.ma.us.veroxity.net 216.57.131.130
>Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP11.phx.gbl
>Xref: cpmsftngxa06.phx.gbl microsoft.public.windowsce.platbuilder:40825
>X-Tomcat-NG: microsoft.public.windowsce.platbuilder
>
>in reginit.ini
>[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\LIAT]
> "Prefix"="IQL"
> "Dll"="LIAT.dll"
> "Index"=dword:1
> "Order"=dword:0
>
>in ce.bib
> LIAT.dll C:\WINCE400\PUBLIC\IQuumLIAT\LIAT\IQuumDevRel\LIAT.dll NK SH
>
>this is how I open the device with an invalid handle and a GetLastError of
>55(ERROR_DEV_NOT_EXIST
>)
>hStream=CreateFile(L"IQL1:", GENERIC_READ|GENERIC_WRITE,
> 0,
> NULL,
> OPEN_EXISTING,
> FILE_ATTRIBUTE_NORMAL,
> NULL);
>
>yes, it is present in reginit.ini
>LIAT.dll is in flat release dir and entry is in ce.bib.
>Did I miss anything on the registry?
>
>Could the problem be because my device is not on a PCI bus?
>I am using the Sharp BlueStreak, it has a proprietary bus.
>How does the loading process work? Does the device manager look through
the
>registry entry and loads the drivers.
>
>"Yannick Chamming's" <ychammings_nospam@adeset.com> wrote in message
>news:%238X3ChulDHA.2404@TK2MSFTNGP12.phx.gbl...
>> what are the settings in registry for your driver ?
>>
>> Have you checked that they are present in reginit.ini after a build ?
>>
>> --
>> ----------------------------------------------------------------
>> Yannick Chamming's
>> ADESET
>> Windows Embedded Manager
>> ychammings_AT_adeset_DOT_com>
>>
http://www.adeset.com
>> Tél : +33 (0)4.72.18.57.77
>> Fax : +33 (0)4.72.18.57.78
>> ----------------------------------------------------------------
>>
>> "sc" <no.com> wrote in message
>news:O1oaqXklDHA.2444@TK2MSFTNGP09.phx.gbl...
>> > I do have debug serial working. and I do have debug msg in my custom
>> > driver, and this is another suspicious thing, I never see another debug
>> msgs
>> > from
>> > my custom driver(I see them in my display, touch drivers).
>> > Not even a msg in the WinMain(), this is why I'm suspect that device
>> manager
>> > didn't even try to load the driver.
>> > Could this be a problem bc I use PB wizard to create a skeleton DLL
with
>> > winmain instead of just a empty dll? bc the linker is link with the
>option
>> > /entry:..crt..winmain..
>> > (I'll need to check tomorrow morning)
>> >
>> > "Rui Tang" <tangrui76@hotmail.com> wrote in message
>> > news:#efKLoQlDHA.988@TK2MSFTNGP10.phx.gbl...
>> > > As Paul suggested, you should at least have some way to dump debug
>> > > message. This shouldn't be difficult and I suppose that you already
>> have.
>> > > Then you should do the following thing:
>> > > 1). Add debug msg in your XXX_Init function. This will be printed
>out
>> as
>> > > the OS boots up and loads the driver. Make sure that your driver is
>> loaded
>> > > correctly.
>> > > 2). Add debug msg in your XXX_Open function. This will be printed
>out
>> > when
>> > > you tries to CreateFile on it.
>> > >
>> > > This information will help you locating where the problem is: it's
>> maybe
>> > > wrongly registry setup, failed to return correctly in XXX_Init, wrong
>> > device
>> > > index, or failed to return correctly in XXX_Open.
>> > >
>> > >
>> > > Rui Tang
>> > > Centrality Communications Inc.
>> > >
>> > > "Paul G. Tobey [eMVP]" <ptobey_no_spam@instrument.com> wrote in
>message
>> > > news:OGBvM7PlDHA.2512@TK2MSFTNGP09.phx.gbl...
>> > > > You should get the serial output working. You'll be hating
yourself
>> for
>> > a
>> > > > long time if you can't see that data (it's *much* more important to
>> the
>> > > > porting process than writing custom stream drivers, for example).
>> > > >
>> > > > What drivers *are* running?
>> > > >
>> > > > Paul T.
>> > > >
>> > > > "sc" <shui@no.com> wrote in message
>> > > > news:uUXBVsPlDHA.2536@tk2msftngp13.phx.gbl...
>> > > > > My custom hardware is still not fully functional(no functional
>ether
>> > > yet)
>> > > > > and haven't setup serial
>> > > > > for remote services.
>> > > > > I use a sample routine from a book to EnumActiveDrivers and I
>don't
>> > see
>> > > my
>> > > > > driver in the Active driver list!
>> > > > > and I have force IQL_Init to return a 1, still the drivers is not
>> > load.
>> > > > How
>> > > > > could that be.
>> > > > > I thought the registry entries for
>> > > > [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\LIAT]
>> > > > > would be loaded by the device manager when CE starts.
>> > > > > Any other suggestions besides trying ActivateDeviceEx(), which is
>> not
>> > > > > something
>> > > > > I want to do eventually?
>> > > > >
>> > > > > "Paul G. Tobey [eMVP]" <ptobey_no_spam@instrument.com> wrote in
>> > message
>> > > > > news:u0tVo0OlDHA.1960@TK2MSFTNGP12.phx.gbl...
>> > > > > > When the platform is running, open the registry with Remote
>> Registry
>> > > > > Editor
>> > > > > > and look at the keys under HKLM\Drivers\Active and see if you
>can
>> > find
>> > > > an
>> > > > > > entry for your IQL device. Maybe it's registered with a 0
>index,
>> > > IQL0:,
>> > > > > or
>> > > > > > something like that. It's also possible that the _Init
function
>> is
>> > > > > > returning 0...
>> > > > > >
>> > > > > > Paul T.
>> > > > > >
>> > > > > > "sc" <shui@no.com> wrote in message
>> > > > > > news:uilHt8NlDHA.2616@TK2MSFTNGP11.phx.gbl...
>> > > > > > > help please.
>> > > > > > > I just don't get it. what I am missing?
>> > > > > > > I create a custom stream driver in PB4.00. I checked with
>> > > > > dumpbin/exports,
>> > > > > > > the 10 functions are exported.
>> > > > > > > I have checked my ce.bib and reginit.ini file
>> > > > > > > I have a PB CE console app. and it failed with a
>> GetLastError=55=>
>> > > > > > > The specified network resource or device is no longer
>available.
>> > > > > > > ERROR_DEV_NOT_EXIST
>> > > > > > > =============
>> > > > > > > Dump of file liat.dll
>> > > > > > >
>> > > > > > > File Type: DLL
>> > > > > > >
>> > > > > > > Section contains the following exports for LIAT.dll
>> > > > > > >
>> > > > > > > 00000000 characteristics
>> > > > > > > 3F9032F2 time date stamp Fri Oct 17 14:20:34 2003
>> > > > > > > 0.00 version
>> > > > > > > 1 ordinal base
>> > > > > > > 10 number of functions
>> > > > > > > 10 number of names
>> > > > > > >
>> > > > > > > ordinal hint RVA name
>> > > > > > >
>> > > > > > > 1 0 000011CC IQL_Close
>> > > > > > > 2 1 00001100 IQL_Deinit
>> > > > > > > 3 2 000012C8 IQL_IOControl
>> > > > > > > 4 3 00001048 IQL_Init
>> > > > > > > 5 4 00001168 IQL_Open
>> > > > > > > 6 5 00001378 IQL_PowerDown
>> > > > > > > 7 6 0000137C IQL_PowerUp
>> > > > > > > 8 7 00001238 IQL_Read
>> > > > > > > 9 8 00001298 IQL_Seek
>> > > > > > > 10 9 00001268 IQL_Write
>> > > > > > >
>> > > > > > > Summary
>> > > > > > >
>> > > > > > > 1000 .data
>> > > > > > > 1000 .pdata
>> > > > > > > 1000 .rdata
>> > > > > > > 1000 .reloc
>> > > > > > > 1000 .text
>> > > > > > > ===========================
>> > > > > > > hStream=CreateFile(L"IQL1:", GENERIC_READ|GENERIC_WRITE,
>> > > > > > > 0,
>> > > > > > > NULL,
>> > > > > > > OPEN_EXISTING,
>> > > > > > > FILE_ATTRIBUTE_NORMAL,
>> > > > > > > NULL);
>> > > > > > >
>> > > > > > > if (hStream==INVALID_HANDLE_VALUE) {
>> > > > > > > printf("FAILED TO OPEN IQL1: DRIVER!\n");
>> > > > > > > printf("GetLastError=%d\n",GetLastError());
>> > > > > > > return FALSE;
>> > > > > > > }
>> > > > > > > =============================
>> > > > > > > platform.reg, reginit.ini:
>> > > > > > > [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\LIAT]
>> > > > > > > "Prefix"="IQL"
>> > > > > > > "Dll"="LIAT.dll"
>> > > > > > > "Index"=dword:1
>> > > > > > > "Order"=dword:0
>> > > > > > >
>> > > > > > > additional.bib, which is in ce.bib
>> > > > > > > MODULES
>> > > > > > > ; Name Path
>> > > > Memory
>> > > > > > > Type
>> > > > > > >
>> > > > >
>> > >
>>
> -------------- --------------------------------------------- -------
>> -
>> > > -
>> > > > > -
>> > > > > > > -
>> > > > > > > LIAT.dll
>> > > > > > > C:\WINCE400\PUBLIC\IQuumLIAT\LIAT\IQuumDevRel\LIAT.dll
>> > > > > > > NK SH
>> > > > > > >
>> > > > > > >
>> > > > > >
>> > > > > >
>> > > > >
>> > > > >
>> > > >
>> > > >
>> > >
>> > >
>> >
>> >
>>
>>
>
>
>