***************************************************************************** * * GCI.NTEDL.B - edit the GCI library list for uniVerse on Windows NT * * Module %M% Version %I% Date %H% * * (c) Copyright 1998 Ardent Software Inc. - All Rights Reserved * This is unpublished proprietary source code of Ardent Software Inc. * The copyright notice above does not evidence any actual or intended * publication of such source code. * ******************************************************************************* * * Maintenance log - insert most recent change descriptions at top * * Date.... GTAR# WHO Description......................................... * 10/14/98 23801 SAP Change copyrights. * 04/03/96 18026 PGW Module created. * ******************************************************************************* * * This program allows the administrator to edit the list of standard DLLs * that uniVerse keeps in the Windows NT Registry. It is normally run * from the GCI.ADMIN menu, but you can run it by hand as follows: * * RUN APP.PROGS GCI.NTEDL.B * * The program copies the library list from the registry to a temporary file, * invokes ED, and when ED has finished, copies the library list back to * the registry. * ******************************************************************************* * $OPTIONS DEFAULT PROGRAM GCI.NTEDL.B ID = "@(#)%M% %I%" $INCLUDE UNIVERSE.INCLUDE FILENAMES.H $INCLUDE UNIVERSE.INCLUDE MACHINE.NAME * DECLARE GCI UVREGgetstring DECLARE GCI UVREGputstring DECLARE GCI NTerrtext EQUATE bell TO CHAR(7) EQUATE system.lib.list TO "UvGCILibraries" * Win32 error code EQUATE error.file.not.found TO 2 EQUATE edit.temp.file TO "&UFD&" EQUATE edit.temp.record TO "gci.library.list" PROMPT "" cl = @(-4) cl.err = @(0,23):cl err = cl.err:bell msg10 = err:PROD.NAMEU:' General Calling Interface is not installed.' failure.message = "GCI Library List not updated." OPEN '','DATA.TYPES' TO file.data.types ELSE PRINT msg10: INPUT q: ; PRINT cl.err: ; STOP END OPEN '', edit.temp.file TO temp.file ELSE PRINT 'Cannot open the file "' : edit.temp.file : '".' PRINT failure.message STOP END PRINT @( -1 ) PRINT @( 0, 0 ):"General Calling Interface Administration" : @( 67, 0 ) : "GCI.NTEDL.B": PRINT @( 17, 1): 'Edit the Standard GCI Library List': PRINT @( 0, 2 ): STR( "-", 79 ): PRINT @( 0, 4 ): * Get the system library list from the registry, to be updated lib.list = "" lib.type = 0 rslt = UVREGgetstring(system.lib.list, lib.list, lib.type) IF rslt # 0 THEN IF rslt = error.file.not.found THEN lib.list = "" END ELSE PRINT "Error ":rslt:" reading the system registry:" dummy = NTerrtext(rslt, err.text) IF LEN(err.text) > 0 THEN PRINT err.text END PRINT failure.message STOP END END * Write it out, and edit it CONVERT ";" TO @FM IN lib.list WRITE lib.list ON temp.file, edit.temp.record ELSE PRINT 'Cannot write to "' : edit.temp.file : '".' PRINT failure.message STOP END EXECUTE "ED " : edit.temp.file : " " : edit.temp.record * +++ Error checking? * Read it back in, and update the registry READ lib.list FROM temp.file, edit.temp.record ELSE PRINT 'Cannot read "':edit.temp.record:'" from "':edit.temp.file:'".' PRINT failure.message STOP END CONVERT @FM TO ";" IN lib.list rslt = UVREGputstring(system.lib.list, lib.list) IF rslt # 0 THEN PRINT "Error ":rslt:" updating the system registry:" dummy = NTerrtext(rslt, err.text) IF LEN(err.text) > 0 THEN PRINT err.text END PRINT failure.message STOP END * Done PRINT "Standard GCI Library List successfully updated." STOP END