<div class="content"><p>The <b>RasRpcSubmitRequest</b> method retrieves or sets the
configuration data on RRAS server.</p><dl>
<dd>
<div><pre> DWORD RasRpcSubmitRequest(
   [in] handle_t h,
   [in, out, unique, size_is(dwcbBufSize)] 
     PBYTE pReqBuffer,
   [in] DWORD dwcbBufSize
 );
</pre></div>
</dd></dl><p><b>hServer: </b>An RPC binding handle as specified in
<a href="https://go.microsoft.com/fwlink/?LinkId=89824" data-linktype="external">[C706]</a> section 2.</p><p><b>pReqBuffer: </b>A pointer to a buffer of size <i>dwcbBufSize</i>.
The buffer MUST be large enough to hold the <b>RequestBuffer</b> structure
(section <a href="d72dc078-e797-4e1e-a7c7-51bb20bcaa99" data-linktype="relative-path">2.2.1.2.217</a>)
and <b>RequestBuffer.RB_Buffer</b> data. <b>RequestBuffer.RB_Reqtype</b>
specifies the request type which will be processed by the server and <b>RequestBuffer.RB_Buffer</b>
specifies the structure specific to <b>RB_Reqtype</b> to be processed. The
structure that MUST be used for each <a href="fcb89c61-ced3-43ba-a2ef-4c6f4a2d40a6" data-linktype="relative-path">ReqTypes</a> value is
explained in section 2.2.1.2.217. The client MUST NOT send the <b>ReqType</b>
other than those defined in <b>ReqTypes</b> (section 2.2.1.1.18). <b>RequestBuffer.RB_PCBIndex</b>
MUST be set to the unique port identifier whose information is sought for
ReqTypes <b>REQTYPE_GETINFO</b> and <b>REQTYPE_GETDEVCONFIG</b>. For other
valid ReqTypes, <b>RequestBuffer.RB_PCBIndex</b> MUST be set to zero (0).</p><p><b>dwcbBufSize: </b>Size in byte of <i>pReqBuffer</i>.</p><p><b>Return Values: </b>Specifies the return status as
explained in section <a href="c39d153e-2f97-4e11-8aff-bcf983869dc9" data-linktype="relative-path">2.2.1.2.218</a>
for <b>retcode</b> field.</p><p><b>Exceptions Thrown:</b> This method throws an exception
with the exception code RPC_S_ACCESS_DENIED (0x00000005) if the client is not
an administrator on the RRASM server, with access permission to perform the
operation.<a id="Appendix_A_Target_340"></a><a aria-label="Product behavior note 340" href="3bb906f0-b077-47ab-ad11-d8d807afde26#Appendix_A_340" data-linktype="relative-path">&lt;340&gt;</a></p><p>Validations which SHOULD be done by the RRASM for all
ReqTypes are:</p><ul><li><p><span><span> 
</span></span>Return ERROR_SUCCESS (0x00000000) if one of the following
conditions are met without any further processing of the call:</p>
<ul><li><p><span><span>  </span></span><b>dwcbBufSize</b>
is less than the sum of size of <b>RequestBuffer</b> and 5000, i.e. if the
condition (<b>dwcbBufSize</b> &lt; size of <b>RequestBuffer</b> + 5000) is
TRUE.</p>
</li><li><p><span><span>  </span></span><b>pReqBuffer</b>
is NULL</p>
</li><li><p><span><span>  </span></span><b>pReqBuffer.RB_ReqType</b>
is less than zero (0) or greater than maximum ReqTypes<a id="Appendix_A_Target_341"></a><a aria-label="Product behavior note 341" href="3bb906f0-b077-47ab-ad11-d8d807afde26#Appendix_A_341" data-linktype="relative-path">&lt;341&gt;</a></p>
</li></ul></li><li><p><span><span> 
</span></span>Validate as specified in section <a href="83a083ac-cd43-44bf-a301-7c88e64a32fe" data-linktype="relative-path">3.3.4</a> whether this method
was called by a client that is an <a href="fc2dfae9-0d04-4e1d-97c9-c51c2dc06c3b#gt_eb335f5b-619b-46ed-9138-06e9910108c3" data-linktype="relative-path">administrator</a> of the <a href="fc2dfae9-0d04-4e1d-97c9-c51c2dc06c3b#gt_f91f3fc7-d1a1-4a07-8c92-d19eb0c9acb0" data-linktype="relative-path">RRASM server</a>.</p>
</li></ul><p>Specific RRASM behavior for each ReqTypes value follows.</p><p><b>REQTYPE_GETDEVICECONFIGINFO:</b></p><p>When processing this request, the RRASM SHOULD do the
following:</p><ul><li><p><span><span> 
</span></span>The <i>dwcbBufSize</i> that is passed in SHOULD be greater than
or equal to the sum of the size of <b>RequestBuffer </b>(section
2.2.1.2.217) with the <b>RB_Buffer</b> field specifying the <b>DeviceConfigInfo </b>(section
2.2.1.2.218) structure, and the size of <b>DeviceConfigInfo.cbBuffer</b>. If
this is not the case, RRASM MUST return the ERROR_SUCCESS (0x00000000) setting <b>DeviceConfigInfo.retcode</b>
to E_INVALIDARG (0x80070057). </p>
</li><li><p><span><span> 
</span></span>If <b>DeviceConfigInfo.dwVersion</b> is not set to the version of
Rasrpc Server<a id="Appendix_A_Target_342"></a><a aria-label="Product behavior note 342" href="3bb906f0-b077-47ab-ad11-d8d807afde26#Appendix_A_342" data-linktype="relative-path">&lt;342&gt;</a>, RRASM MUST return
ERROR_SUCCESS (0x00000000) setting <b>DeviceConfigInfo.retcode</b> to
ERROR_NOT_SUPPORTED (0x00000032).</p>
</li><li><p><span><span> 
</span></span>Call the abstract interface <b>Invoke RASRPC</b> specifying the
method and the parameters necessary to enable RRAS server to perform the
required management task.</p>
</li><li><p><span><span> 
</span></span>MUST set the <b>cEntries</b> to the number of devices returned by
the RRAS.</p>
</li><li><p><span><span> 
</span></span>MUST check the passed in <b>cbBuffer</b> size, and copy the
device information details (<b>RAS_DEVICE_INFO </b>(section <a href="9909200a-64ab-4a38-aee3-6ae3425a564a" data-linktype="relative-path">2.2.1.2.219</a>)) for the
devices that fit in the <b>cbBuffer</b> size to <b>abdata</b> buffer. </p>
</li><li><p><span><span> 
</span></span><b>cbBuffer</b> MUST be set to the total size in bytes needed to
hold all the device information. It MUST be set to the value of <b>cEntries</b>
multiplied by the size of <b>RAS_DEVICE_INFO</b>. </p>
</li><li><p><span><span> 
</span></span><b>dwVersion</b> MUST be set to the version of the Rasrpc server.</p>
</li><li><p><span><span> 
</span></span>If there is no error, ERROR_SUCCESS (0x00000000) MUST be returned
setting <b>DeviceConfigInfo.retcode</b> to ERROR_SUCCESS (0x00000000).</p>
</li></ul><p><b>REQTYPE_SETDEVICECONFIGINFO:</b></p><p>When processing this request, the RRASM MUST do the
following:</p><ul><li><p><span><span> 
</span></span>The <i>dwcbBufSize</i> that is passed in SHOULD be greater than
or equal to the sum of the size of <b>RequestBuffer </b>(section
2.2.1.2.217) with the <b>RB_Buffer</b> field specifying the <b>DeviceConfigInfo </b>(section
2.2.1.2.218) structure, and the size of <b>DeviceConfigInfo.cbBuffer</b>. The <i>dwcbBufSize</i>
passed in SHOULD be equal to or greater than sum of the size of <b>RequestBuffer</b>,
size of <b>DeviceConfigInfo</b> and <b>DeviceConfigInfo.cbBuffer</b>. If not,
then ERROR_SUCCESS (0x00000000) MUST be returned setting <b>DeviceConfigInfo.retcode</b>
to E_INVALIDARG (0x80070057). </p>
</li><li><p><span><span> 
</span></span>The <b>DeviceConfigInfo.cbBuffer</b> SHOULD be greater than or
equal to size of all the device information (<b>RAS_DEVICE_INFO</b>) as
specified in <b>DeviceConfigInfo.cEntries</b>. If not, RRASM MUST return
ERROR_SUCCESS (0x00000000) and also set <b>DeviceConfigInfo.retcode</b> to
ERROR_INVALID_PARAMETER (0x00000057). </p>
</li><li><p><span><span> 
</span></span>Call the abstract interface <b>Invoke RASRPC</b> method
specifying the operation and the parameters to enable RRAS server to perform
the required management task.</p>
</li><li><p><span><span> 
</span></span>If the RRAS implementation does not have any of the devices, <b>RAS_DEVICE_INFO.dwError</b>
for that device MUST be set to ERROR_DEVICE_DOES_NOT_EXIST (0x00000260).</p>
</li><li><p><span><span> 
</span></span>If <b>RAS_DEVICE_INFO.fWrite</b> is set and the RRAS
implementation could not succeed in storing the device information, then <b>DeviceConfigInfo.retcode</b>
MUST be set to ERROR_CAN_NOT_COMPLETE (0x000003EB).</p>
</li><li><p><span><span> 
</span></span>If <b>RAS_DEVICE_INFO.dwNumEndPoints</b> or <b>RAS_DEVICE_INFO.dwMaxWanEndPoints</b>
is more than the maximum supported value for the WAN endpoint on the RRAS
server, it MUST be set to the maximum supported value.</p>
</li><li><p><span><span> 
</span></span>If the RRAS server returns no error status, ERROR_SUCCESS
(0x00000000) MUST be returned setting <b>DeviceConfigInfo.retcode</b> to
ERROR_SUCCESS. Otherwise return the error status returned by the RRAS server in
<b>DeviceConfigInfo.retcode</b>.</p>
</li></ul><p><b>REQTYPE_GETINFO:</b></p><p>When processing this request, the RRASM SHOULD do the
following:</p><ul><li><p><span><span> 
</span></span>The <i>dwcbBufSize</i> that is passed in SHOULD be greater than
or equal to the size of <b>RequestBuffer </b>(section 2.2.1.2.217) with
the <b>RB_Buffer</b> field specifying the size of the <a href="2a475b52-78cc-45bf-915d-b5c6355d82fa" data-linktype="relative-path"><b>Info</b></a> structure. If
not, RRASM MUST return ERROR_SUCCESS (0x00000000) setting <b>Info.retcode</b>
to E_INVALIDARG (0x80070057). </p>
</li><li><p><span><span> 
</span></span>Since the RRASM server does not manage the list of valid port
identifiers, the RRAS implementation SHOULD check if the <b>RequestBuffer.RB_PCBIndex</b>
refers to a valid port identifier. If the port identifier is not valid, RRASM
MUST return ERROR_SUCCESS (0x00000000) and also set <b>Info.retcode</b> to
ERROR_PORT_NOT_FOUND (0x00000267).</p>
</li><li><p><span><span> 
</span></span>Call the abstract interface <b>Invoke RASRPC</b> method
specifying the operation and the parameters to enable RRAS server to perform
the required management task.</p>
</li><li><p><span><span> 
</span></span>SHOULD<a id="Appendix_A_Target_343"></a><a aria-label="Product behavior note 343" href="3bb906f0-b077-47ab-ad11-d8d807afde26#Appendix_A_343" data-linktype="relative-path">&lt;343&gt;</a>
validate if the passed in <b>RequestBuffer.RB_Dummy</b> is equal to the size of
<a href="../ms-dtyp/21eec394-630d-49ed-8b4a-ab74a1614611" data-linktype="relative-path">ULONG_PTR</a>
on the server. If it is not equal and passed in <b>RequestBuffer.RB_Dummy</b>
is equal to the size of <a href="../ms-dtyp/262627d8-3418-4627-9218-4ffe110850b2" data-linktype="relative-path">DWORD</a>,
the RRASM server MUST <a href="fc2dfae9-0d04-4e1d-97c9-c51c2dc06c3b#gt_37e89d91-2800-49d1-9d17-45ebe167ad87" data-linktype="relative-path">marshal</a>
the <b>RASMAN_INFO.RI_ConnectionHandle</b> from <a href="../ms-dtyp/929187f0-f25c-4b05-9497-16b066d8a912" data-linktype="relative-path">HANDLE</a>
to <a href="../ms-dtyp/32862b84-f6e6-40f9-85ca-c4faf985b822" data-linktype="relative-path">ULONG</a>.</p>
</li><li><p><span><span> 
</span></span>If the RRAS server successfully processes the request, the RRASM
server MUST populate the <b>RequestBuffer.RB_Buffer</b> (Info) structure with
the port information provided by RRAS server and return ERROR_SUCCESS
(0x00000000).</p>
</li></ul><p><b>REQTYPE_GETCALLEDID:</b></p><p>When processing this request, the RRASM MUST do the
following:</p><ul><li><p><span><span> 
</span></span>The <i>dwcbBufSize</i> that is passed in SHOULD be greater than
or equal to the sum of the size of <b>RequestBuffer (section 2.2.1.2.217)</b>
with the <b>RB_Buffer</b> field specifying the <a href="029d774a-7fd0-4a7f-b27d-6dff88400b26" data-linktype="relative-path"><b>GetSetCalledId (section 2.2.1.2.220)</b></a>
structure, and the size of <b>GetSetCalledId.rciInfo.dwSize</b>. If not, RRASM
MUST return ERROR_SUCCESS (0x00000000) and also set <b>GetSetCalledId.retcode</b>
to E_INVALIDARG (0x80070057). </p>
</li><li><p><span><span> 
</span></span>Call the abstract interface <b>Invoke RASRPC</b> method
specifying the operation and the parameters to enable RRAS server to perform
the required management task.</p>
</li><li><p><span><span> 
</span></span> <b>GetSetCalledId.dwSize</b> SHOULD be equal to or greater than
the sum of the size of <a href="f765d6a6-12a7-454a-a6cb-27c13fcb9e11" data-linktype="relative-path"><b>RAS_CALLEDID_INFO (section 2.2.1.2.221)</b></a>
and the size of CalledId buffer to be returned. If so, fill the <b>GetSetCalledId.rciInfo</b>
buffer with the CalledId details returned by the RRAS server. Otherwise <b>GetSetCalledId.rciInfo</b>
buffer is not filled with the CalledId details. </p>
</li><li><p><span><span> 
</span></span>MUST set the <b>GetSetCalledId.dwSize</b> to the sum of the size
of <b>RAS_CALLEDID_INFO</b> and the size of CalledId buffer to be returned and
return ERROR_SUCCESS (0x00000000). </p>
</li></ul><p><b>REQTYPE_SETCALLEDID:</b></p><p>When processing this request, the RRASM MUST do the
following:</p><ul><li><p><span><span> 
</span></span>The <i>dwcbBufSize</i> that is passed in SHOULD be greater than
or equal to the sum of the size of <b>RequestBuffer (section 2.2.1.2.217)</b>
with the <b>RB_Buffer</b> field specifying the <b>GetSetCalledId</b> structure,
and the size of <b>GetSetCalledId.rciInfo.dwSize</b>. If not, RRASM MUST return
ERROR_SUCCESS (0x00000000) setting <b>GetSetCalledId.retcode</b> to
E_INVALIDARG (0x80070057). </p>
</li><li><p><span><span> 
</span></span>Call the abstract interface <b>Invoke RASRPC</b> method
specifying the operation and the parameters to enable RRAS server to perform
the required management task.</p>
</li><li><p><span><span> 
</span></span>If all validation is successful, the RRAS server MUST store the <b>GetSetCalledId.rciInfo</b>
buffer that contains <b>CalledId</b> details.</p>
</li><li><p><span><span> 
</span></span>Return any error the RRAS server returns while processing the
request. Otherwise return ERROR_SUCCESS (0x00000000).</p>
</li></ul><p><b>REQTYPE_PORTENUM:</b></p><p>When processing this request, the RRASM MUST do the following:</p><ul><li><p><span><span> 
</span></span>The <i>dwcbBufSize</i> that is passed in SHOULD be greater than
or equal to the sum of the size of the <b>RequestBuffer</b> structure
specifying the <a href="7a190095-587e-4edf-be3f-95d326e34d19" data-linktype="relative-path"><b>Enum (section 2.2.1.2.225)</b></a>
structure, and <b>Enum.size</b>. If not, RRASM MUST return ERROR_SUCCESS
(0x00000000) setting <b>Enum.retcode</b> to E_INVALIDARG (0x80070057). </p>
</li><li><p><span><span> 
</span></span>Call the abstract interface <b>Invoke RASRPC</b> method
specifying the operation and the parameters to enable RRAS server to perform
the required management task.</p>
</li><li><p><span><span> 
</span></span>MUST set the <b>Enum.entries</b> to the number of available port
devices returned by the RRAS server.</p>
</li><li><p><span><span> 
</span></span>MUST check the passed in <b>Enum.size</b> and copy all of the
port information details (<a href="795a440d-86be-4710-8d61-5d92dd0fd3c6" data-linktype="relative-path"><b>RASMAN_PORT_32 (section 2.2.1.2.226)</b></a>)
for the ports that fit in the <b>Enum.size</b> to <b>Enum.buffer</b>.</p>
</li><li><p><span><span> 
</span></span><b>Enum.size</b> MUST be set to the total size in bytes needed to
hold all the port information.</p>
</li><li><p><span><span> 
</span></span>If there is no error, the server MUST return ERROR_SUCCESS
(0x00000000).</p>
</li></ul><p><b>REQTYPE_GETNDISWANDRIVERCAPS:</b></p><p>When processing this request, the RRASM MUST do the
following:</p><ul><li><p><span><span> 
</span></span>The <i>dwcbBufSize</i> that is passed in SHOULD be greater than
or equal to the size of the <b>RequestBuffer</b> structure with the <b>RB_Buffer</b>
field specifying the <a href="b96869a1-9e64-4667-af1c-5f6e16aa949d" data-linktype="relative-path"><b>GetNdiswanDriverCapsStruct (section 2.2.1.2.222)</b></a>
structure. If not, RRASM MUST return ERROR_SUCCESS (0x00000000) setting <b>GetNdiswanDriverCapsStruct.retcode</b>
to E_INVALIDARG (0x80070057). </p>
</li><li><p><span><span> 
</span></span>Call the abstract interface <b>Invoke RASRPC</b> method
specifying the operation and the parameters to enable the RRAS server to
perform the required management task.</p>
</li><li><p><span><span> 
</span></span>If all validation is successful, populate the <b>GetNdiswanDriverCapsStruct</b>
with the encryption capabilities returned by the RRAS server and set <b>GetNdiswanDriverCapsStruct.retcode</b>
to ERROR_SUCCESS (0x00000000). If there is any error while retrieving the
encryption capabilities of RRAS, set the <b>GetNdiswanDriverCapsStruct.retcode</b>
with the error. RRASM MUST return ERROR_SUCCESS (0x00000000). </p>
</li></ul><p><b>REQTYPE_GETDEVCONFIG:</b></p><p>When processing this request, the RRASM MUST do the
following:</p><ul><li><p><span><span> 
</span></span>The <i>dwcbBufSize</i> that is passed in SHOULD be greater than
or equal to the sum of the size of the <b>RequestBuffer</b> structure with the <b>RB_Buffer</b>
field specifying the <a href="f0998ceb-4787-4fc3-8959-e6b0fb66522c" data-linktype="relative-path"><b>GetDevConfigStruct (section 2.2.1.2.224)</b></a>
structure, and <b>GetDevConfigStruct.size</b>. If not, RRASM MUST return
ERROR_SUCCESS (0x00000000) setting <b>GetDevConfigStruct.retcode</b> to E_INVALIDARG
(0x80070057). </p>
</li><li><p><span><span> 
</span></span>Because RRASM does not maintain the list of valid port
identifiers, the RRAS server SHOULD check that <b>RequestBuffer.RB_PCBIndex</b>
is a valid port identifier. If this is not the case, RRAS MUST return
ERROR_SUCCESS (0x00000000) setting <b>GetDevConfigStruct.retcode</b> to
ERROR_PORT_NOT_FOUND (0x00000267).</p>
</li><li><p><span><span> 
</span></span>If the device type specified by <b>GetDevConfigStruct.devicetype</b>
does not exist on the RRAS server, the RRAS implementation MUST return
ERROR_SUCCESS (0x00000000) setting GetDevConfigStruct.retcode to
ERROR_DEVICE_DOES_NOT_EXIST (0x00000260).</p>
</li><li><p><span><span> 
</span></span>If the device type associated with the port as identified by <b>RequestBuffer.RB_PCBIndex</b>
is a value other than &#34;MODEM&#34;, RRASM MUST return ERROR_SUCCESS
(0x00000000) setting <b>GetDevConfigStruct.retcode</b> to ERROR_SUCCESS
(0x00000000) and <b>GetDevConfigStruct.size</b> to zero (0).</p>
</li><li><p><span><span> 
</span></span>Call the abstract interface <b>Invoke RASRPC</b> method
specifying the operation and the parameters to enable RRAS server to perform
the required management task.</p>
</li><li><p><span><span> 
</span></span>Check if <b>GetDevConfigStruct.size</b> is large enough to hold
the device information as returned by RRAS. If not, RRASM MUST return
ERROR_SUCCESS (0x00000000) setting <b>GetDevConfigStruct.retcode</b> to
ERROR_BUFFER_TOO_SMALL (0x0000025B). Set the GetDevConfigStruct.size to the
size of the required buffer to hold device information.</p>
</li><li><p><span><span> 
</span></span>If all validation is successful, the RRAS server MUST get the
device configuration information associated with the port identified by <b>RequestBuffer.RB_PCBIndex</b>
and fill the <b>GetDevConfigStruct.config</b> buffer with the details and set
the <b>GetDevConfigStruct.size</b> to the size of the buffer copied to <b>GetDevConfigStruct.config</b>.
Server MUST return ERROR_SUCCESS (0x00000000).</p>
</li></ul></div>