Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Class Net Co-installer crash the device manager on win2k

3 views
Skip to first unread message

Gadi Naor

unread,
Dec 9, 2002, 6:35:47 AM12/9/02
to
Hi ,

I install a driver for a virtual network adapter (with no actual hardware to
drive).
Installation is done with the devcon utility found in XP DDK ( I run devcon
install <My INF> <My HW ID>)

My INF installs the driver image to the system32\drivers directory and my
co-installer to system 32 directory.

Installation completes successfully, and requires to boot the machine ( Why
? How can I avoid that ?)

After machine restarts, my driver is loaded ok but :

If I choose Properties of my device in the device manager window and then
press on the Driver tab application crash.

I can see that my co-installer is loaded and called with
DIF_ADDPROPERTYPAGE_ADVANCED ( it immediatly returns with NO_ERROR)
Then it is called for DIF_INSTALLDEVICEFILES (and it returns immediatly with
NO_ERROR).

My co-installer is based on the co-installer found in XP DDK under the
toaster sample - it actually doesn't do anything.

Virtual Adapter is installed with characteristics 0x29 ( NCF_VIRTUAL |
NCF_NOT_USER_REMOVEABLE | NCF_HIDDEN)
What Am I doing wrong ?

Thanks Gadi.


Eliyas Yakub [MSFT]

unread,
Dec 10, 2002, 10:59:07 AM12/10/02
to
I see some confusion around co-installer examples of toaster in this and
another thread where somebody was trying to run an app from his INF.

Toaster sample in XP and .NET DDK has examples of both co-installer
(src\general\toaster\coinstaller) and class-installer
(src\general\classinstaller).

The coinstaller is a device specific coinstaller and it demonstrates how to
create a friendlyname for a device.

The classinstaller is a "Toaster" class installer and demonstrates how to
provide a class specific ICON and an advanced property page in
DIF_ADDPROPERTYPAGE_ADVANCED message for every single device in the Toaster
class.

Please note even though much of the code of a coinstaller and classinstaller
looks similar, the number of parameters in the entry point of the
co-installer and class-installer are different. So you can't take a
classinstaller DLL code and use that as a coinstaller. I have seen couple of
folks making this mistake and running into crashes due to stack corruption.

So Gadi, it seems to me you are doing just that. Using the classinstaller
code as a device specific coinstaller.
--
-Eliyas
This posting is provided "AS IS" with no warranties, and confers no rights.


Gadi Naor

unread,
Dec 10, 2002, 11:51:19 AM12/10/02
to
Hi and thanks for your response.

I'm aware of the differences between co-installer and class-installer.

More specifically , I use the tosater co-installer as a reference code for
my co-installer.

You can see that under src\general\toaster\coinstaller\coinst.c in function
ToasterCoInstaller

The switch for selecting the DIF function is found for
DIF_ADDPROPERTYPAGE_ADVANCED , although nothing is done there ( just like
the documentation says).

My co-installer does not handle any of the DIF function it is called , it's
simply return immediatly after doing the debug print.

Is it possible that it is a bad combination of device characteristics and
usage of co-installer ?

Any other insights would be greatly appricated.

Thanks Gadi.


"Eliyas Yakub [MSFT]" <eli...@online.microsoft.com> wrote in message
news:eGnDzSGoCHA.2012@TK2MSFTNGP11...

Eliyas Yakub [MSFT]

unread,
Dec 10, 2002, 7:04:55 PM12/10/02
to
I tested the toaster coinstaller with an NDIS virtual miniport I'm working
on and I didn't see any crash. When I bring up the device manager and click
on properties for my virtual ndis device, I see the following trace.
CoInstaller: DIF_ADDPROPERTYPAGE_ADVANCE

The characteristics in my INF file is:

Characteristics = 0x1

--
-Eliyas
This posting is provided "AS IS" with no warranties, and confers no rights.

http://www.microsoft.com/hwdev/driver/KB-drv.asp


Gadi Naor

unread,
Dec 11, 2002, 3:23:22 AM12/11/02
to
Eventually the problem was with the way I build my co-installer.

Since I use a proprietry build envoirement the co-installer entry point
wasn't compiled with WINAPI calling convention.

Many thanks for the attention,
Gadi.

"Eliyas Yakub [MSFT]" <eli...@online.microsoft.com> wrote in message

news:#iUIijKoCHA.2408@TK2MSFTNGP11...

Maxim S. Shatskih

unread,
Dec 11, 2002, 5:40:31 AM12/11/02
to
> Since I use a proprietry build envoirement

Why not use the build environment suggested by MS in all device driver
work?

Max


Gadi Naor

unread,
Dec 12, 2002, 11:07:58 AM12/12/02
to
cross-platform build env. for cross-platform source base
"Maxim S. Shatskih" <ma...@storagecraft.com> wrote in message
news:#mfv$2RoCHA.2412@TK2MSFTNGP09...

Maxim S. Shatskih

unread,
Dec 12, 2002, 12:23:08 PM12/12/02
to
You can build the cross-platform part with any build env and generate
the LIB file. Then use the usual SOURCES and the LINKLIBS clause in it
to build the NT-specific part. Co-installer is NT-specific anyway.

Max

"Gadi Naor" <gn...@checkpoint.com> wrote in message
news:#TaMihfoCHA.840@TK2MSFTNGP11...

0 new messages