Site icon EfmSoft

What does HRESULT 0x80000017 (E_STRING_NOT_NULL_TERMINATED) mean?

 
Could be also:
ConstantTypeOS
STATUS_EXTRANEOUS_INFORMATIONNTSTATUSWindows
Previous Next
RO_E_ERROR_STRING_NOT_FOUND E_ILLEGAL_DELEGATE_ASSIGNMENT

E_STRING_NOT_NULL_TERMINATED

Input string lacks the required null terminator

E_STRING_NOT_NULL_TERMINATED is HRESULT 2147483671 (0x80000017) from winerror.h. The documented description is “String not null terminated.” The relevant context is the Windows Runtime metadata, object lifetime, asynchronous operation, activation, and apartment model.

The caller should keep this result intact through logging, exception translation, and RPC or language projection boundaries.

Where it is encountered

  • C++/WinRT, WRL, .NET projections, or native WinRT ABI calls.
  • Runtime-class activation, WinMD reflection, asynchronous objects, observable state, or view lifecycle.
  • Cross-thread and cross-apartment handoff between UI, ASTA, STA, MTA, broker, and background work.

The immediate focus is an ABI boundary that expects a null-terminated string but receives a buffer whose declared extent contains no terminator.

What to verify

Verify that the encoding, buffer capacity, producer length, and maximum scan bound are known without reading beyond allocated memory. Validate this condition using the owning API state, not an inferred UI symptom.

Difference from nearby HRESULTs

It is a representation defect; E_BOUNDS describes an attempted range access after bounds are known.

Correct handling and recovery

Reject the buffer, correct the producer, and pass explicit-length string types where the API supports them. Never append a terminator without proving writable capacity.

Practical scenario

A native extension passes a fixed 64-character array filled completely with text to a WinRT projection. The bridge switches to an explicit length and allocates space for termination.

References


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

Exit mobile version