<div class="content"><p> </p><p>A <span><a href="102555d1-0dbf-4b2e-b78c-e388823d252c#gt_60e0e1fa-66fe-41e1-b5e3-ceab97e53506" data-linktype="relative-path">client</a></span> calls the
R_QMCreateObjectInternal method to create a new <span><a href="102555d1-0dbf-4b2e-b78c-e388823d252c#gt_1a7f2b81-359e-4d2f-b4b4-f30bc7dd0d8f" data-linktype="relative-path">private queue</a></span>
located on the <span><a href="102555d1-0dbf-4b2e-b78c-e388823d252c#gt_2739ef12-a749-4540-9ac3-715968ef4df4" data-linktype="relative-path">supporting server</a></span>.</p><dl>
<dd>
<div><pre> HRESULT R_QMCreateObjectInternal(
   [in] handle_t hBind,
   [in] DWORD dwObjectType,
   [in, string] const WCHAR* lpwcsPathName,
   [in, range(0, 524288)] DWORD SDSize,
   [in, unique, size_is(SDSize)] unsigned char* pSecurityDescriptor,
   [in, range(1, 128)] DWORD cp,
   [in, size_is(cp)] DWORD aProp[],
   [in, size_is(cp)] PROPVARIANT apVar[]
 );
</pre></div>
</dd></dl><p><b>hBind: </b> MUST be set to an <span><a href="102555d1-0dbf-4b2e-b78c-e388823d252c#gt_8a7f6700-8311-45bc-af10-82e10accd331" data-linktype="relative-path">RPC</a></span>
binding handle as described in <span><a href="../ms-rpce/290c38b1-92fe-4229-91e6-4fc376610c15" data-linktype="relative-path">[MS-RPCE]</a></span>
section <span><a href="../ms-rpce/a01f5886-c485-4bcf-bb23-e0d755510ab7" data-linktype="relative-path">2</a></span>.</p><p><b>dwObjectType: </b> MUST be 0x00000001 in order to
specify a <span><a href="102555d1-0dbf-4b2e-b78c-e388823d252c#gt_c1a6400d-703b-4f9a-a74c-40f1487978d9" data-linktype="relative-path">queue</a></span>.</p><p><b>lpwcsPathName: </b> MUST be a pointer to a
null-terminated string containing a <span><a href="102555d1-0dbf-4b2e-b78c-e388823d252c#gt_78c4af57-f564-4aa9-a40d-f54ea6bd8766" data-linktype="relative-path">path name</a></span> for the
queue to be created. The path name MUST identify a private queue local to the
supporting server by including &#34;.&#34; as the computer name or by using
the supporting server computer name.</p><p><b>SDSize: </b> MUST be set to the byte length of the
<span><a href="../ms-dtyp/7d4dac05-9cef-4563-a058-f108abecce1d" data-linktype="relative-path">SECURITY_DESCRIPTOR</a></span>
buffer pointed to by <i>pSecurityDescriptor</i>. If <i>pSecurityDescriptor</i>
is NULL, this parameter MUST be 0x00000000.</p><p><b>pSecurityDescriptor: </b> Must be a pointer to an
array of bytes containing a <b>SECURITY_DESCRIPTOR</b> structure. The <b>SECURITY_DESCRIPTOR</b>
specifies the initial security configuration for the queue to be created. This
value can be NULL, in which case the <span><a href="102555d1-0dbf-4b2e-b78c-e388823d252c#gt_434b0234-e970-4e8c-bdfa-e16a30d96703" data-linktype="relative-path">server</a></span> MUST provide
a default security configuration for the new queue. The <b>SECURITY_DESCRIPTOR</b>
structure is defined in <span><a href="../ms-dtyp/cca27429-5689-4a16-b2b4-9325d93e4ba2" data-linktype="relative-path">[MS-DTYP]</a></span>
section 2.4.6.</p><p><b>cp: </b> MUST be set to the size (in elements) of
the arrays <i>aProp</i> and <i>apVar</i>. The arrays <i>aProp</i> and <i>apVar</i>
MUST have an identical number of elements and MUST contain at least one
element.</p><p><b>aProp: </b> MUST be an array of <span><a href="102555d1-0dbf-4b2e-b78c-e388823d252c#gt_1eb17224-1b51-44ab-9bc3-7ad17ba87517" data-linktype="relative-path">queue
property</a></span> identifiers that, together with the <i>apVar</i> array,
specify the initial queue property values for the new queue. Each element MUST
specify a value from the queue property identifiers table defined in <span><a href="../ms-mqmq/b7cc2590-a617-45df-b6a3-1f31102b36fb" data-linktype="relative-path">[MS-MQMQ]</a></span>
section <span><a href="../ms-mqmq/9d5bf18a-5c7d-4df0-9e92-014ac661ae8a" data-linktype="relative-path">2.3.1</a></span>.
Each element MUST specify the property identifier for the corresponding
property value at the same element index in <i>apVar</i> and MUST contain at least
one element. Each element MUST contain a queue property identifier; identifiers
for other properties are not permitted.</p><dl>
<dd>
<p>If the queue identified by <i>lpwcsPathName</i>
already exists, the server MUST NOT alter the existing queue.</p>
</dd></dl><p><b>apVar: </b> MUST be an array that specifies the
property values to associate with the new queue. Each element MUST specify the
property value for the corresponding property identifier at the same element
index in <i>aProp</i> and MUST contain at least one element.</p><p><b>Return Values: </b> On success, this method MUST return
MQ_OK (0x00000000); otherwise, the server MUST return a failure <span><a href="../ms-dtyp/a9046ed2-bfb2-4d56-a719-2824afce59ac" data-linktype="relative-path">HRESULT</a></span>.<a id="Appendix_A_Target_30"></a><a aria-label="Product behavior note 30" href="3d105257-668f-4768-83fe-344c8405a5a5#Appendix_A_30" data-linktype="relative-path">&lt;30&gt;</a><a id="Appendix_A_Target_31"></a><a aria-label="Product behavior note 31" href="3d105257-668f-4768-83fe-344c8405a5a5#Appendix_A_31" data-linktype="relative-path">&lt;31&gt;</a> If the
returned HRESULT value is MQ_ERROR_QUEUE_EXISTS (0xc00e0005), the client can
treat it as a success and continue with other operations. The client MUST treat
all other failure HRESULTs identically.</p><p>Exceptions Thrown: No exceptions are thrown beyond those
thrown by the underlying RPC protocol, as specified in [MS-RPCE].</p><p>This method is invoked at the dynamically assigned <span><a href="102555d1-0dbf-4b2e-b78c-e388823d252c#gt_b91c1e27-e8e0-499b-8c65-738006af72ee" data-linktype="relative-path">endpoint</a></span>
returned by the <span><a href="a8c96155-a7e6-41cb-95c7-6ab7e4f8214d" data-linktype="relative-path">R_QMGetRTQMServerPort</a></span>
method when IP_HANDSHAKE (0x00000000) or IPX_HANDSHAKE (0x00000002) is the
interface specified by the <i>fIP</i> parameter.</p><p>When processing this call, the server MUST:</p><ul><li><p><span><span> 
</span></span>Determine if input parameter values violate the constraints
specified above. If an invalid parameter is detected, the server MUST take no
further action and return a failure HRESULT other than MQ_ERROR_QUEUE_EXISTS
(0xc00e0005).</p>
</li><li><p><span><span> 
</span></span>Locate a <b>Queue</b> (<span><a href="../ms-mqdmpr/5eafe0a6-a22f-436b-a0d9-4cbc25c52b47" data-linktype="relative-path">[MS-MQDMPR]</a></span>
section <span><a href="../ms-mqdmpr/2e026a09-999e-478f-8c4c-5344b661e579" data-linktype="relative-path">3.1.1.2</a></span>)
ADM element instance in the <b>QueueCollection</b> attribute of the server&#39;s <b>LocalQueueManager</b>
([MS-MQDMPR] section <span><a href="28d7b06f-debc-45c6-b235-fa5029b10178" data-linktype="relative-path">3.1.1</a></span>) ADM element
instance where the value of the <b>Pathname</b> attribute of the <b>Queue</b>
ADM element instance matches the <i>lpwcsPathName</i> parameter.</p>
</li><li><p><span><span> 
</span></span>If found, take no further action, and return
MQ_ERROR_QUEUE_EXISTS (0xc00e0005).</p>
</li><li><p><span><span> 
</span></span>Let <i>newQueue</i> be a new <b>Queue</b> ADM element instance.</p>
</li><li><p><span><span> 
</span></span>Generate a <span><a href="../ms-mqdmpr/2563fa7c-191e-4ee5-a9b2-38b3b2c2dd30" data-linktype="relative-path">Set Queue
Defaults</a></span> ([MS-MQDMPR] section 3.1.7.1.33) event with the following
argument value:</p>
<ul><li><p><span><span>  </span></span><i>iQueue</i>
:= <i>newQueue</i></p>
</li></ul></li><li><p><span><span> 
</span></span>Set <i>newQueue</i>.<b>Pathname</b> to <i>lpwcsPathName</i>.</p>
</li><li><p><span><span> 
</span></span>Set <i>newQueue</i>.<b>Security</b> to the value contained in the
<i>pSecurityDescriptor</i> parameter.</p>
</li><li><p><span><span> 
</span></span>Initialize the remaining attribute values of <i>newQueue</i>
using the <i>aProp</i> parameter and the <i>apVar</i> parameter property arrays
described preceding. The queue property identifiers and their relationships to
the <b>Queue</b> ADM element are specified in section <span><a href="c8f396b4-83a8-4547-ae25-12171a66b9c7" data-linktype="relative-path">3.1.1.12</a></span>.</p>
</li><li><p><span><span> 
</span></span>Generate a <span><a href="../ms-mqdmpr/117b91a6-d5b8-4667-9c3d-e38e1d48bcb2" data-linktype="relative-path">Create
Queue</a></span> ([MS-MQDMPR] section 3.1.7.1.3) event with the following
argument value:</p>
<ul><li><p><span><span>  </span></span><i>iQueue</i>
:= <i>newQueue</i></p>
</li></ul></li><li><p><span><span> 
</span></span>Return the <i>rStatus</i> of the Create Queue event.</p>
</li></ul></div>