News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Registry access with MASM32

Started by inich, July 02, 2005, 11:43:30 PM

Previous topic - Next topic

inich

My topic went away from me without its body, it seems.  This probably happened because I am a blind computer user who finds the forum medium a bit unfriendly.

I am looking for the API calls which will enable me to create, open, write to, read from and close registry entries.

MASM32 doesn't seem to recognize RegCreateKeyEx or RegCloseKey, which C++ compilers do recognize.  Can anyone point me in the direction of the correct names nd syntax for MASM32, please?

All the best,

inich

Mark Jones

Hi Inich, my name is Mark. MASM32 does indeed support registry access, but you need to include the ADVAPI32.INC and ADVAPI32.LIB files first. Then you can INVOKE or CALL the usual registry functions such as RegOpenKeyEx, RegQueryValueEx, RegCloseKey, etcetera.

If you can parse this correctly, the following link harbors a sample:

http://www.masmforum.com/simple/index.php?topic=431.msg15809#msg15809

Regards,
Mark
"To deny our impulses... foolish; to revel in them, chaos." MCJ 2003.08

inich

Hello Mark,

Thank you very much for your reply.  You hit the nail right on the head!  It did not occur to me that includes would have to be added so that the registry access APIs would be recognized.  I put them in, and the error messages all stopped.

It's already one a.m. where I live, so it's time for bed.  I'll check out the link you gave me, and experiment with more registry calls over the next day or two as time permits.

Thanks again, and all the best.

Ian
"inich"