Does anyone know where I can find a list of the meanings of registry API return values? For example:
Const ERROR_SUCCESS = 0&
Const ERROR_NO_MORE_ITEMS = 259&
Thank you
Printable View
Does anyone know where I can find a list of the meanings of registry API return values? For example:
Const ERROR_SUCCESS = 0&
Const ERROR_NO_MORE_ITEMS = 259&
Thank you
Most are in the API Text Viewer. (In Microsoft Visual Studio Tools)
Edit: Ah, I misread the question. The meanings are with the documentation of the APIs which are available on the Microsoft Web Site
Another place is,
API Guide Software,
it has 900+ API's Declaration and Documentation with examples for each of them.
http://allapi.mentalis.org/agnet/apiguide.shtml
Yes Doogle, MSDN is the primary source of info.Quote:
Originally Posted by Doogle
the error codes and descriptions are here http://msdn2.microsoft.com/en-us/library/aa368542.aspx
Fazi, that page is more for the Windows Installer. It doesn't have ERROR_NO_MORE_ITEMS. I'm looking for which ones apply to registry APIs. Also, if anyone knows where to find them, can you please paste it here? Thank you
Search msdn online like Fazi posted. Its the Microsoft original source code definitions. Search for your constants and you will find it.
Yes, that is used with RegEnumKeyEx
http://msdn2.microsoft.com/en-us/lib...62(VS.85).aspx
Quote:
Return Value
If the function succeeds, the return value is ERROR_SUCCESS.
If the function fails, the return value is a system error code. If there are no more subkeys available, the function returns ERROR_NO_MORE_ITEMS.
If the lpName buffer is too small to receive the name of the key, the function returns ERROR_MORE_DATA.
A simple search on MSDN came up with:
http://msdn2.microsoft.com/en-us/lib...81(VS.85).aspx
I don't think there's a dedicated registry access error list anywhere, because something can happen that causes an unexpected error (such as the removal of a USB device). If your code is appropriately written, the most you'll probably need is:Other than that, you're as well off creating a log to record the most common errors, so you can add them later.vb Code:
Public Const ERROR_SUCCESS = 0& Public Const ERROR_MORE_DATA = 234 'Data length returned. Use this to size a variable. Public Const ERROR_NO_MORE_ITEMS = 259& 'Enumeration finished. Public Const ERROR_FILE_NOT_FOUND = 2& 'Can't find Key, SubKey, ValueName or Value. Public Const ERROR_ACCESS_DENIED = 5& 'Non-admin tried to access HKLM, etc. Public Const ERROR_INVALID_HANDLE = 6& 'Cross calling advapi32.dll, shlwapi.dll, ntdll.dll etc.
EDIT 1: If you're calling the native api, the list is a little more complex.
EDIT 2: Also , if you've installed the MSDN 2001 DVD, look under "Win32 API [Win32]" for "error codes". Gives reasonable explanations. Finally, if you've installed the "Error Lookup" utility (ERRLOOK.EXE), it gives the same output as those in the "error codes" list.