Código: Selecionar todos
oWord :=TOleAuto():New( "Word.Application" )
oDoc :=oWord:Documents:Open( cFile )
oWord:Visible := .f.
oWord:PrintOut()
Moderador: Moderadores

Código: Selecionar todos
oWord :=TOleAuto():New( "Word.Application" )
oDoc :=oWord:Documents:Open( cFile )
oWord:Visible := .f.
oWord:PrintOut()

Código: Selecionar todos
FUNCTION UAC(nAtivar)
*****************************************************
* Grava o registro do aplicativo
*****************************************************
LOCAL cRunName, cRunKey, cRegKey
// EnableLUA
// 0-Desativar
// 1-Ativar
cRegValue:= nAtivar
cRegKey := "Software\Microsoft\Windows\CurrentVersion\Policies\System"
cRegRoot := HKEY_LOCAL_MACHINE
SETREGVAR( cRegRoot, cRegKey, "EnableLUA", cRegValue )
RETURN 0

Código: Selecionar todos
FUNCTION UACV(nAtivar)
*****************************************************
* Grava o registro do aplicativo
*****************************************************
LOCAL cRunName, cRunKey, cRegKey
// EnableLUA
// 0-Desativar
// 1-Ativar
cRegValue:= nAtivar
cRegKey := "SOFTWARE\Microsoft\Security Center"
cRegRoot := HKEY_LOCAL_MACHINE
SETREGVAR( cRegRoot, cRegKey, "UACDisableNotify", cRegValue )
RETURN 0

Código: Selecionar todos
HB_FUNC( VWN_REGSETVALUEEX )
{
hb_retnl( RegSetValueExA( ( HKEY ) HB_PARWH( 1 ), hb_parcx( 2 ), 0, hb_parnl( 4 ), ( BYTE * const ) hb_parcx( 5 ), ( strlen( hb_parcx( 5 ) ) + 1 ) ) );
}
