Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8655679
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T15:05:33+00:00 2026-06-12T15:05:33+00:00

I am trying to implement recursive deletion of Registry Keys for both 32-bit and

  • 0

I am trying to implement recursive deletion of Registry Keys for both 32-bit and 64-bit OS. As RegDeleteKeyEx is not defined for OSes lesser than XP x64 Professional, I am trying to use the function indirectly.

Problem:: Even on x64, the GetProcAddress() is returning NULL.

//Global Declarations 
typedef LONG (WINAPI * PFN_RegDeleteKeyEx)(HKEY hKey , LPCTSTR lpSubKey , REGSAM samDesired , DWORD Reserved );
PFN_RegDeleteKeyEx _RegDeleteKeyEx ;

//The code inside function
hAdvAPI32 = LoadLibrary(TEXT("Advapi32.dll"));
_RegDeleteKeyEx = (PFN_RegDeleteKeyEx)GetProcAddress( hAdvAPI32, "RegDeleteKeyEx" );
if( _RegDeleteKeyEx == NULL )
     printf("NULL\n") ;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T15:05:35+00:00Added an answer on June 12, 2026 at 3:05 pm

    RegDeleteKeyEx isn’t actually a function – it’s a macro. Depending on whether you have UNICODE defined, the macro expands to the actual function name which is given at the bottom of the MSDN page:

    RegDeleteKeyExW (Unicode) and RegDeleteKeyExA (ANSI)
    

    So in your case, you probably want something like

    #ifdef UNICODE
        const char RegDeleteKeyExSymbol[] = "RegDeleteKeyExW";
    #else 
        const char RegDeleteKeyExSymbol[] = "RegDeleteKeyExA";
    #endif
    
    _RegDeleteKeyEx = (PFN_RegDeleteKeyEx)GetProcAddress( hAdvAPI32, RegDeleteKeyExSymbol );
    

    This will use the appropriate symbol name depending on how your own code is compiled (with or without UNICODE defined).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

im trying to implement the recursive Ackermann-Peter-Function in x86 NASM-Assembly. The Function is defined
I’m trying to implement a tail-recursive list-sorting function in OCaml, and I’ve come up
How can I implement recursive MySQL Queries. I am trying to look for it
Trying to implement 3-layer (not: tier, I just want to separate my project logically,
So I'm trying to implement a recursive function that generates the entire game tree
I've been trying to implement a recursive backtracking maze generation algorithm in javascript. These
I'm trying to implement a recursive Fibonacci series which returns the value at an
So, I'm trying to figure out how to implement the recursive calls for a
I am trying to implement recursive traversions over a node structure: sealed class Node(subnodes:
I am trying to implement a tail recursive version of factorial: let{factorial 0 n

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.