Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
ca69cc60
Commit
ca69cc60
authored
Feb 13, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineps16.drv: Call winspool functions instead of removed wineps.drv entry points.
parent
0fb4cba7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
19 deletions
+25
-19
Makefile.in
dlls/wineps16.drv16/Makefile.in
+1
-0
driver.c
dlls/wineps16.drv16/driver.c
+24
-19
No files found.
dlls/wineps16.drv16/Makefile.in
View file @
ca69cc60
MODULE
=
wineps16.drv16
IMPORTS
=
winspool
EXTRADLLFLAGS
=
-m16
C_SRCS
=
driver.c
...
...
dlls/wineps16.drv16/driver.c
View file @
ca69cc60
...
...
@@ -25,24 +25,11 @@
#include "windef.h"
#include "wine/winuser16.h"
#include "wownt32.h"
#include "winspool.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
psdrv
);
static
HMODULE
wineps
;
static
INT
(
CDECL
*
pExtDeviceMode
)(
LPSTR
,
HWND
,
LPDEVMODEA
,
LPSTR
,
LPSTR
,
LPDEVMODEA
,
LPSTR
,
DWORD
);
static
DWORD
(
CDECL
*
pDeviceCapabilities
)(
LPSTR
,
LPCSTR
,
LPCSTR
,
WORD
,
LPSTR
,
LPDEVMODEA
);
static
HMODULE
load_wineps
(
void
)
{
if
(
!
wineps
)
{
wineps
=
LoadLibraryA
(
"wineps.drv"
);
pExtDeviceMode
=
(
void
*
)
GetProcAddress
(
wineps
,
"ExtDeviceMode"
);
pDeviceCapabilities
=
(
void
*
)
GetProcAddress
(
wineps
,
"DeviceCapabilities"
);
}
return
wineps
;
}
/**************************************************************
* AdvancedSetupDialog [WINEPS16.93]
...
...
@@ -63,9 +50,7 @@ INT16 WINAPI PSDRV_ExtDeviceMode16(HWND16 hwnd, HANDLE16 hDriver,
LPSTR
lpszProfile
,
WORD
fwMode
)
{
if
(
!
load_wineps
()
||
!
pExtDeviceMode
)
return
-
1
;
return
pExtDeviceMode
(
NULL
,
HWND_32
(
hwnd
),
lpdmOutput
,
lpszDevice
,
lpszPort
,
lpdmInput
,
lpszProfile
,
fwMode
);
return
DocumentPropertiesA
(
HWND_32
(
hwnd
),
0
,
lpszDevice
,
lpdmOutput
,
lpdmInput
,
fwMode
);
}
/**************************************************************
...
...
@@ -75,8 +60,28 @@ DWORD WINAPI PSDRV_DeviceCapabilities16(LPCSTR lpszDevice,
LPCSTR
lpszPort
,
WORD
fwCapability
,
LPSTR
lpszOutput
,
LPDEVMODEA
lpdm
)
{
if
(
!
load_wineps
()
||
!
pDeviceCapabilities
)
return
0
;
return
pDeviceCapabilities
(
NULL
,
lpszDevice
,
lpszPort
,
fwCapability
,
lpszOutput
,
lpdm
);
int
i
,
ret
;
POINT
*
pt
;
POINT16
*
pt16
;
if
(
fwCapability
!=
DC_PAPERSIZE
||
!
lpszOutput
)
return
DeviceCapabilitiesA
(
lpszDevice
,
lpszPort
,
fwCapability
,
lpszOutput
,
lpdm
);
/* for DC_PAPERSIZE, map POINT to POINT16 */
ret
=
DeviceCapabilitiesA
(
lpszDevice
,
lpszPort
,
DC_PAPERSIZE
,
NULL
,
lpdm
);
if
(
ret
<=
0
)
return
ret
;
pt16
=
(
POINT16
*
)
lpszOutput
;
pt
=
HeapAlloc
(
GetProcessHeap
(),
0
,
ret
*
sizeof
(
POINT
)
);
ret
=
DeviceCapabilitiesA
(
lpszDevice
,
lpszPort
,
DC_PAPERSIZE
,
(
LPSTR
)
pt
,
lpdm
);
for
(
i
=
0
;
i
<
ret
;
i
++
)
{
pt16
[
i
].
x
=
pt
[
i
].
x
;
pt16
[
i
].
y
=
pt
[
i
].
y
;
}
HeapFree
(
GetProcessHeap
(),
0
,
pt
);
return
ret
;
}
/***************************************************************
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment