PC SOFT
ONLINE REPOSITORY
FOR WINDEVWEBDEV AND WINDEV MOBILE

Home |  | Sign in | English US
WD Control Panel - Painel de Controle
Published by Boller
in the category Tools
New features



Description




// Copy the .cpl file to the "System32" directory
IF gbCopyCPl(gsFileCpl, gsSysFileCpl, gsControlIni) = False THEN
RETURN
END

// Write the information to the gsSysFileIni file
IF gbWriteIniInfo(gsSysFileIni) = False THEN
RETURN
END

Info("The shortcut of the executable was created in the control panel." + CR + "Restart Windows")



PROCEDURE gbWriteIniInfo(sFileIni)
// Procedure used to write the information regarding the exe into the .ini file
// INPUT: sIniFile: Name of the .ini file containing the setup parameters of the exe

nSection is int = 0

// Check whether the file exists
IF fDir(sFileIni, frFile) = "" THEN
// The file does not exist: create it
// Create the sIniFile file
IF fCreate(sFileIni) = -1 THEN
// Problem while creating the file
Error("The file " + sFileIni + " cannot be created")
RESULT False
END
END

// Count the number of sections found in the sIniFile file
IF NOT gbCounterSection(sFileIni, nSection) THEN RESULT False

// Write the application parameters into the sFileIni file
INIWrite("WDCPanel_"+(nSection), "Name", gsName, sFileIni)
IF ErrorOccurred THEN
Error("Unable to write into the file " + sFileIni)
RESULT False
ELSE
INIWrite("WDCPanel_"+(nSection), "Info", gsComments, sFileIni)
INIWrite("WDCPanel_"+(nSection), "Exe", gsPathEXE, sFileIni)
END

// The information was successfully written
RESULT True

Illustrations, screen shots
none
none
User reviews
(To evaluate this resource, click 'Write a review')
No review or comment? Be the first one!