hresult
Windows HRESULT Codes
32-bit error and status codes used throughout the Windows platform, COM, and Win32 APIs. The high bit indicates failure (1) or success (0); facility bits identify the subsystem.
52 codes
references learn.microsoft.com/en-us/windows/win32/com/structure-of-com-error-codeslearn.microsoft.com/en-us/openspecs/windows_protocols/ms-erref/0642cb2f-935e-4624-8a17-d29c7d08b0c5
· All codes 52 codes
- CLASS_E_CLASSNOTAVAILABLE Class not available The class factory for the requested CLSID is no longer available. Returned when a DLL class factory is unloaded while an object creation attempt is in progress.
- CLASS_E_NOAGGREGATION Class does not support aggregation This class cannot be created as part of an aggregate. Returned by the class factory's IClassFactory::CreateInstance when the pUnkOuter parameter is non-NULL but the object does not support aggregation.
- CO_E_ALREADYINITIALIZED COM already initialised CoInitialize has already been called successfully on the current thread. This informational return value indicates the thread is already in a COM apartment; the call is otherwise harmless.
- CO_E_CREATEPROCESSFAILED Create process failed The COM server process could not be created. Typically returned by CoCreateInstance when the system is unable to launch the out-of-process server executable.
- CO_E_NOTINITIALIZED COM not initialised CoInitialize or CoInitializeEx has not been called on the current thread. COM must be initialised before any COM functions or interface methods can be used on a given thread.
- D2DERR_INVALID_CALL Direct2D invalid call A call to a Direct2D method is invalid for the current object or resource state. This is a programming error that must be corrected; it typically indicates mismatched API usage.
- D2DERR_NOT_INITIALIZED Direct2D not initialised The Direct2D object has not yet been initialised. Returned when a method is called on a resource or render target that has not completed its initialisation sequence.
- D2DERR_RECREATE_TARGET Direct2D recreate target A recoverable presentation error has occurred; the caller must re-create the render target and attempt to render the frame again. This typically follows a display mode change or driver update.
- D2DERR_WRONG_STATE Direct2D wrong state The Direct2D object was not in the correct state to process the requested method. Often caused by calling rendering methods outside of a BeginDraw/EndDraw pair.
- DXGI_ERROR_ACCESS_DENIED DXGI access denied The caller does not have the required access privileges for the requested DXGI resource. Typically occurs when attempting to write to a shared resource that was opened with read-only access.
- DXGI_ERROR_DEVICE_HUNG DXGI device hung The GPU stopped responding due to badly formed commands from the application. This is a design-time error indicating that the application submitted invalid GPU command sequences.
- DXGI_ERROR_DEVICE_REMOVED DXGI device removed The GPU has been physically removed from the system or a driver upgrade has occurred. The application must destroy and recreate the Direct3D device and all associated GPU resources.
- DXGI_ERROR_DEVICE_RESET DXGI device reset The GPU device failed due to a badly formed command and was reset. This is a recoverable run-time error; the application should destroy and recreate the Direct3D device.
- DXGI_ERROR_DRIVER_INTERNAL_ERROR DXGI driver internal error The graphics driver encountered an internal error and placed the device in the removed state. The application must recreate the device; this usually indicates a driver bug.
- DXGI_ERROR_INVALID_CALL DXGI invalid call The application provided invalid parameter data to a DXGI function. This error must be debugged and fixed before the application is released, as it indicates a programming mistake.
- DXGI_ERROR_MORE_DATA DXGI buffer too small The buffer supplied by the application is not large enough to hold the requested data. The caller should query the required size and retry with an appropriately sized buffer.
- DXGI_ERROR_NOT_FOUND DXGI object not found The requested DXGI object (adapter, output, or private data) was not found. Returned by enumeration functions when the specified ordinal is out of range, or by GetPrivateData when the GUID is unrecognised.
- DXGI_ERROR_UNSUPPORTED DXGI feature unsupported The requested functionality is not supported by the device or the driver. Indicates a capability mismatch between what the application requires and what the GPU or driver can provide.
- E_ABORT Operation aborted The operation was aborted due to an unspecified error. Indicates that an operation did not complete because it was cancelled or interrupted.
- E_ACCESSDENIED Access denied General access denied error. Returned when the caller does not have sufficient privileges to perform the requested operation, such as accessing a protected resource or registry key.
- E_FAIL Unspecified failure An unspecified failure occurred. This is a general-purpose failure code used when no more specific HRESULT is appropriate.
- E_HANDLE Invalid handle The handle is not valid. Returned when a kernel object handle (file, event, mutex, etc.) passed to a function has been closed, was never valid, or belongs to a different process.
- E_INVALIDARG Invalid argument One or more arguments are not valid. Returned when a function or method parameter fails validation, such as an out-of-range value or an unsupported flag combination.
- E_NOINTERFACE No such interface supported The object does not support the requested interface. Returned by QueryInterface when the object cannot provide an implementation for the specified IID.
- E_NOTIMPL Not implemented The requested method or interface is not implemented. Returned by COM objects that provide a partial implementation of an interface, leaving certain methods as stubs.
- E_OUTOFMEMORY Out of memory Failed to allocate necessary memory. Returned when a memory allocation request cannot be satisfied because the heap or virtual address space is exhausted.
- E_POINTER Invalid pointer A pointer argument is NULL or otherwise invalid. Returned when a method receives a pointer parameter that must be non-NULL but is not.
- E_UNEXPECTED Unexpected failure A catastrophic or unexpected failure occurred. This code is reserved for situations that should never happen under normal conditions and typically indicates a programming error.
- HRESULT_FROM_WIN32_ERROR_ALREADY_EXISTS Already exists (Win32) Cannot create a file or object when it already exists. This is the HRESULT encoding of Win32 ERROR_ALREADY_EXISTS (183), returned by APIs that require exclusive creation.
- HRESULT_FROM_WIN32_ERROR_FILE_NOT_FOUND File not found (Win32) The system cannot find the specified file. This is the HRESULT encoding of Win32 ERROR_FILE_NOT_FOUND (2), produced by HRESULT_FROM_WIN32 and commonly encountered in shell and file system APIs.
- HRESULT_FROM_WIN32_ERROR_INSUFFICIENT_BUFFER Insufficient buffer (Win32) The data area passed to a system call is too small to hold the result. This is the HRESULT encoding of Win32 ERROR_INSUFFICIENT_BUFFER (122); the caller should query the required size and retry.
- HRESULT_FROM_WIN32_ERROR_NOT_SUPPORTED Not supported (Win32) The request is not supported by the system or driver. This is the HRESULT encoding of Win32 ERROR_NOT_SUPPORTED (50), often returned by device drivers or APIs for unimplemented features.
- HRESULT_FROM_WIN32_ERROR_PATH_NOT_FOUND Path not found (Win32) The system cannot find the specified path. This is the HRESULT encoding of Win32 ERROR_PATH_NOT_FOUND (3), returned when a directory component of a specified path does not exist.
- HRESULT_FROM_WIN32_ERROR_SHARING_VIOLATION Sharing violation (Win32) The process cannot access the file because it is in use by another process. This is the HRESULT encoding of Win32 ERROR_SHARING_VIOLATION (32), common when opening files without appropriate share flags.
- HRESULT_FROM_WIN32_ERROR_TIMEOUT Wait timeout (Win32) The wait operation timed out before the object entered the signalled state. This is the HRESULT encoding of Win32 WAIT_TIMEOUT (258), commonly returned by WaitForSingleObject and related synchronisation APIs.
- REGDB_E_CLASSNOTREG Class not registered The specified CLSID is not registered in the system registry. Returned by CoCreateInstance or CoGetClassObject when the class identifier cannot be found under HKEY_CLASSES_ROOT\CLSID.
- RPC_E_CALL_REJECTED RPC call rejected The remote procedure call was rejected by the server. Often returned by COM when a call to a single-threaded apartment object is made while the object is busy processing another call.
- RPC_E_CHANGED_MODE RPC apartment model changed CoInitialize was called with a different threading model than a previous call on the same thread. Each thread may only be initialised into one COM apartment model per lifetime.
- RPC_E_DISCONNECTED RPC object disconnected The object has been disconnected from its clients. Returned when a COM proxy attempts to call a remote object that is no longer available or whose server process has terminated.
- S_FALSE Operation successful (false) The operation succeeded but returned a boolean false result. Commonly used by COM methods to indicate success with a negative or empty outcome, such as a search that found no results.
- S_OK Operation successful The operation completed successfully. This is the standard success return value for COM and Win32 functions; a return value of zero always indicates success for HRESULT.
- STG_E_ACCESSDENIED Storage access denied Access to the specified storage or stream was denied. The caller does not have the required share or access mode to open the compound document element.
- STG_E_CANTSAVE Storage cannot save The compound document cannot be saved. Typically returned during an IPersistStorage::Save or OleSave call when the underlying file system or storage refuses the write.
- STG_E_FILEALREADYEXISTS Storage file already exists A storage or stream with the specified name already exists. Returned when attempting to create a new element using a name that is already in use within the compound document.
- STG_E_FILENOTFOUND Storage file not found The requested storage file or stream does not exist. Returned when opening a compound document file or sub-storage that cannot be located.
- STG_E_INSUFFICIENTMEMORY Insufficient memory for storage operation There is not enough memory available to complete the structured storage operation. The system ran out of heap or virtual memory while processing the request.
- STG_E_INVALIDFUNCTION Invalid function The function is not valid for the current state of the object. Returned by IStorage or IStream methods called in an inappropriate order or on an unsupported storage type.
- STG_E_MEDIUMFULL Storage medium full There is no space left on the storage medium. Returned when a write to a compound document file fails because the underlying disk or storage device is full.
- STG_E_PATHNOTFOUND Storage path not found The specified path in the structured storage does not exist. Returned when the directory path leading to a requested storage or stream element cannot be found.
- STG_E_REVERTED Storage reverted The storage object has been invalidated by a revert operation on an ancestor storage. All operations on this object will fail until it is recommitted or the transaction is abandoned.
- STG_E_SHAREVIOLATION Storage share violation The file or storage cannot be opened because it is locked by another process. The requested share mode conflicts with an existing open on the compound document file.
- STG_S_CONVERTED Storage converted The underlying file was converted to compound document format during the open operation. Returned by StgOpenStorage when a non-compound-document file is automatically upgraded.