What does Windows error code 1743 (RPC_S_STRING_TOO_LONG) mean?

 
Previous Next
RPC_S_MAX_CALLS_TOO_SMALL RPC_S_PROTSEQ_NOT_FOUND

RPC_S_STRING_TOO_LONG

The string cannot be marshaled within the interface limit

RPC_S_STRING_TOO_LONG is raised before an application should treat the value as ordinary text. RPC strings are governed by IDL type, terminator rules, correlation attributes, and NDR length fields. A missing terminator, wrong character count, byte-count confusion, or unbounded conversion result can all make the marshaled string exceed its contract.

Measure the source string in the same units used by the IDL—characters or elements, not an assumed byte count—and include the terminator where required. Compare ANSI and Unicode conversion paths and inspect generated proxy/stub versions. Truncating silently is unsafe when the value is a principal name, path, or identifier; reject it at the application boundary with a documented maximum instead.

What to inspect

  • Record actual element count, buffer capacity, encoding, and terminator presence.
  • Check size_is or max_is correlations attached to the string parameter.
  • Apply a domain-specific maximum before invoking the generated client stub.

References


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