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
0e57af88
Commit
0e57af88
authored
Nov 28, 2006
by
Detlef Riekenberg
Committed by
Alexandre Julliard
Nov 28, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
spoolss: Implement AllocSplStr + DllFreeSplStr.
parent
8e8e8f07
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
2 deletions
+51
-2
spoolss.spec
dlls/spoolss/spoolss.spec
+2
-2
spoolss_main.c
dlls/spoolss/spoolss_main.c
+49
-0
No files found.
dlls/spoolss/spoolss.spec
View file @
0e57af88
...
...
@@ -12,7 +12,7 @@
@ stub AddPrinterDriverW
@ stub AddPrinterExW
@ stub AddPrinterW
@ st
ub AllocSplStr
@ st
dcall AllocSplStr(wstr)
@ stub AppendPrinterNotifyInfoData
@ stub BuildOtherNamesFromMachineName
@ stub CallDrvDevModeConversion
...
...
@@ -40,7 +40,7 @@
@ stub DeletePrinterKeyW
@ stdcall DllAllocSplMem(long)
@ stdcall DllFreeSplMem(ptr)
@ st
ub DllFreeSplStr
@ st
dcall DllFreeSplStr(wstr)
@ stub EndDocPrinter
@ stub EndPagePrinter
@ stub EnumFormsW
...
...
dlls/spoolss/spoolss_main.c
View file @
0e57af88
...
...
@@ -47,6 +47,35 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
}
/******************************************************************
* AllocSplStr [SPOOLSS.@]
*
* Create a copy from the String on the Spooler-Heap
*
* PARAMS
* pwstr [I] PTR to the String to copy
*
* RETURNS
* Failure: NULL
* Success: PTR to the copied String
*
*/
LPWSTR
WINAPI
AllocSplStr
(
LPCWSTR
pwstr
)
{
LPWSTR
res
=
NULL
;
DWORD
len
;
TRACE
(
"(%s)
\n
"
,
debugstr_w
(
pwstr
));
if
(
!
pwstr
)
return
NULL
;
len
=
(
lstrlenW
(
pwstr
)
+
1
)
*
sizeof
(
WCHAR
);
res
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
if
(
res
)
lstrcpyW
(
res
,
pwstr
);
TRACE
(
"returning %p
\n
"
,
res
);
return
res
;
}
/******************************************************************
* DllAllocSplMem [SPOOLSS.@]
*
* Allocate cleared memory from the spooler heap
...
...
@@ -93,3 +122,23 @@ BOOL WINAPI DllFreeSplMem(LPBYTE memory)
TRACE
(
"(%p)
\n
"
,
memory
);
return
HeapFree
(
GetProcessHeap
(),
0
,
memory
);
}
/******************************************************************
* DllFreeSplStr [SPOOLSS.@]
*
* Free the allocated Spooler-String
*
* PARAMS
* pwstr [I] PTR to the WSTR, allocated by AllocSplStr
*
* RETURNS
* Failure: FALSE
* Success: TRUE
*
*/
BOOL
WINAPI
DllFreeSplStr
(
LPWSTR
pwstr
)
{
TRACE
(
"(%s) PTR: %p
\n
"
,
debugstr_w
(
pwstr
),
pwstr
);
return
HeapFree
(
GetProcessHeap
(),
0
,
pwstr
);
}
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