|
-
Jan 2nd, 2008, 02:19 AM
#1
Thread Starter
Hyperactive Member
Registry API Errors
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
-
Jan 2nd, 2008, 02:21 AM
#2
Re: Registry API Errors
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
-
Jan 2nd, 2008, 02:24 AM
#3
Re: Registry API Errors
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
-
Jan 2nd, 2008, 02:29 AM
#4
Re: Registry API Errors
 Originally Posted by Doogle
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
Yes Doogle, MSDN is the primary source of info.
the error codes and descriptions are here http://msdn2.microsoft.com/en-us/library/aa368542.aspx
-
Jan 2nd, 2008, 03:11 AM
#5
Thread Starter
Hyperactive Member
Re: Registry API Errors
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
-
Jan 2nd, 2008, 03:14 AM
#6
Re: Registry API Errors
Search msdn online like Fazi posted. Its the Microsoft original source code definitions. Search for your constants and you will find it.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jan 2nd, 2008, 03:15 AM
#7
Re: Registry API Errors
Yes, that is used with RegEnumKeyEx
http://msdn2.microsoft.com/en-us/lib...62(VS.85).aspx
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.
-
Jan 2nd, 2008, 03:17 AM
#8
-
Jan 2nd, 2008, 06:13 AM
#9
Re: Registry API Errors
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:
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.
Other than that, you're as well off creating a log to record the most common errors, so you can add them later.
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.
Last edited by schoolbusdriver; Jan 2nd, 2008 at 06:44 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|