Results 1 to 9 of 9

Thread: Registry API Errors

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2005
    Posts
    400

    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

  2. #2
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    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

  3. #3
    PowerPoster Fazi's Avatar
    Join Date
    Aug 2005
    Location
    Underworld
    Posts
    2,525

    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

  4. #4
    PowerPoster Fazi's Avatar
    Join Date
    Aug 2005
    Location
    Underworld
    Posts
    2,525

    Re: Registry API Errors

    Quote 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

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2005
    Posts
    400

    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

  6. #6
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    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 PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI 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

  7. #7
    PowerPoster Fazi's Avatar
    Join Date
    Aug 2005
    Location
    Underworld
    Posts
    2,525

    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.

  8. #8
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    Re: Registry API Errors

    A simple search on MSDN came up with:
    http://msdn2.microsoft.com/en-us/lib...81(VS.85).aspx

  9. #9
    Fanatic Member schoolbusdriver's Avatar
    Join Date
    Jan 2006
    Location
    O'er yonder
    Posts
    1,020

    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:
    1. Public Const ERROR_SUCCESS = 0&
    2. Public Const ERROR_MORE_DATA = 234 'Data length returned. Use this to size a variable.
    3. Public Const ERROR_NO_MORE_ITEMS = 259& 'Enumeration finished.
    4. Public Const ERROR_FILE_NOT_FOUND = 2& 'Can't find Key, SubKey, ValueName or Value.
    5. Public Const ERROR_ACCESS_DENIED = 5& 'Non-admin tried to access HKLM, etc.
    6. 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
  •  



Click Here to Expand Forum to Full Width