xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

Os_NetRegOk()

Checks for correct network registry settings on Windows platforms.

Syntax

Os_NetRegOk( [<lFixIt>] ) --> lIsOK

Arguments

<lFixIt>
This parameter defaults to .F. (false) which leaves the registry unchanged. Passing .T. (true) changes registry settings for correct networking operations.

Return

The function returns .T. (true) when the registry settings on Windows platforms are correct for networking operations, otherwise .F. (false) is returned.

Info

See also:OS_NetVRedirOk(), QueryRegistry()
Category: Network functions , xHarbour extensions
Source:rtl\winos.prg
LIB:xhb.lib
DLL:xhbdll.dll

Example

// The example outlines how the registry settings can be checked for
// correct values in network operations.

   PROCEDURE Main()
      LOCAL lFixIt := .F.
      LOCAL nError := 0

      CLS
      ? 'Checking network settings for Windows'
      ? '----------------------------------------'
      ?
      IF OS_IsWTSClient() .AND. .NOT. OS_NetRegOK()
         ? 'Registry on WTS server is not set correctly for networking.'
      ELSEIF OS_NetRegOK( lFixIt )
         ? 'Registry set correctly for networking'
      ELSE
         ? 'Failed to set registry - May need "Administrator" rights'
      ENDIF
      ?
      IF .NOT. OS_NetVRedirOk( @nError )
         ? 'Invalid RVREDIR.VXD file installed'
         IF nError = 950
            ? 'You need file VREDRUPD.EXE if your vredir.vxd is dated "09:50:00"'
         ELSEIF nError == 1111
            ? 'You need file VRDRUPD.EXE if your vredir.vxd is dated "11:11:10"'
         ENDIF
       ENDIF

   RETURN

Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe