Is there an API avaialble to install a ACM Driver

D

Das

I have developed an ACM (Audio Codec Driver) and have two files mydriver.acm
and install.inf

I would like to automate this installtion of this driver rather than using
the Add Hardware option from the control pannel. Does anyone know what API
calls exist to enable me to write a device driver setup program for my
codec?

Darryl
 
A

Alexander Grigoriev

ACM driver can be installed by just right-clicking on the INF file and
selecting "Install" option.

The following call will do it (copied from the INF file settings):

InstallHinfSection("DefaultInstall", 132, "MY_INF_file.INF");

Create your INF file from this template:

[Version]
Signature = "$Chicago$"
Class = MEDIA
ClassGUID="{4d36e96c-e325-11ce-bfc1-08002be10318}"
Provider=Unknown

[Manufacturer]
%MfgName%=Generic

[Generic]
%DeviceDesc%=MY_ACM_DRV

[DefaultInstall]
CopyFiles=MY_ACM_DRV.Copy
Updateinis=MY_ACM_DRV.Updateini
AddReg=MY_ACM_DRV.AddReg
MediaType=Software

[DefaultInstall.NT]
CopyFiles=MY_ACM_DRV.Copy
AddReg=MY_ACM_DRV.AddRegNt
MediaType=Software

[MY_ACM_DRV]
CopyFiles=MY_ACM_DRV.Copy
Updateinis=MY_ACM_DRV.Updateini
AddReg=MY_ACM_DRV.AddReg
MediaType=Software

[MY_ACM_DRV.NT]
CopyFiles=MY_ACM_DRV.Copy
AddReg=MY_ACM_DRV.AddRegNt
MediaType=Software

[MY_ACM_DRV.Copy]
MyAcmDrv.acm,,,10

[MY_ACM_DRV.UpdateIni]
system.ini,drivers,"MSACM.MY_ACM_DRV="
system.ini,drivers,,"MSACM.MY_ACM_DRV=*.acm"
system.ini,drivers32,"MSACM.MY_ACM_DRV="
system.ini,drivers32,,"MSACM.MY_ACM_DRV=MyAcmDrv.acm"

[MY_ACM_DRV.AddReg]
HKLM,%KEY_MEDIA%\acm\msacm.MY_ACM_DRV,Description,,%DeviceDesc%
HKLM,%KEY_MEDIA%\acm\msacm.MY_ACM_DRV,Driver,,MyAcmDrv.acm

[MY_ACM_DRV.AddRegNt]
HKLM,"%KEY_NT%\drivers.desc", "MyAcmDrv.acm", ,"%DeviceDesc%"
HKLM,"%KEY_NT%\drivers32", "msacm.MY_ACM_DRV", ,"MyAcmDrv.acm"

;---------------------------------------------------------------;

[DestinationDirs]
DefaultDestDir = 11 ; LDID_SYS

[SourceDisksNames]
101="My ACM CODEC Disk 1",DISK1,,

[SourceDisksFiles]
MyAcmDrv.acm=101,,

[Strings]
KEY_MEDIA="SYSTEM\CurrentControlSet\Control\MediaResources"
KEY_NT="SOFTWARE\Microsoft\Windows NT\CurrentVersion"

MfgName="My Name"
DeviceDesc="My ACM CODEC"
 
D

Das

I have managed to get the driver to install under windows NT using a
modified version of your inf file, but I noticed there are some extra
registry settings set when using my original inf file and the Add Device
option from the Multimedia option in the control pannel (shown below). do I
need to add these keys? Also is there any extra processing that windows
performs when you use the Add Device option rather than your ini file?

Microsoft\Windows\CurrentVersion\RunOnce\MigrateMMDrivers rundll32.exe
mmsys.cpl, mmseRunOnce

Microsoft\Windows NT\CurrentVersion\Userinstallable.drivers >
msacm.okiadp32=okiadp32.acm

Microsoft\Windows NT\CurrentVersion\related.desc >
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top