| Previous | Next |
| IMAPI_E_INVALID_PATH | IMAPI_E_DUP_NAME |
IMAPI_E_RESTRICTED_NAME_VIOLATION
IMAPI_E_RESTRICTED_NAME_VIOLATION is tied to the legacy UseRestrictedCharacterSet policy on IFileSystemImage. When enabled, names created afterward are restricted to CP_ANSI characters. Microsoft marks this property deprecated, but existing code can still encounter the HRESULT when it enables the policy and later inserts a name outside the permitted set.
Check the image policy at the moment the item was added
- Record the exact Unicode item name and whether
UseRestrictedCharacterSetwas true before insertion. - Remember that changing the property does not retroactively alter items already present in the image.
- Prefer file-system-specific validation or a documented naming policy instead of silently transliterating user names.
This is not the same as IMAPI_E_INVALID_PATH. A structurally valid path can contain a component rejected by the restricted-name policy. Because the property is deprecated, new code should first question why it is enabled. If compatibility requires it, surface the rejected component and use an explicit deterministic name-mapping scheme so two different Unicode names do not collapse to the same ANSI result.
Restricted character set · CreateFileItem · IFileSystemImage
Looking for a different code? Search another status or error code.
