次の方法で共有


4.1.30 IDL_DRSWriteNgcKey (Opnum 29)

The IDL_DRSWriteNgcKey method composes and updates the msDS-KeyCredentialLink value on an object.

 ULONG IDL_DRSWriteNgcKey(
   [in, ref] DRS_HANDLE hDrs,
   [in] DWORD dwInVersion,
   [in, ref, switch_is(dwInVersion)] 
     DRS_MSG_WRITENGCKEYREQ* pmsgIn,
   [out, ref] DWORD* pdwOutVersion,
   [out, ref, switch_is(*pdwOutVersion)] 
     DRS_MSG_WRITENGCKEYREPLY* pmsgOut
 );

hDrs: The RPC context handle returned by the IDL_DRSBind method.

dwInVersion: The version of the request message. Must be set to 1, because that is the only version supported.

pmsgIn: A pointer to the request message.

pdwOutVersion: A pointer to the version of the response message. The value must be 1 because that is the only version supported.

pmsgOut: A pointer to the response message.

Return Values: 0 if successful, or a Windows error code if a failure occurs.

Exceptions Thrown: This method might throw the following exceptions beyond those thrown by the underlying RPC protocol (as specified in [MS-RPCE]): ERROR_INVALID_HANDLE, ERROR_DS_DRS_EXTENSIONS_CHANGED, and  ERROR_INVALID_PARAMETER.