Does anyone know how to make a device that uses a WinUSB driver NOT be
displayed in the "Safely Remove Hardware" list?
Thanks
MAC
Look for similar things in UMDF.
--
Maxim S. Shatskih
Windows DDK MVP
ma...@storagecraft.com
http://www.storagecraft.com
"Mac" <M...@discussions.microsoft.com> wrote in message news:C57A4239-2097-4333...@microsoft.com...
I tried adding the following to the INF file but I have not had success to
date?
HKR,,"SurpriseRemovalOK",0x00010001,1
HKR,,"Removable",0x00010001,1
HKR,,"RemovalPolicy",0x00010001,3
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Mac" <M...@discussions.microsoft.com> wrote in message
news:146CD61C-5562-4461...@microsoft.com...
I put those directives in the [Dev_AddReg] section.
I read a post online and that is the reason I tried that.
I should add I am using the WinUSB as the function driver.
Is there a way to modify the "Capabilities" value from the INF file. (If I
do this manually the device is removed from the list!
Thanks.
MAC
d
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Mac" <M...@discussions.microsoft.com> wrote in message
news:6B597C87-0372-42FA...@microsoft.com...
As you can probably tell I am quite new to driver development.
Yes, the Dev_AddReg section is called by the .HW section.
See the full INF file below.
Do you know if it is even possible to remove a device from the "Safely
Remove Hardware" list if it is using WinUSB as the function driver?
##################################################
; Adapted from the example INF in the Microsoft document "How to Use WinUSB
to Communicate with a USB Device"
[Version]
Signature = "$Windows NT$"
Class = USB
ClassGUID={36FC9E60-C465-11CF-8056-444553540000}
Provider = %ProviderName%
DriverVer=02/07/2008,1.0.0
;CatalogFile=MyCatFile.cat
; ========== Manufacturer/Models sections ===========
[Manufacturer]
%ProviderName% = MyDevice_WinUSB,NTx86,NTamd64
[MyDevice_WinUSB.NTx86]
%USB\MyDevice.DeviceDesc% =USB_Install, USB\VID_####&PID_####
[MyDevice_WinUSB.NTamd64]
%USB\MyDevice.DeviceDesc% =USB_Install, USB\VID_####&PID_####
; =================== Installation ===================
[USB_Install]
Include=winusb.inf
Needs=WINUSB.NT
[USB_Install.Services]
Include=winusb.inf
AddService=WinUSB,0x00000002,WinUSB_ServiceInstall
[WinUSB_ServiceInstall]
DisplayName = %WinUSB_SvcDesc%
ServiceType = 1
StartType = 3
ErrorControl = 1
ServiceBinary = %12%\WinUSB.sys
[USB_Install.Wdf]
KmdfService=WINUSB, WinUsb_Install
UmdfServiceOrder=WINUSB
[WinUSB_Install]
KmdfLibraryVersion=1.7
[USB_Install.HW]
AddReg=Dev_AddReg
[Dev_AddReg]
HKR,,DeviceInterfaceGUIDs,0x10000,"{MY_GUID}"
[USB_Install.CoInstallers]
AddReg=CoInstallers_AddReg
CopyFiles=CoInstallers_CopyFiles
[CoInstallers_AddReg]
HKR,,CoInstallers32,0x00010000,"WinUSBCoInstaller.dll","WUDFUpdate_01007.dll","WdfCoInstaller01007.dll,WdfCoInstaller"
[CoInstallers_CopyFiles]
WinUSBCoInstaller.dll
WdfCoInstaller01007.dll
WUDFUpdate_01007.dll
[DestinationDirs]
CoInstallers_CopyFiles=11
; ================= Source Media Section =====================
[SourceDisksNames]
1 = %DISK_NAME%,,,\i386
2 = %DISK_NAME%,,,\amd64
[SourceDisksFiles.x86]
WinUSBCoInstaller.dll=1
WdfCoInstaller01007.dll=1
WUDFUpdate_01007.dll=1
[SourceDisksFiles.amd64]
WinUSBCoInstaller.dll=2
WdfCoInstaller01007.dll=2
WUDFUpdate_01007.dll=2
; Copy Files section
;------------------------------------------------------------------------------
[_CopyFiles_sys]
winusb.sys
;*************************************************
*****************************
; Destination Directories
;------------------------------------------------------------------------------
[DestinationDirs]
DefaultDestDir = 12 ; %SystemRoot%\system32\drivers
_CopyFiles_sys = 12
; =================== Strings ===================
[Strings]
ProviderName="MCM"
USB\MyDevice.DeviceDesc="MTest"
WinUSB_SvcDesc="WinUSB Demo"
DISK_NAME="My Install Disk"
#######################################################
d
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Mac" <M...@discussions.microsoft.com> wrote in message
news:092918AE-CA55-4EEE...@microsoft.com...
Thank you for your reply.
I am using WinUSB.dll as the UMDF driver (if that makes sense?) Much like
this MS example:
http://www.microsoft.com/whdc/connect/usb/winusb_howto.mspx
I have been trying a few things so I did not show the Surprise Removal
directive I tried.
Here is what it looked like:
[Dev_AddReg]
HKR,,DeviceInterfaceGUIDs,0x10000,"{MY_GUID}"
HKR,,"SurpriseRemovalOK",0x00010001,1
HKR,,"Removable",0x00010001,1
HKR,,"RemovalPolicy",0x00010001,3
I appreciate your efforts.
Thanks.
MAC
d
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Mac" <M...@discussions.microsoft.com> wrote in message
news:F11B44C5-9CC1-491D...@microsoft.com...
I am using the winusb.dll from my application. (2nd option)
Is there a way to setup the INF file such that the device is not in the
"Safely Remove Hardware" list?
Thanks,
MAC
If anyone has any ideas please help!!
Thanks.
MAC
I've been looking for a solution (or a definite answer) on how to set up my
INF file so that my device does not appear in the "Safely Remove Hardware"
list.
I am using the winusb.dll from my application.
Is there a way to setup the INF file such that the device is not in the