mirror of
https://github.com/reactos/reactos.git
synced 2025-08-01 21:03:14 +00:00
[WIN32K] Use RtlString* routines.
This commit is contained in:
parent
0ad90f83d3
commit
acf689a973
1 changed files with 10 additions and 8 deletions
|
@ -83,8 +83,7 @@ EngpPopulateDeviceModeList(
|
||||||
|
|
||||||
/* Some drivers like the VBox driver don't fill the dmDeviceName
|
/* Some drivers like the VBox driver don't fill the dmDeviceName
|
||||||
with the name of the display driver. So fix that here. */
|
with the name of the display driver. So fix that here. */
|
||||||
wcsncpy(pdm->dmDeviceName, pwsz, CCHDEVICENAME);
|
RtlStringCbCopyW(pdm->dmDeviceName, sizeof(pdm->dmDeviceName), pwsz);
|
||||||
pdm->dmDeviceName[CCHDEVICENAME - 1] = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: release the driver again until it's used?
|
// FIXME: release the driver again until it's used?
|
||||||
|
@ -205,14 +204,17 @@ EngpRegisterGraphicsDevice(
|
||||||
pGraphicsDevice->DeviceObject = pDeviceObject;
|
pGraphicsDevice->DeviceObject = pDeviceObject;
|
||||||
pGraphicsDevice->FileObject = pFileObject;
|
pGraphicsDevice->FileObject = pFileObject;
|
||||||
|
|
||||||
/* Copy device name */
|
/* Copy the device name */
|
||||||
RtlStringCbCopyNW(pGraphicsDevice->szNtDeviceName,
|
RtlStringCbCopyNW(pGraphicsDevice->szNtDeviceName,
|
||||||
sizeof(pGraphicsDevice->szNtDeviceName),
|
sizeof(pGraphicsDevice->szNtDeviceName),
|
||||||
pustrDeviceName->Buffer,
|
pustrDeviceName->Buffer,
|
||||||
pustrDeviceName->Length);
|
pustrDeviceName->Length);
|
||||||
|
|
||||||
/* Create a win device name (FIXME: virtual devices!) */
|
/* Create a Win32 device name (FIXME: virtual devices!) */
|
||||||
swprintf(pGraphicsDevice->szWinDeviceName, L"\\\\.\\DISPLAY%d", (int)giDevNum);
|
RtlStringCbPrintfW(pGraphicsDevice->szWinDeviceName,
|
||||||
|
sizeof(pGraphicsDevice->szWinDeviceName),
|
||||||
|
L"\\\\.\\DISPLAY%d",
|
||||||
|
(int)giDevNum);
|
||||||
|
|
||||||
/* Allocate a buffer for the strings */
|
/* Allocate a buffer for the strings */
|
||||||
cj = pustrDiplayDrivers->Length + pustrDescription->Length + sizeof(WCHAR);
|
cj = pustrDiplayDrivers->Length + pustrDescription->Length + sizeof(WCHAR);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue