Re: Calling inf file or installing .sys file from DriverEntry func



This is the sequence which i need to achieve

1) I insert my card into token.
2) Driver installation framework passes the hardware ID to inf.
3) Before loading .sys file (say first.sys) corresponding to passed in
hardware id, I want to install second.sys file through my own h/w id by
calling its DriverEntry function first (before driverEntry function of
first.sys file).
4) After done with step 3, i want to call load/install first.sys file by
calling its DriverEntry function.

Is there any way to achieve this.

Regards
Wanni.

"Alexander Grigoriev" wrote:

You should also be using two separate INF files.

"umesh" <umesh@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:81C0762B-0698-4D7D-AE42-7640403DA3E2@xxxxxxxxxxxxxxxx
In addition,

Actually the USB device has a cryptograpic functionlity and i need to
create
a Smart Card Readrer so that USB device can work as a smart card. The
smart
card reader device does not have the any H/W id.

So, The task is to install the Smart card reader driver as well as USB
driver when the USB device is inserted to a USB port.

Via installer, we are able to install both the drivers. The plan is to
install the driver from Windows update site, if the driver is not avilable
on
host machine.

I already provided sample .inf file in my previous reply.

Regards,
Wanni

"umesh" wrote:

Thanks for your reply.
Ok let me explain the original problem.


My driver works on two sys file, pmt.sys and pixtel.sys

here is section of my inf file

;
; Models
;
[Pixtel]
%PID_NUM% =PMT_Install, pmt\pmtEnum ---> it installs pmt.sys file

%PID_1206% =Pixtel_Install,USB\VID_PID_1266 ---> it installs
pixtel.sys
file



[PMT_Install.NTx86]
CopyFiles=pmt_Files,pixtel_Files

....
[PMT_Install.NTx86.Services]
AddService=pmtToken,0x00000002,pmt_AddService
....



[Pixtel_Install.NTx86]
CopyFiles=pmt_Files,pixtel_Files

...
[Pixtel_Install.NTx86.Services]
AddService=pixtelToken,0x00000002,pistel_AddService
....



Now pmt\pmtEnum is my own define hardware id.
and USB\VID_PID_1266 is vendor id which i treat as hardware id.



Now first i install my pmt.sys file through my own defined executable
program (say xxx.exe) which call setupapi functions (for eg.
UpdateDriverForPlugAndPlayDevices). I pass pmt\pmtEnum as hardware id to
UpdateDriverForPlugAndPlayDevices()\, which i think internally calls INF
passing same hardware id and then in the inf file it matches the section
corresponding to hardware id and then installs the .sys file
corresponding to
it.

Also i use SetupCopyOEM() to copy inf file to WIndows\INF folder.



Now when i insert smartcard into USB, it searches the INF file and
install
pixtel.sys through Driver Installation framework (internally it passes
USB\VID_PID_1266 as hardware id)



This works fine for me, but now i want that my both .sys files (pmt.sys
and
pixtel.sys)is installed through INF file only i.e. i dont want to use any
executable program.

Through Add New Hardware program, driver installation framework is only
able
to pass USB\VID_PID_1266 (which is smart card h/w id)hardware id to inf
file,
so internally it installs only pixtel.sys file. but it does not install
pmt.sys file as driver installation framework is unable to pass my own
defined hardware id i.e pmt\pmtEnum to INF file.



Is there any way through which i can pass my own defined hardware id
i.e.
pmt\pmtEnum to INF file (through Driver installation framework) and then
second hardware id i.e. USB\VID_PID_1266.
In short i want to install my both sys files through INF file. Please
suggest me ways.



I appreciate if i can get any response.



Regards
wanni

"Don Burn" wrote:

This is a copy of the response I put on
microsoft.public.win32.programmer.kernel, please consider either
posting to
both groups together, or to only one group. Having independant posts
to two
groups causes terrible mixing of ideas.

First please explain why you feel you need such an architecture?
There are
ways to load other drivers, or trigger the PnP subsystem to do so but
without some understanding of what your needs are, I will not go into
them.
They either break PnP or are very heavyweight.


--
Don Burn (MVP, Windows DDK)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply



"umesh" <umesh@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:E3A4DE6D-26CE-4309-861A-DB103FA6059A@xxxxxxxxxxxxxxxx
Hi ALL,
I am installing a new driver through INF file. I inserted my card
into USB
and it ask me for path for INF file. I browse the the inf file and it
calls
DriverEntry function of my sys file ( correct me if am wrong)
Now from this DriverEntry function i want to install
another sys file or want to call INF file passing my own hardware ID
to
INF
file. Can you tell me if this is possible?. Is there any way through
which
i
can
load/install .sys files from another sys file (lets say from
DriverEntry
Function of another sys file).

I appreciate for any kind of inputs.

Regards
Wanni.







.



Relevant Pages

  • Re: Calling inf file or installing .sys file from DriverEntry func
    ... Actually the USB device has a cryptograpic functionlity and i need to create ... The task is to install the Smart card reader driver as well as USB ... I already provided sample .inf file in my previous reply. ...
    (microsoft.public.development.device.drivers)
  • Re: "Generic USB Input Device Support" for keydisks?
    ... > Do you know how Compatible IDs get in to the registry? ... In most cases value is read directly from hardware. ... Only difference is when PnP tries to match driver to install them from inf ... If inf file with Hardware Id is found it will be always used instead of inf ...
    (microsoft.public.windowsxp.embedded)
  • Re: IDE Channels Not Working, Causes Optical Drive Not to Function
    ... on a whim I tried Update Driver off the right-clcik menu for the channel ... Have you tried using the Add Hardware Wiz to manually locate a driver in the ... IDE/ATA/ATAPI controllers, next, choose your controller to install or the ...
    (microsoft.public.windowsxp.hardware)
  • Re: Is onboard NIC kaput? (ipconfig output: Unable to query host name.)
    ... network before all this happened. ... If the driver won't load, ... You could test the hardware, ... You could also try taking a spare disk, and doing a clean install ...
    (alt.comp.periphs.mainboard.asus)
  • Re: IOCTL_INTERNAL_MOUSE_CONNECT Equivalent for the Bluetooth Stack
    ... and just put your driver at the front of the list. ... > ClasFilt Sample INF File ... > demonstrates the installation of a class filter driver that will be ... Users can install INF files based on ...
    (microsoft.public.development.device.drivers)