MAXPNAMELEN

Joshua Ashton joshua at froggi.es
Thu Jan 28 21:07:21 CST 2021


That's just how it is in Windows.

That's just what it was defined as.

- Joshie 🐸✨

On 1/29/21 2:02 AM, Doug Kingston wrote:
> dlls/include/mmsystem.h:#define MAXPNAMELEN      32     /* max product 
> name length (including NULL) */
> 
> I wanted to know what the reason was for bounding this string to only 32 
> bytes (actually 31 + null).  We have a situation with identical devices 
> and need to add some differentiating text to that string when multiple 
> identical devices exist so that applications can choose the correct device.
> 
> Our device product string is "USB PnP Sound Device" (20 chars).
> mmdevdrv.c:static WCHAR *construct_device_id() then prefixs with either 
> "In: " (4 chars) or "Out: " (5 chars) and concatenates " - USB" (6 chars).
> 
>     In: USB PnP Sound Device - USB
>     Out: USB PnP Sound Device - USB
> 
> Total string length is 30 or 31 characters.  Any additional text added 
> at the end will get truncated and a prefix will cause the existing 
> string to be truncated.
> 
> -Doug-
>



More information about the wine-devel mailing list