What does NTSTATUS 0xC0020002 (RPC_NT_WRONG_KIND_OF_BINDING) mean?

 
Previous Next
RPC_NT_INVALID_STRING_BINDING RPC_NT_INVALID_BINDING

RPC_NT_WRONG_KIND_OF_BINDING

RPC_NT_WRONG_KIND_OF_BINDING is an NTSTATUS value used by the Windows RPC runtime. This status concerns the kind of binding handle supplied to an RPC runtime operation. A handle can be real and still be unsuitable for an operation that expects a different binding category or a particular binding context. It is therefore a contract mismatch, not necessarily a damaged handle.

Compare it with RPC_NT_INVALID_BINDING: that status means the runtime cannot use the handle at all. RPC_NT_WRONG_KIND_OF_BINDING means the caller reached the handle-validation stage but chose the wrong kind of handle for the requested operation.

The handle category does not match the RPC operation

  • Inspect the IDL/ACF declaration and the runtime function signature to establish whether the call expects an explicit, implicit, primitive or custom binding.
  • Trace the lifetime of the handle: where it was created, copied, associated with authentication and finally passed to the failing API.
  • Avoid substituting a different server address merely to make the error disappear; first verify the operation-to-handle contract.

References


Looking for a different code? Search another status or error code.