Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
1724de48
Commit
1724de48
authored
Nov 16, 2022
by
Piotr Caban
Committed by
Alexandre Julliard
Nov 16, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winspool: Use GetJobW in GetJobA implementation.
parent
3a8b51d6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
3 deletions
+58
-3
info.c
dlls/winspool.drv/info.c
+58
-3
No files found.
dlls/winspool.drv/info.c
View file @
1724de48
...
...
@@ -7725,14 +7725,69 @@ end:
return
ret
;
}
static
inline
const
DWORD
*
job_string_info
(
DWORD
level
)
{
static
const
DWORD
info_1
[]
=
{
sizeof
(
JOB_INFO_1W
),
FIELD_OFFSET
(
JOB_INFO_1W
,
pPrinterName
),
FIELD_OFFSET
(
JOB_INFO_1W
,
pMachineName
),
FIELD_OFFSET
(
JOB_INFO_1W
,
pUserName
),
FIELD_OFFSET
(
JOB_INFO_1W
,
pDocument
),
FIELD_OFFSET
(
JOB_INFO_1W
,
pDatatype
),
FIELD_OFFSET
(
JOB_INFO_1W
,
pStatus
),
~
0u
};
static
const
DWORD
info_2
[]
=
{
sizeof
(
JOB_INFO_2W
),
FIELD_OFFSET
(
JOB_INFO_2W
,
pPrinterName
),
FIELD_OFFSET
(
JOB_INFO_2W
,
pMachineName
),
FIELD_OFFSET
(
JOB_INFO_2W
,
pUserName
),
FIELD_OFFSET
(
JOB_INFO_2W
,
pDocument
),
FIELD_OFFSET
(
JOB_INFO_2W
,
pNotifyName
),
FIELD_OFFSET
(
JOB_INFO_2W
,
pDatatype
),
FIELD_OFFSET
(
JOB_INFO_2W
,
pPrintProcessor
),
FIELD_OFFSET
(
JOB_INFO_2W
,
pParameters
),
FIELD_OFFSET
(
JOB_INFO_2W
,
pDriverName
),
FIELD_OFFSET
(
JOB_INFO_2W
,
pStatus
),
~
0u
};
static
const
DWORD
info_3
[]
=
{
sizeof
(
JOB_INFO_3
),
~
0u
};
switch
(
level
)
{
case
1
:
return
info_1
;
case
2
:
return
info_2
;
case
3
:
return
info_3
;
}
SetLastError
(
ERROR_INVALID_LEVEL
);
return
NULL
;
}
/*****************************************************************************
* GetJobA [WINSPOOL.@]
*
*/
BOOL
WINAPI
GetJobA
(
HANDLE
hPrinter
,
DWORD
JobId
,
DWORD
Level
,
LPBYTE
pJob
,
DWORD
cbBuf
,
LPDWORD
pcbN
eeded
)
BOOL
WINAPI
GetJobA
(
HANDLE
printer
,
DWORD
job_id
,
DWORD
level
,
BYTE
*
data
,
DWORD
size
,
DWORD
*
n
eeded
)
{
return
get_job_info
(
hPrinter
,
JobId
,
Level
,
pJob
,
cbBuf
,
pcbNeeded
,
FALSE
);
const
DWORD
*
string_info
=
job_string_info
(
level
);
if
(
!
string_info
)
return
FALSE
;
if
(
!
GetJobW
(
printer
,
job_id
,
level
,
data
,
size
,
needed
))
return
FALSE
;
packed_struct_WtoA
(
data
,
string_info
);
if
(
level
==
2
)
DEVMODEWtoA
(((
JOB_INFO_2W
*
)
data
)
->
pDevMode
,
((
JOB_INFO_2A
*
)
data
)
->
pDevMode
);
return
TRUE
;
}
/*****************************************************************************
...
...
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