System Registry

System Registry

Postby Mike Serra » Thu Jul 26, 2007 3:50 pm

Hi all!

have anybody got an example of tReg32 class?. I tried with samples but i don't get to build my program.

Thanks to all.
Mike Serra
 
Posts: 297
Joined: Fri Apr 14, 2006 5:52 pm
Location: Córdoba (España)

Postby pablovidal » Thu Jul 26, 2007 4:08 pm

Code: Select all  Expand view  RUN
#define  HKEY_CLASSES_ROOT    2147483648
#define  HKEY_LOCAL_MACHINE   2147483650
#define  HKEY_CURRENT_USER    2147483649

Function Licencia()
Local c := "Software\Tuprograma\youkey"
Local oReg := TReg32():New( HKEY_CURRENT_USER, C, .F. )
Local aData := Array(1)
Local lLice := .T.
Local cLice := ""

oReg := TReg32():New( HKEY_CURRENT_USER, c, .F. )
If Upper( AllTrim( oReg:Get( "licencia", "" ) ) ) != "SI"
    oReg := TReg32():Create( HKEY_CURRENT_USER, c, .F. )
    oReg:Set( "licencia", "SI" )
EndIf
oReg:Close()
Return(.t.)
Saludos,

Pablo Alberto Vidal
/*
------------------------------------------------------
Harbour 3.2.0, Fivewin 17.02, BCC7
------------------------------------------------------
*/
User avatar
pablovidal
 
Posts: 401
Joined: Thu Oct 06, 2005 10:15 pm
Location: Republica Dominicana

Vista Registry

Postby TimStone » Thu Jul 26, 2007 4:50 pm

Has anyone worked with the Vista Registry. Microsoft now puts registry entries into a virtual machine which can be harder to locate ( makes it rough for phone or email support ). Apparently there is a conforming standard test if we want to write to HKEY_LOCAL_MACHINE. Does anyone have experience with this ?
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Postby Mike Serra » Thu Jul 26, 2007 5:17 pm

Thanks Pablo, it work perfectly.

Tim, sorry!!, but i don't have worked with windows vista only with xp and less, but i'll search information about.
Mike Serra
 
Posts: 297
Joined: Fri Apr 14, 2006 5:52 pm
Location: Córdoba (España)


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 65 guests