registry value

registry value

Postby Otto » Sun May 16, 2010 4:22 pm

Can someone please post an example how to write and read a registry value.
Thank in advance
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6332
Joined: Fri Oct 07, 2005 7:07 pm

Re: registry value

Postby tsales » Mon May 31, 2010 6:30 am

Otto

function ReadRegistry()

LOCAL nHandle
LOCAL cValue
LOCAL dFecUltActu
if RegOpenKey( HKEY_CURRENT_USER, "SOFTWARE\MySoft", @nHandle ) == 0
dFecUltActu := cToD( RegQueryValue( nHandle, "F.Ul.Actualizacion" , @cValue ))
RegCloseKey( nHandle )
endif
Return NIL

function WriteRegistry()
LOCAL nHandle
LOCAL cDateUltActu := dToC( DATE() )

if RegOpenKey( HKEY_CURRENT_USER, "SOFTWARE\MySoft", @nHandle ) != 0
RegCreateKey( HKEY_CURRENT_USER, "SOFTWARE\MySoft", @nHandle ) // Creo el Grupo.
if RegOpenKey( HKEY_CURRENT_USER, "SOFTWARE\MySoft", @nHandle ) == 0 // Si existe.
RegSetValue( nHandle, "F.Ul.Actualizacion" ,cDateUltActu )
Endif
RegCloseKey( nHandle )
endif
Return NIL
Toni Sales
tsales
 
Posts: 186
Joined: Sat Oct 08, 2005 7:32 am


Return to FiveWin for Pocket PC

Who is online

Users browsing this forum: No registered users and 13 guests