- Fix RosRtlDevModeA2W and RosRtlDevModeW2A for older versions of DEVMODE[AW] structures.

svn path=/trunk/; revision=12246
This commit is contained in:
Filip Navara 2004-12-20 01:52:01 +00:00
parent 5888259db6
commit 70ea1560fe

View file

@ -14,7 +14,6 @@ RosRtlDevModeA2W ( LPDEVMODEW pW, const LPDEVMODEA pA )
{ {
#define COPYS(f,len) MultiByteToWideChar ( CP_THREAD_ACP, 0, (LPSTR)pA->f, len, pW->f, len ) #define COPYS(f,len) MultiByteToWideChar ( CP_THREAD_ACP, 0, (LPSTR)pA->f, len, pW->f, len )
#define COPYN(f) pW->f = pA->f #define COPYN(f) pW->f = pA->f
memset ( pW, 0, sizeof(DEVMODEW) );
COPYS(dmDeviceName, CCHDEVICENAME ); COPYS(dmDeviceName, CCHDEVICENAME );
COPYN(dmSpecVersion); COPYN(dmSpecVersion);
COPYN(dmDriverVersion); COPYN(dmDriverVersion);
@ -80,7 +79,6 @@ RosRtlDevModeW2A( LPDEVMODEA pA, const LPDEVMODEW pW )
{ {
#define COPYS(f,len) WideCharToMultiByte( CP_THREAD_ACP, 0, pW->f, len, (LPSTR)pA->f, len, NULL, NULL ) #define COPYS(f,len) WideCharToMultiByte( CP_THREAD_ACP, 0, pW->f, len, (LPSTR)pA->f, len, NULL, NULL )
#define COPYN(f) pA->f = pW->f #define COPYN(f) pA->f = pW->f
memset ( pA, 0, sizeof(DEVMODEA) );
COPYS(dmDeviceName, CCHDEVICENAME ); COPYS(dmDeviceName, CCHDEVICENAME );
COPYN(dmSpecVersion); COPYN(dmSpecVersion);
COPYN(dmDriverVersion); COPYN(dmDriverVersion);