<div class="content" name="RpcCreatePrinterIC" uuid="b0686ba2-3a6b-4a6c-943f-b26600dbd88c"><p>RpcCreatePrinterIC is called by the <span><a href="831cd729-be7c-451e-b729-bd8d84ce4d24#gt_6c550e84-9a9c-46ef-8716-7260fe29cae3" data-linktype="relative-path">Graphics
Device Interface (GDI)</a></span> to create an <span><a href="831cd729-be7c-451e-b729-bd8d84ce4d24#gt_e6193b0f-37ad-4f30-978b-0e1e1291f674" data-linktype="relative-path">information context</a></span>
for a specified printer.</p><dl>
<dd>
<div><pre> DWORD RpcCreatePrinterIC(
   [in] PRINTER_HANDLE hPrinter,
   [out] GDI_HANDLE* pHandle,
   [in] DEVMODE_CONTAINER* pDevModeContainer
 );
</pre></div>
</dd></dl><p><b>hPrinter: </b>A handle to a printer object
(section <span><a href="9c5d49b8-6920-47b0-9466-87ba910e6071" data-linktype="relative-path">2.2.1.1.4</a></span>) that was
opened by <span><a href="bd0bb8d5-26fd-4705-81f5-614d32b9f38f" data-linktype="relative-path">RpcAddPrinter (section 3.1.4.2.3)</a></span>,
<span><a href="3af45717-308f-4b4f-8428-430d12856110" data-linktype="relative-path">RpcAddPrinterEx (section 3.1.4.2.15)</a></span>,
<span><a href="989357e2-446e-4872-bb38-1dce21e1313f" data-linktype="relative-path">RpcOpenPrinter (section 3.1.4.2.2)</a></span>,
or <span><a href="0e81ce18-72b1-46c3-8584-a205393b04ff" data-linktype="relative-path">RpcOpenPrinterEx (section 3.1.4.2.14)</a></span>.</p><p><b>pHandle: </b>A pointer to a printer information
context handle (section <span><a href="ec9126fa-bc33-423f-adfc-1bf52bd7890e" data-linktype="relative-path">2.2.1.1.2</a></span>).</p><p><b>pDevModeContainer: </b>A parameter specified in <span><a href="bf31abc0-da86-4ac6-8ebc-8be665e11503" data-linktype="relative-path">DEVMODE_CONTAINER
Parameters (section 3.1.4.1.8.1)</a></span>.</p><p><b>Return Values: </b>This method MUST return zero
(ERROR_SUCCESS) to indicate successful completion or a nonzero Windows error
code to indicate failure <span><a href="../ms-erref/1bc92ddf-b79e-413c-bbaa-99a5281a6c90" data-linktype="relative-path">[MS-ERREF]</a></span>.</p><p>Upon receiving this message, the server MUST validate
parameters as follows:</p><ul><li><p><span><span> 
</span></span>Perform the validation steps specified in <span><a href="10bfa8c2-d456-4ad0-912d-e674766a36c8" data-linktype="relative-path">PRINTER_HANDLE
Parameters (section 3.1.4.1.11)</a></span>. This method SHOULD assume
that the handle to the printer object can be used without further access
checks.</p>
</li><li><p><span><span> 
</span></span>Perform the validation steps specified in DEVMODE_CONTAINER
Parameters.</p>
</li></ul><p>If parameter validation fails, the server MUST fail the
operation immediately and return a nonzero error response to the client.
Otherwise, the server MUST process the message and compose a response to the
client as follows:</p><ul><li><p><span><span> 
</span></span>Perform implementation-specific steps to create the appropriate
printer information context.</p>
</li><li><p><span><span> 
</span></span>Store an <span><a href="831cd729-be7c-451e-b729-bd8d84ce4d24#gt_9dfe84e3-a772-4ad1-9a25-1255c1dc0f84" data-linktype="relative-path">RPC context handle</a></span>
associated with the information context in <i>pHandle</i>.</p>
</li><li><p><span><span> 
</span></span>Return the status of the operation.</p>
</li></ul><p>Except for diagnostic purposes, the server state, as visible
to the client through this or any other protocol, MUST NOT change as a result
of processing this call.</p></div>