PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • 32-bit application operating on a 64-bit system
  • Equivalence
  • Differences between GO mode and runtime
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Checks the existence of a key in the Windows registry.
Example
// Checks the existence of the "HKEY_LOCAL_MACHINE\SOFTWARE\MyApp" key
ResExist = RegistryExist("HKEY_LOCAL_MACHINE\SOFTWARE\MyApp")
Syntax

Checking the existence of a key or key value Hide the details

<Result> = RegistryExist(<Key path> [, <Value name>])
<Result>: Boolean
  • True if the specified key or value exists,
  • False otherwise.
<Key path>: Character string (with quotes)
Path of key to check.
Windows Mobile This path can contain up to 255 characters and up to 16 levels.
<Value name>: Optional character string
Name of value to check. If this parameter is not specified, the value checked will be the "<Default>" value. To check the "<Default>" value, <Value name> must be "0".

Checking the existence of a key value identified by its index Hide the details

<Result> = RegistryExist(<Key path> , <Value index>)
<Result>: Boolean
  • True if the specified value exists,
  • False otherwise.
<Key path>: Character string (with quotes)
Path of key to check.
Windows Mobile This path can contain up to 255 characters and up to 16 levels.
<Value index>: Integer
Index of the value to be checked. If this parameter is not specified, the value checked will be the "<Default>" value. To check the "<Default>" value, <Value index> must be "0".
Remarks
WINDEVWEBDEV - Server codeReports and QueriesWindowsUser code (UMC)

32-bit application operating on a 64-bit system

On a 64-bit system, the UAC mechanism triggers for the 32-bit applications a redirection of accesses to the registry form the following branch:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node
Windows Mobile

Equivalence

RegistryExist and ceRegistryExist have equivalent operating modes.
The only difference is:
  • RegistryExist handles the Mobile Device registry (Pocket PC) from a WINDEV Mobile application.
  • ceRegistryExist handles the Mobile Device registry (Pocket PC) from a WINDEV application.
Windows Mobile

Differences between GO mode and runtime

In GO mode (simulation on the development computer), RegistryExist handles the registry of development computer.
At runtime, RegistryExist handles the Mobile Device registry (Pocket PC).
The differences between GO mode (simulator) and runtime are presented in Differences between GO mode and runtime.
Component: wd260std.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Exemplo Resgistro Windows - Ler e Gravar
//-- Global
PROCEDURE MyWindow()
gn_id_usuario is int=0
//Global declarations
_chave_senha is string="HKEY_CURRENT_USER\Software\erpmatos\"
//----------------------
//--End of

//Ler Chave
n_usuario is int=RegistryQueryValue(_chave_senha,"Usuario")
CBOX_salvar=RegistryQueryValue(_chave_senha,"Salvar")
IF CBOX_salvar=True THEN
COMBO_Usuario_matos_1=n_usuario
LSV_Usuario_matos=n_usuario
s_senha is string=RegistryQueryValue(_chave_senha,"Senha")
EDT_senha = Uncrypt(s_senha, "Password")
END
//-----------------------
//Gravar Chave
//Check box Salvar
n_usuario is int=0
IF RegistryExist(_chave_senha) = False THEN
RegistryCreateKey(_chave_senha)
END
n_usuario=COMBO_Usuario_matos_1
s_nome_usuario is string=""
RegistrySetValue(_chave_senha,"Usuario",n_usuario)
RegistrySetValue(_chave_senha,"Senha",Crypt(EDT_senha,"Password"))
HReadSeekFirst(usuario_matos,usuario_matosID,n_usuario)
IF HFound(usuario_matos) THEN
RegistrySetValue(_chave_senha,"UsuarioNome",s_nome_usuario)
ELSE
RegistrySetValue(_chave_senha,"UsuarioNome","")
END
IF CBOX_salvar=True THEN
RegistrySetValue(_chave_senha,"Salvar",1)
ELSE
RegistrySetValue(_chave_senha,"Salvar",0)
END
//--
//--Botao Salvar
IF CBOX_salvar=True THEN
n_usuario is int=0
n_usuario=COMBO_Usuario_matos_1
RegistrySetValue(_chave_senha,"Usuario",n_usuario)
RegistrySetValue(_chave_senha,"Senha",Crypt(EDT_senha,"Password"))
RegistrySetValue(_chave_senha,"UsuarioNome",gs_usuario_nome)
END

//Blog Video e Exemplo
http://windevdesenvolvimento.blogspot.com.br/2016/03/curso-windev-registro-windows-001.html
De matos AMARILDO
28 Mar. 2016