CrossCallsWtoA
- We should not call ASCII functions from Unicode functions. The Unicode to ASCII conversion is lossy; moreover, with the shift to Unicode, it's actually slower to deal in ASCII than in Unicode, because of the additional conversions required. Although this may require static const WCHAR strings which are less trivial to type and take twice as much room that is a small price to pay for consistency. There are 21 cross calls from Unicode to ANSI as reported on Oct. 25, 2006:
$ tools/winapi/winapi_check --none --progress --cross-call-unicode-ascii
- dlls/kernel/lzexpand.c: kernel32: LZOpenFileW: illegal call to LZOpenFileA
- dlls/rpcrt4/rpc_binding.c: rpcrt4: RpcBindingToStringBindingW: illegal call to RpcBindingToStringBindingA
- dlls/rpcrt4/rpc_binding.c: rpcrt4: RpcBindingToStringBindingW: illegal call to RpcStringFreeA
- dlls/rpcrt4/rpc_server.c: rpcrt4: RpcServerUseProtseqEpExW: illegal call to RPCRT4_strdupWtoA
- dlls/user/winhelp.c: user32: WinHelpW: illegal call to WinHelpA
- dlls/version/install.c: version: VerInstallFileW: illegal call to VerInstallFileA
- dlls/ws2_32/socket.c: ws2_32: WSAStringToAddressW: illegal call to WSAStringToAddressA
- dlls/winspool/info.c: winspool.drv: AddPrinterW: illegal call to DEVMODEdupWtoA
- dlls/winspool/info.c: winspool.drv: AddPrinterW: illegal call to RegSetValueExA
- dlls/winspool/info.c: winspool.drv: DeviceCapabilitiesW: illegal call to DEVMODEdupWtoA
- dlls/winspool/info.c: winspool.drv: DeviceCapabilitiesW: illegal call to DeviceCapabilitiesA
- dlls/winspool/info.c: winspool.drv: DeviceCapabilitiesW: illegal call to HEAP_strdupWtoA
- dlls/winspool/info.c: winspool.drv: DocumentPropertiesW: illegal call to DEVMODEdupWtoA
- dlls/winspool/info.c: winspool.drv: DocumentPropertiesW: illegal call to DocumentPropertiesA
- dlls/winspool/info.c: winspool.drv: DocumentPropertiesW: illegal call to HEAP_strdupWtoA
dlls/shell32/shellole.c: shell32: DragQueryFileW: illegal call to DragQueryFileA
dlls/shlwapi/ordinal.c: shlwapi: SHCreateWorkerWindowW: illegal call to SHCreateWorkerWindowA
dlls/shlwapi/string.c: shlwapi: StrRetToStrW: illegal call to SHStrDupA
dlls/user32/winproc.c: user32: CallWindowProcW: illegal call to WINPROC_CallProc32WTo32A
dlls/winmm/mmio.c: winmm: mmioRenameW: illegal call to mmioRenameA
dlls/winmm/mmio.c: winmm: mmioStringToFOURCCW: illegal call to mmioStringToFOURCCA
Legend:
= invalid listing, the cross-call is OK.
Status
Most of the cross calls have been fixed, but there are a few left (listed above). We need volunteers to pick up the slack.
Workers: RolfKalbermatter, Stefan Leichter, MatthewDavison, Tony Lambregts, Dmitry Timoshkov, Eric Pouech, Alexandre Julliard, JustinChevrier, Ulrich Czekalla, Mike McCormack, Juan Lang, KevinKoltzau, James Hawkins, FilipNavara, JacekCaban, Vincent Béron, Detlef Riekenberg, Stefan Dösinger.
