fixed NtGdiCreateIC() to use UNICODE_STRING

svn path=/trunk/; revision=7002
This commit is contained in:
Thomas Bluemel 2003-12-13 19:27:10 +00:00
parent 1da0ada508
commit d63d830a62
4 changed files with 31 additions and 20 deletions

View file

@ -145,10 +145,10 @@ HDC STDCALL NtGdiCreateDC(PUNICODE_STRING Driver,
PUNICODE_STRING Device, PUNICODE_STRING Device,
PUNICODE_STRING Output, PUNICODE_STRING Output,
CONST PDEVMODEW InitData); CONST PDEVMODEW InitData);
HDC STDCALL NtGdiCreateIC(LPCWSTR Driver, HDC STDCALL NtGdiCreateIC(PUNICODE_STRING Driver,
LPCWSTR Device, PUNICODE_STRING Device,
LPCWSTR Output, PUNICODE_STRING Output,
CONST PDEVMODEW DevMode); CONST PDEVMODEW DevMode);
BOOL STDCALL NtGdiDeleteDC(HDC hDC); BOOL STDCALL NtGdiDeleteDC(HDC hDC);
BOOL STDCALL NtGdiDeleteObject(HGDIOBJ hObject); BOOL STDCALL NtGdiDeleteObject(HGDIOBJ hObject);
INT STDCALL NtGdiDrawEscape(HDC hDC, INT STDCALL NtGdiDrawEscape(HDC hDC,

View file

@ -1,4 +1,4 @@
/* $Id: stubsa.c,v 1.25 2003/11/15 15:18:06 weiden Exp $ /* $Id: stubsa.c,v 1.26 2003/12/13 19:27:09 weiden Exp $
* *
* reactos/lib/gdi32/misc/stubs.c * reactos/lib/gdi32/misc/stubs.c
* *
@ -69,6 +69,7 @@ CreateICA(
{ {
NTSTATUS Status; NTSTATUS Status;
LPWSTR lpszDriverW, lpszDeviceW, lpszOutputW; LPWSTR lpszDriverW, lpszDeviceW, lpszOutputW;
UNICODE_STRING Driver, Device, Output;
DEVMODEW dvmInitW; DEVMODEW dvmInitW;
HDC rc = 0; HDC rc = 0;
@ -89,10 +90,13 @@ CreateICA(
{ {
if ( lpdvmInit ) if ( lpdvmInit )
RosRtlDevModeA2W ( &dvmInitW, (const LPDEVMODEA)lpdvmInit ); RosRtlDevModeA2W ( &dvmInitW, (const LPDEVMODEA)lpdvmInit );
rc = NtGdiCreateIC ( lpszDriverW, RtlInitUnicodeString(&Driver, lpszDriverW);
lpszDeviceW, RtlInitUnicodeString(&Device, lpszDeviceW);
lpszOutputW, RtlInitUnicodeString(&Output, lpszOutputW);
rc = NtGdiCreateIC ( &Driver,
&Device,
&Output,
lpdvmInit ? &dvmInitW : NULL ); lpdvmInit ? &dvmInitW : NULL );
HEAP_free ( lpszOutputW ); HEAP_free ( lpszOutputW );

View file

@ -1,4 +1,4 @@
/* $Id: stubsw.c,v 1.22 2003/12/12 21:37:39 weiden Exp $ /* $Id: stubsw.c,v 1.23 2003/12/13 19:27:10 weiden Exp $
* *
* reactos/lib/gdi32/misc/stubs.c * reactos/lib/gdi32/misc/stubs.c
* *
@ -51,9 +51,17 @@ CreateICW(
CONST DEVMODEW * lpdvmInit CONST DEVMODEW * lpdvmInit
) )
{ {
return NtGdiCreateIC ( lpszDriver, UNICODE_STRING Driver, Device, Output;
lpszDevice,
lpszOutput, if(lpszDriver)
RtlInitUnicodeString(&Driver, lpszDriver);
if(lpszDevice)
RtlInitUnicodeString(&Device, lpszDevice);
if(lpszOutput)
RtlInitUnicodeString(&Output, lpszOutput);
return NtGdiCreateIC ((lpszDriver ? &Driver : NULL),
(lpszDevice ? &Device : NULL),
(lpszOutput ? &Output : NULL),
(CONST PDEVMODEW)lpdvmInit ); (CONST PDEVMODEW)lpdvmInit );
} }

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: dc.c,v 1.111 2003/12/13 15:49:32 weiden Exp $ /* $Id: dc.c,v 1.112 2003/12/13 19:27:10 weiden Exp $
* *
* DC.C - Device context functions * DC.C - Device context functions
* *
@ -800,14 +800,13 @@ NtGdiCreateDC(PUNICODE_STRING Driver,
} }
HDC STDCALL HDC STDCALL
NtGdiCreateIC(LPCWSTR Driver, NtGdiCreateIC(PUNICODE_STRING Driver,
LPCWSTR Device, PUNICODE_STRING Device,
LPCWSTR Output, PUNICODE_STRING Output,
CONST PDEVMODEW DevMode) CONST PDEVMODEW DevMode)
{ {
/* FIXME: this should probably do something else... */ /* FIXME: this should probably do something else... */
//return NtGdiCreateDC(Driver, Device, Output, DevMode); return NtGdiCreateDC(Driver, Device, Output, DevMode);
return NULL;
} }
BOOL STDCALL BOOL STDCALL