Hi,

This works:
(well, except for some string parameters that should be changed..)
"""
        int         hRegRead;
       int         hRegWrite;
       container   reg;
       str         keyValue;

        #winapi

        hRegWrite  = WinAPI::regOpenKey(#HKEY_LOCAL_MACHINE /* see #winapi for  
other types */, 'SOFTWARE\\Whatever...', #KEY_WRITE);
        if (hRegWrite) {
                WinAPI::regSetValueEx(hRegWrite, 'Your_keyname', #REG_SZ /* see 
#winapi  
for other types */, 'New value'));
             WinAPI::regCloseKey(hRegWrite);
        }

        hRegRead  = WinAPI::regOpenKey(#HKEY_LOCAL_MACHINE /* see #winapi for  
other types */, 'SOFTWARE\\Whatever...', #KEY_READ);
        if (hRegRead) {
                reg = WinAPI::regGetValue(hRegRead, 'Your_keyname');
                keyValue = conpeek(reg,1);
                WinAPI::regCloseKey(hRegRead);
        }
        
        info(keyValue);
"""

The OLAPPivotTable & OLAPServerControlDSO classes also contains some  
examples.

Amund


Fri, 25 Feb 2005 15:47:51 +0800 skrev Raal Goff  
<[EMAIL PROTECTED]>:

>
>
> Hi,
>
> Has anyone got an example of how to use the WinAPI to read/alter
> registry settings? Or does anyone know if there is any documentation
> about the methods floating around? I have looked at the example that's
> currently on technet, but using that method seems to give errors (the
> winapi methods complain about wrong types, not my code, which is weird).
> Searching through the archives of this mailing list doesn't seem to
> yield any good hits either..
>
> Any documentation or examples about the methods would be appreciated,
>
> Cheers,
>
> Raal Goff
> Software Developer
> NAS Insurance Brokers
> T 08 9480 8900
> F 08 9481 1166
> W www.nasinsurance.com.au
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>







 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/development-axapta/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 




Reply via email to