spoolss: Add DllAllocSplMem and DllFreeSplMem.

oldstable
Detlef Riekenberg 2006-03-30 15:59:17 +02:00 committed by Alexandre Julliard
parent d53ad9c3f7
commit fee66fb15a
2 changed files with 50 additions and 2 deletions

View File

@ -38,8 +38,8 @@
@ stub DeletePrinterDriverW
@ stub DeletePrinterIC
@ stub DeletePrinterKeyW
@ stub DllAllocSplMem
@ stub DllFreeSplMem
@ stdcall DllAllocSplMem(long)
@ stdcall DllFreeSplMem(ptr)
@ stub DllFreeSplStr
@ stub EndDocPrinter
@ stub EndPagePrinter

View File

@ -45,3 +45,51 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
}
return TRUE;
}
/******************************************************************
* DllAllocSplMem [SPOOLSS.@]
*
* Allocate cleared memory from the spooler heap
*
* PARAMS
* size [I] Number of bytes to allocate
*
* RETURNS
* Failure: NULL
* Success: PTR to the allocated memory
*
* NOTES
* We use the process heap (Windows use a separate spooler heap)
*
*/
LPVOID WINAPI DllAllocSplMem(DWORD size)
{
LPVOID res;
res = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size);
TRACE("(%ld) => %p\n", size, res);
return res;
}
/******************************************************************
* DllFreeSplMem [SPOOLSS.@]
*
* Free the allocated spooler memory
*
* PARAMS
* memory [I] PTR to the memory allocated by DllAllocSplMem
*
* RETURNS
* Failure: FALSE
* Success: TRUE
*
* NOTES
* We use the process heap (Windows use a separate spooler heap)
*
*/
BOOL WINAPI DllFreeSplMem(LPBYTE memory)
{
TRACE("(%p)\n", memory);
return HeapFree(GetProcessHeap(), 0, memory);
}