| |

VerySource

 Forgot password?
 Register
Search
View: 699|Reply: 4

How do I get from RegSetValueExW (HKEY hKey, LPCWSTR lpValueName, DWORD Reserved, DWORD dwType, CONST BYTE * lpData, DWO

[Copy link]

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 Invalid IP Address

Post time: 2020-1-19 12:00:01
| Show all posts |Read mode
In other words, how do you know the value of the currently modified HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SystemService? Thank you! !!
Reply

Use magic Report

0

Threads

10

Posts

9.00

Credits

Newbie

Rank: 1

Credits
9.00

 China

Post time: 2020-1-26 19:00:01
| Show all posts
First open through the RegOpenKeyEx function!
Reply

Use magic Report

0

Threads

20

Posts

21.00

Credits

Newbie

Rank: 1

Credits
21.00

 China

Post time: 2020-1-27 13:36:02
| Show all posts
CString StrFilter = "executable files (* .exe) | * .exe | all files (*. *) | *. * ||";
CFileDialog Dlg (TRUE, NULL, NULL, NULL, StrFilter, this);
if (Dlg.DoModal () == IDCANCEL)
return;
HKEY hKey;
LPCTSTR StrKey =
        "HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\SystemService";
if (ERROR_SUCCESS ==
        :: RegOpenKeyEx (HKEY_CURRENT_USER, StrKey, NULL, KEY_ALL_ACCESS,&hKey))
{
CString Value = Dlg.GetPathName ();
LPCSTR KeyValue = Dlg.GetFileTitle ();
if (ERROR_SUCCESS == :: RegSetValueEx (hKey, (LPCTSTR) KeyValue, 0, REG_SZ,
(BYTE *) (LPCSTR) Value, strlen (Value) +1))
{
AfxMessageBox ("Set the program to run automatically when the system starts!");
}
// :: RegDeleteValue (hKey, (LPCTSTR) KeyValue);
:: RegCloseKey (hKey);
}
Reply

Use magic Report

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 Invalid IP Address

 Author| Post time: 2020-1-27 19:45:01
| Show all posts
You have misunderstood what I meant. I am now doing a HOOK to intercept RegSetValueEx. If hKey is modifying my own registry key, I will return the wrong value, so I can only know the key to be modified from hKey.
Reply

Use magic Report

0

Threads

24

Posts

19.00

Credits

Newbie

Rank: 1

Credits
19.00

 China

Post time: 2020-2-2 12:00:02
| Show all posts
RegMon specializes in this.

The technology used may be HOOK.
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list