comdlg32: Exclude the driver path from the result.

This commit is contained in:
Detlef Riekenberg 2012-02-13 00:26:53 +01:00 committed by Alexandre Julliard
parent ca69cc6078
commit bea7032687
2 changed files with 4 additions and 5 deletions

View file

@ -322,6 +322,8 @@ static BOOL PRINTDLG_CreateDevNames(HGLOBAL *hmem, const char* DeviceDriverName,
char buf[260];
DWORD dwBufLen = sizeof(buf);
DeviceDriverName = strrchr(DeviceDriverName, '\\') + 1;
size = strlen(DeviceDriverName) + 1
+ strlen(DeviceName) + 1
+ strlen(OutputPort) + 1
@ -365,6 +367,8 @@ static BOOL PRINTDLG_CreateDevNamesW(HGLOBAL *hmem, LPCWSTR DeviceDriverName,
WCHAR bufW[260];
DWORD dwBufLen = sizeof(bufW) / sizeof(WCHAR);
DeviceDriverName = strrchrW(DeviceDriverName, '\\') + 1;
size = sizeof(WCHAR)*lstrlenW(DeviceDriverName) + 2
+ sizeof(WCHAR)*lstrlenW(DeviceName) + 2
+ sizeof(WCHAR)*lstrlenW(OutputPort) + 2

View file

@ -200,9 +200,7 @@ static void test_PrintDlgA(void)
/* The Driver Entry does not include a Path */
ptr = strrchr(driver, '\\');
todo_wine {
ok( ptr == NULL, "got %p for '%s' (expected NULL for a simple name)\n", ptr, driver);
}
/* The Driver Entry does not have an extension (fixed to ".drv") */
ptr = strrchr(driver, '.');
@ -220,11 +218,8 @@ static void test_PrintDlgA(void)
res, GetLastError(), ptr, buffer);
if (ptr) ptr[0] = '\0';
todo_wine {
ok( lstrcmpiA(driver, buffer) == 0,
"got driver '%s' (expected '%s')\n", driver, buffer);
}
}
GlobalUnlock(pDlg->hDevNames);