The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: inich on July 02, 2005, 11:43:30 PM

Title: Registry access with MASM32
Post by: inich on July 02, 2005, 11:43:30 PM
Title: Re: Registry access with MASM32
Post by: inich on July 03, 2005, 12:21:46 AM
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
Title: Re: Registry access with MASM32
Post by: Mark Jones on July 03, 2005, 01:01:59 AM
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
Title: Re: Registry access with MASM32
Post by: inich on July 03, 2005, 05:04:40 AM
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"