RFC: implementation of driver functionality in msacm (RESEND)

Alex Villací­s Lasso a_villacis at palosanto.com
Tue Jan 10 15:38:18 CST 2006

Eric Pouech wrote:

> Alex Villací­s Lasso wrote:
>> Eric Pouech wrote:
>>>> * Implementation of broadcasts to notification windows on driver 
>>>> add/remove, enabling/disabling, and priority changes
>>> - MSDN seems to state that differed notification is actually a 
>>> counter, not a simple boolean (whereas enable/disable is a boolean)
>> I have just read the MSDN web page, and I see no remark that suggests 
>> that deferred notification should behave as a counter instead of a 
>> simple on/off flag. Or maybe I am reading the page incorrectly...
> well...
> ACM_DRIVERPRIORITYF_END     Calling task wants to reenable change 
> notification broadcasts. An application must call acmDriverPriority 
> with ACM_DRIVERPRIORITYF_END for each successful call with the 
> ACM_DRIVERPRIORITYF_BEGIN flag. Note that hadid must be NULL, 
> dwPriority must be zero, and only the ACM_DRIVERPRIORITYF_END flag can 
> be set.
... then I need new glasses :-)

>>>> * Fix for implementation quirks of acmDriverMessage() in order to 
>>>> allow native codecs to display configuration dialogs
>>> this seems rather hackish. did you actually tested this on Windows ? 
>>> Moreover, the size bits look especially suspicious. Where did you 
>>> get the 16 value from ?
>> I tested the native msacm32.dll from Windows 98 SE on Wine, and it 
>> reported a 16-byte struct size to the winemp3 codec. 
> how do you know it's a 16 byte struct? there's nothing in the passed 
> information that tells you it's 16 bytes AFAICS

Yes, there is:
(begin MSDN quote)


Directs the installable driver to display its configuration dialog box 
and let the user specify new settings for the given installable driver 



Identifier of the installable driver. This is the same value previously 
returned by the driver from the *DRV_OPEN* 


Handle of the installable driver instance.


Handle of the parent window. This window is used as the parent window 
for the configuration dialog box.


Address of a *DRVCONFIGINFO* 
structure or NULL. If the structure is given, it contains the names of 
the registry key and value associated with the driver.


Contains the registry key and value names associated with the 
installable driver.

|typedef struct tagDRVCONFIGINFO {
    DWORD dwDCISize; 
    LPCWSTR lpszDCISectionName; 
    LPCWSTR lpszDCIAliasName; 



Size of the structure, in bytes.


Address of a null-terminated, wide-character string specifying the name 
of the registry key associated with the driver.


Address of a null-terminated, wide-character string specifying the name 
of the registry value associated with the driver.

(end MSDN quote)

I examined the DRVCONFIGINFO structure prepared by native msacm32.dll to 
codecs, in particular the dwDCISize field. Even when the sum of all 
fields in the structure declaration yields 12 bytes, dwDCISize holds a 
value of 16 when supplied by native msacm32.dll. So, I used the same 
value in order to mimic native as close as possible.

Alex Villacís Lasso

More information about the wine-devel mailing list