mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 11:26:10 +00:00
comdlg32: Exclude the driver path from the result.
This commit is contained in:
parent
ca69cc6078
commit
bea7032687
2 changed files with 4 additions and 5 deletions
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue