Hi all,
i'm newbee here and in ASM World (i just code a litle .Net)
i have a problem to code registry access with asm :( , i can't find a example i understand...
imagine you have a prog. whith a button(IDC_OK ID 1001 ) and on click
you need to put in registry - HKCU\Software\AppName\RegInfo\Name\xxxxxxx
how can i do this????? please.....
sorry about my english and my stupid question....
Bye
5k3l3t0r
Skeletor,you should find a nice sample in hutch masm package :wink
BasilYercin
Start with:
RegCreateKeyEx
Skeletor,
Welcome Aboard :U
The forum 'Search' and your favorite seach engine will answer many questions before we can and save you time. :dance:
The Tutorials & Examples should help you with most of this.
j00 d0n'7 n33d l337 $p34k h3r3.
Regards, P1 :8)
hi, takx for your reply
i found some examples but i can't adapt to my needs...
this is one:
mov cbData, SIZEOF Data
invoke SHSetValue,HKEY_CURRENT_USER,OFFSET SubKey,offset value,REG_SZ,offset Data,cbData
when i assemble i get errors...
i don't know what i have to change...
remember when you start asm coding, everything is a chalenge...
something basic for you is dificult for me...
and the only way is get some help from people like you...
You really should check Iczelion's tutorials. Those are a REALLY pice of work. About thet function and all others:
- check if the include file and lib file can be found by ml and LINK
- check if all those variables/constants are declared
- !! READ THE ERROR!! (and share it, no one can know what is happening in there if you don't tell us)
And RADAsm is a great IDE for this job.
Quote from: P1 on September 26, 2006, 08:19:46 PM
The forum 'Search' and your favorite seach engine will answer many questions before we can and save you time. :dance:
The Tutorials & Examples should help you with most of this.
:thumbu
Hi,
i think my point is the declarations
now i start a new project just with a dialog and a button
and i'll try...
give me a example of how to declare correctly that code, ok??
bye
5k3l3t0r
Check this till then
http://win32assembly.online.fr/tutorials.html
I've just post my first app and the full source code. Search here for "My educational system" or "blind crypt", and you'll find both there.
yo...
hi have this code:
.386
.model flat,stdcall
option casemap:none
include windows.inc
include user32.inc
include kernel32.inc
includelib user32.lib
includelib kernel32.lib
DlgProc proto :DWORD,:DWORD,:DWORD,:DWORD
.data
.data?
hInstance HINSTANCE ?
hTarget HINSTANCE ?
RBuffer dd ?
BytesRead db ?
BytesWritten db ?
.const
IDD_APP equ 1001
IDC_REG equ 1002
.code
start:
invoke GetModuleHandle, NULL
mov hInstance,eax
invoke DialogBoxParam, hInstance, IDD_PATCH, NULL, addr DlgProc, NULL
invoke ExitProcess,eax
DlgProc proc hWnd:HWND, uMsg:UINT, wParam:WPARAM, lParam:LPARAM
.if uMsg==WM_INITDIALOG
invoke SendMessage,hWnd,WM_SETICON,1,eax
.elseif uMsg==WM_COMMAND
mov eax,wParam
.if eax==IDC_REG
mov cbData, SIZEOF Data
invoke SHSetValue,HKEY_CURRENT_USER,OFFSET SubKey,offset value,REG_SZ,offset Data,cbData
.endif
.elseif uMsg==WM_CLOSE
invoke EndDialog,hWnd,0
.endif
xor eax,eax
ret
DlgProc endp
end start
----------------------------------------------------------------------------------------------
can you mke the declares, just for i understand?
the IDC_REG is the button to start the action
supose you have to create:
HKCU\Software\Xpto\XptoInfo\Name\myname
just to learn...
bye
5k3l3t0r
If you want quick-fix wrappers to get the work done, you could check this:
http://www.masm32.com/board/index.php?topic=5735.0
The Registry_Write... functions.
You can examine the source and see the steps that go in actually setting a value to a registry key (Opening a key, checking, setting value, checking, closing... etc)
Cheers,
Shantanu
Quote from: 5k3l3t0r on September 27, 2006, 10:49:57 AM
invoke SHSetValue,HKEY_CURRENT_USER,OFFSET SubKey,offset value,REG_SZ,offset Data,cbData
First of all, you have not work through very much code yet. Keep reading and you will answer your own questions.
AFAIK for this problem, you need to read up on the API and include the supports files ( Which are missing from your code. ) that go with it.
Regards, P1 :8)
PS: That you will maybe get you past getting an exe file produced, but in no way means it will work. Still more debugging ahead.
hi all
my special tkx for FaTaL PrIdE...
bye all
5k3l3t0r