You are on page 1of 2

Usage: Call SetGlobal(customer,gCUSTOMER) Function Definition Public Function setGlobal (par_name, par_value) Dim rc Extern.Declare micInteger,"WritePrivateProfileStringA", "kernel32.

dll","WritePrivateProfileStringA", micString, micString, micString, micString rc = Extern.WritePrivateProfileStringA("PARAMS",par_name,par_value, gPARFILENAME ) End function WritePrivateProfileString: external procedure in a dynamic-link library (DLL). kernel32.dll Extern Object Enables you to declare calls to external procedures from an external dynamic-link library (DLL). Declare Method Declares references to external procedures in a dynamic-link library (DLL). Once you use the Declare method for a method, you can use the Extern object to call the declared method.
Syntax

Extern.Declare(RetType, MethodName, LibName, Alias [, ArgType(s)])


If the function successfully copies the string to the initialization file, the return value is nonzero If the gPARFILENAME parameter does not contain a full path and file name for the file, WritePrivateProfileString searches the Windows directory for the file. If the file does not exist, this function creates the file in the Windows directory. If gPARFILENAME contains a full path and file name and the file does not exist, WritePrivateProfileString creates the file. The specified directory must already exist.

You might also like