Click here to Skip to main content
13,295,051 members (88,917 online)
Click here to Skip to main content
Add your own
alternative version


20 bookmarked
Posted 5 Dec 2001

Hide String value from Regedit by Hooking the RegEnumValueW API

, 5 Dec 2001
Rate this:
Please Sign up or sign in to vote.
This Article shows how to hide a string value from Regedit
<!-- Download Links --> <!-- Add the rest of your HTML here -->


This Article Explains how to hide a registry string from regedit by hooking the RegEnumValueW API, In this article there is a Function that hooks APIs called

. I am not the author of that function - I got it from some website whose name I forget. Thanks to the author of that function. The function that replaces the
is given below

LONG MyRegEnumValue(HKEY hKey,           
                    DWORD dwIndex,       
                    LPWSTR lpValueName,  
                    LPDWORD lpcValueName,
                    LPDWORD lpReserved,  
                    LPDWORD lpType,      
                    LPBYTE lpData,       
                    LPDWORD lpcbData)
   LONG ret;

   RegEnumValueWtype oldfn=(RegEnumValueWtype)RegDLL_Hooks.Functions [0].OrigFn;

   char ss[10];
   WideCharToMultiByte(CP_ACP, 0,lpValueName,
                            NULL, NULL);
   if (strstr(ss,"hirosh")!=NULL)
      return 1;
      return ret;

This function simply checks the string "hirosh" from the lpValueName and if found it will return a 1. That means the the function has not completed successfully, so regedit will not display any string that contains the word "hirosh". 

API hooking is a powerful tool. To use this we can also hide files, processed from OS. However, I don't know which APIs must be hooked to achieve this. If anybody knows this please help me. 

I check this program on Windows XP. regedit is OK but when I take msconfig it displays an error. I don't know what is the problem so if anybody knows this please help me. I am not experienced in API hooking so I am just experiment with this.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

H. Joseph
United States United States
No Biography provided

You may also be interested in...

Comments and Discussions

Questionregedit not work Pin
software.m13-Aug-13 22:05
membersoftware.m13-Aug-13 22:05 
GeneralI need help please Pin
rabih_saleh24-Apr-07 3:47
memberrabih_saleh24-Apr-07 3:47 
Generalihelp Pin
cgf9927-Mar-06 3:06
membercgf9927-Mar-06 3:06 
GeneralRe: ihelp Pin
cgf9927-Mar-06 3:14
membercgf9927-Mar-06 3:14 
GeneralWindows 2003 Platform Pin
tocsjung14-Jul-05 0:08
membertocsjung14-Jul-05 0:08 
Generalcalling callbacks Pin
K-ballo22-Aug-04 16:57
memberK-ballo22-Aug-04 16:57 
Questionhow to add new functions to be hooked Pin
Anonymous28-Apr-04 13:51
sussAnonymous28-Apr-04 13:51 
GeneralI have a question. Pin
tocsjung22-Dec-03 19:05
membertocsjung22-Dec-03 19:05 
GeneralRe: I have a question. Pin
cgf9927-Mar-06 3:09
membercgf9927-Mar-06 3:09 
GeneralOnly with dll Pin
xxcyberguruxx1-Oct-03 8:20
memberxxcyberguruxx1-Oct-03 8:20 
I've put the code to my application but i don't want to use the dll in the example...
But it looks like it doesn't work without the dll?
GeneralRe: Only with dll Pin
Dr. Fred10-Nov-03 7:45
memberDr. Fred10-Nov-03 7:45 
GeneralFreeing this dll Pin
Rohit Divas23-Sep-03 0:53
memberRohit Divas23-Sep-03 0:53 
GeneralSolution to the msconfig problem Pin
Tim Kosse8-Dec-01 10:30
memberTim Kosse8-Dec-01 10:30 
GeneralRe: Solution to the msconfig problem Pin
hirosh9-Dec-01 5:25
memberhirosh9-Dec-01 5:25 
GeneralRe: Solution to the msconfig problem Pin
hirosh24-Dec-01 16:04
memberhirosh24-Dec-01 16:04 
GeneralRe: Solution to the msconfig problem Pin
Anonymous29-May-03 0:03
sussAnonymous29-May-03 0:03 
GeneralRe: Security issue Pin
bla10-Dec-01 22:07
memberbla10-Dec-01 22:07 
GeneralRe: Security issue Pin
Tim Kosse10-Dec-01 22:26
memberTim Kosse10-Dec-01 22:26 
GeneralRe: Security issue Pin
bla11-Dec-01 22:27
memberbla11-Dec-01 22:27 
GeneralRe: Security issue Pin
yyt_hac24-Dec-01 4:50
memberyyt_hac24-Dec-01 4:50 
GeneralRe: Security issue Pin
hir24-Dec-01 15:58
memberhir24-Dec-01 15:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.171207.1 | Last Updated 6 Dec 2001
Article Copyright 2001 by H. Joseph
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid