The version member indicates what version of the API the module was created against. It should be set to one of the PLUGIN_API_VERSION constants found in the QCDModDefs.h header.
Most of the plug-in function pointers that have string parameters are multi-byte string pointers (char*). To support these legacy function calls and also provide updated support which allows full character set support regardless of the locale of the computer, alternate version flags exist: PLUGIN_API_VERSION_NTUTF8 and PLUGIN_API_VERSION_UNICODE.
Setting the version member to this flag tells the player that string parameters passed to and from plug-ins will use the system's local string encoding.
Setting the version member to this flag tells the player that the module will be expecting and sending strings in UTF8 format on NT systems (NT 4, Win2K, WinXP, Vista, and newer). On Windows 9x (95, 98, 98SE, ME) all strings will still be locally encoded multi-byte strings.
The reason strings are only encoded in UTF8 for NT systems is to avoid unnecessary conversion of strings on legacy Win9x systems. For a Win9x system to use a UTF8 encoded string, it would have to perform two conversions: UTF8 to Unicode, then Unicode to local code page. To avoid this, the player sends strings in local code page format on Win9x systems to start with. This does mean that modules will have to adjust their string support behaviors for Win9x vs. WinNT systems.
Setting the version member to this flag tells the player that string parameters passed to and from plug-ins will be Unicode strings. The multi-byte string parameters (char*) in the affected functions should cast the parameter to Unicode strings (WCHAR*).
Unicode is the encoding format used within QMP so using this version flag is most efficient as it avoids string conversions between player and plug-in. However, unless the plug-in is using a Unicode translation layer (such as Microsoft Layer for Unicode), Windows APIs on Windows 9x may not support Unicode strings.
|
Copyright (c) Quinnware 2007. All rights reserved.
|