Are you setting an unload routine ?
d
debt from my phone
-----Original Message-----
From: xxxxx@libero.it
Sent: Friday, August 05, 2011 3:10 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Questions about device naming
You never answered the question about serial numbers. Do your devices
have serial numbers? Are they different?
Do you mean usb iSerialNumber?
I checked, usb devices don’t implement it.
You seem to also be confusing the device SETUP class GUID, with the device
INTERFACE GUID. This is a common mistake. They are entirely separate things.
Several of my devices might belong to the device SETUP class GUID “OSR Machine
Tools” – and thus appear under OSR Machine Tools in Device Manager. Each type
of tool could have its own INTERFACE GUID, say GUID_INTERFACE_OSR_TOOL_LATHE for
example.
I know, in fact in the inf file i’ve the Classinstall32 section with a specific GUID, while the devices have another GUID, used in WdfDeviceCreateDeviceInterface.
Where, exactly, are you doing this “renaming”. You show a code snippet
entirely out of context and expect us to infer something about it. My
inference is that this is a piece of code from your AddDevice handler, right
before you create the symbolic link. …
The symbolic link was a test, i don’t use it in the driver.
The strange thing is that everything go well with a single device plugged into the system. DriverEntry is ok,EvtDeviceAdd is ok,Read,Write,IoDeviceControl ok. Everything is ok.
The problem comes when i plug a second device.
The first continues to function properly while the second gives an error.
I search everywere in the web about code 38 and i found this:
CM_PROB_DRIVER_FAILED_PRIOR_UNLOAD
The driver could not be loaded because a previous instance is still loaded.
Error Code 38
Display Message (Windows XP and later versions of Windows)
“Windows cannot load the device driver for this hardware because a previous instance of the device driver is still in memory. (Code 38)”
Recommended Resolution (Windows XP and later versions of Windows)
A previous driver instance can still be loaded due to an incorrect reference count or a race between load and unload operations. Additionally, this message can appear if a driver is referenced by multiple INF AddService directives in one or more INF files.
Select Restart Computer, which will restart the computer.
Could it be a mistake in the inf file?
This is the section of my inf file where i define service and coinstaller:
;/***************************************/
[InstallDriver.Services]
AddService = Algotex2011, 0x00000002, AlgotexAddService
[AlgotexAddService]
DisplayName = %SvcDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %10%\system32\drivers\Algotex2011.sys
[InstallDriver.CoInstallers]
AddReg=CoInstaller_AddReg
CopyFiles=CoInstaller_CopyFiles
[CoInstaller_AddReg]
HKR,CoInstallers32,0x00010000, “WdfCoInstaller01009.dll,WdfCoInstaller”
[CoInstaller_CopyFiles]
WdfCoInstaller01009.dll
[InstallDriver.Wdf]
KmdfService = Algotex2011, Algotex2011_wdfsect
[Algotex2011_wdfsect]
KmdfLibraryVersion = 1.9
;/***************************************/
Or could it be a coinstaller problem?
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