Site icon EfmSoft

What does Windows error code 1780 (RPC_X_NULL_REF_POINTER) mean?

 
Previous Next
RPC_X_SS_CANNOT_GET_CALL_HANDLE RPC_X_ENUM_VALUE_OUT_OF_RANGE

RPC_X_NULL_REF_POINTER

Reference pointers are not nullable

RPC_X_NULL_REF_POINTER is about the MIDL pointer contract, not merely a C or C++ null-pointer check. A [ref] pointer must always identify valid storage and cannot be null. Top-level pointer parameters default to [ref] when no pointer attribute is specified, so an IDL declaration can require a non-null argument even when a native function signature looks like an ordinary pointer.

Use [unique] or [ptr] only when the interface deliberately permits absence and the corresponding ownership and aliasing rules are appropriate. Changing an existing public interface from [ref] to a nullable pointer changes its wire contract and should not be used as an ad-hoc recovery for this error.

Likely causes

Useful checks

References

Microsoft: ref attribute · The Open Group: DCE NDR pointer representation · Microsoft: RPC return values


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

Exit mobile version