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
f675a783
Commit
f675a783
authored
Jul 12, 2005
by
Huw Davies
Committed by
Alexandre Julliard
Jul 12, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Forward SetJobA -> SetJobW.
parent
2e963b89
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
90 additions
and
2 deletions
+90
-2
info.c
dlls/winspool/info.c
+90
-2
No files found.
dlls/winspool/info.c
View file @
f675a783
...
...
@@ -1734,9 +1734,97 @@ BOOL WINAPI SetPrinterA(HANDLE hPrinter, DWORD Level, LPBYTE pPrinter,
BOOL
WINAPI
SetJobA
(
HANDLE
hPrinter
,
DWORD
JobId
,
DWORD
Level
,
LPBYTE
pJob
,
DWORD
Command
)
{
FIXME
(
"(%p,%ld,%ld,%p,%ld): stub
\n
"
,
hPrinter
,
JobId
,
Level
,
pJob
,
Command
);
BOOL
ret
;
LPBYTE
JobW
;
UNICODE_STRING
usBuffer
;
TRACE
(
"(%p,%ld,%ld,%p,%ld)
\n
"
,
hPrinter
,
JobId
,
Level
,
pJob
,
Command
);
/* JobId, pPrinterName, pMachineName, pDriverName, Size, Submitted, Time and TotalPages
are all ignored by SetJob, so we don't bother copying them */
switch
(
Level
)
{
case
0
:
JobW
=
NULL
;
break
;
case
1
:
{
JOB_INFO_1W
*
info1W
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
info1W
));
JOB_INFO_1A
*
info1A
=
(
JOB_INFO_1A
*
)
pJob
;
JobW
=
(
LPBYTE
)
info1W
;
info1W
->
pUserName
=
asciitounicode
(
&
usBuffer
,
info1A
->
pUserName
);
info1W
->
pDocument
=
asciitounicode
(
&
usBuffer
,
info1A
->
pDocument
);
info1W
->
pDatatype
=
asciitounicode
(
&
usBuffer
,
info1A
->
pDatatype
);
info1W
->
pStatus
=
asciitounicode
(
&
usBuffer
,
info1A
->
pStatus
);
info1W
->
Status
=
info1A
->
Status
;
info1W
->
Priority
=
info1A
->
Priority
;
info1W
->
Position
=
info1A
->
Position
;
info1W
->
PagesPrinted
=
info1A
->
PagesPrinted
;
break
;
}
case
2
:
{
JOB_INFO_2W
*
info2W
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
info2W
));
JOB_INFO_2A
*
info2A
=
(
JOB_INFO_2A
*
)
pJob
;
JobW
=
(
LPBYTE
)
info2W
;
info2W
->
pUserName
=
asciitounicode
(
&
usBuffer
,
info2A
->
pUserName
);
info2W
->
pDocument
=
asciitounicode
(
&
usBuffer
,
info2A
->
pDocument
);
info2W
->
pNotifyName
=
asciitounicode
(
&
usBuffer
,
info2A
->
pNotifyName
);
info2W
->
pDatatype
=
asciitounicode
(
&
usBuffer
,
info2A
->
pDatatype
);
info2W
->
pPrintProcessor
=
asciitounicode
(
&
usBuffer
,
info2A
->
pPrintProcessor
);
info2W
->
pParameters
=
asciitounicode
(
&
usBuffer
,
info2A
->
pParameters
);
info2W
->
pDevMode
=
info2A
->
pDevMode
?
GdiConvertToDevmodeW
(
info2A
->
pDevMode
)
:
NULL
;
info2W
->
pStatus
=
asciitounicode
(
&
usBuffer
,
info2A
->
pStatus
);
info2W
->
pSecurityDescriptor
=
info2A
->
pSecurityDescriptor
;
info2W
->
Status
=
info2A
->
Status
;
info2W
->
Priority
=
info2A
->
Priority
;
info2W
->
Position
=
info2A
->
Position
;
info2W
->
StartTime
=
info2A
->
StartTime
;
info2W
->
UntilTime
=
info2A
->
UntilTime
;
info2W
->
PagesPrinted
=
info2A
->
PagesPrinted
;
break
;
}
case
3
:
JobW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
JOB_INFO_3
));
memcpy
(
JobW
,
pJob
,
sizeof
(
JOB_INFO_3
));
break
;
default:
SetLastError
(
ERROR_INVALID_LEVEL
);
return
FALSE
;
}
ret
=
SetJobW
(
hPrinter
,
JobId
,
Level
,
JobW
,
Command
);
switch
(
Level
)
{
case
1
:
{
JOB_INFO_1W
*
info1W
=
(
JOB_INFO_1W
*
)
JobW
;
HeapFree
(
GetProcessHeap
(),
0
,
info1W
->
pUserName
);
HeapFree
(
GetProcessHeap
(),
0
,
info1W
->
pDocument
);
HeapFree
(
GetProcessHeap
(),
0
,
info1W
->
pDatatype
);
HeapFree
(
GetProcessHeap
(),
0
,
info1W
->
pStatus
);
break
;
}
case
2
:
{
JOB_INFO_2W
*
info2W
=
(
JOB_INFO_2W
*
)
JobW
;
HeapFree
(
GetProcessHeap
(),
0
,
info2W
->
pUserName
);
HeapFree
(
GetProcessHeap
(),
0
,
info2W
->
pDocument
);
HeapFree
(
GetProcessHeap
(),
0
,
info2W
->
pNotifyName
);
HeapFree
(
GetProcessHeap
(),
0
,
info2W
->
pDatatype
);
HeapFree
(
GetProcessHeap
(),
0
,
info2W
->
pPrintProcessor
);
HeapFree
(
GetProcessHeap
(),
0
,
info2W
->
pParameters
);
HeapFree
(
GetProcessHeap
(),
0
,
info2W
->
pDevMode
);
HeapFree
(
GetProcessHeap
(),
0
,
info2W
->
pStatus
);
break
;
}
}
HeapFree
(
GetProcessHeap
(),
0
,
JobW
);
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