[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference utrop1::linkworks_v3

Title:LinkWorks V3.0 Notes Conference
Notice:LNX_APO = APO issues, LINKWORKS_V3 = V3.0 issues
Moderator:tacklr.apd.dec.com::TACK_Lm::TACK_L
Created:Tue Jun 28 1994
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2269
Total number of notes:8338

1922.0. "where is lnxstr32.dll" by BULAN::dcw065.soo.dec.com::nystrom_c () Wed Oct 09 1996 16:01

T.RTitleUserPersonal
Name
DateLines
1922.1on the ijsaplmaandaj.uto.dec.com::UTROP1::maandag_jWed Oct 09 1996 17:194
1922.2Thanks!BULAN::dcw065.soo.dec.com::nystrom_cThu Oct 10 1996 10:471
1922.3Compact doc (cut & paste from .C) - corrections welcomeKETJE::HAENTJENSBeware of CounterfeitMon Mar 17 1997 16:09187
LNXSTR compact documentation

Note that some functions 'Fff' are renamed 'FffX' for WIN32.

Strings are null-terminated. DateTime strings are specified in LinkWorks 
format (according to the "win.ini" settings).

EXAMPLE of using a function in a Class Programming method:

	Object::LNXSTR02:GetFileSize(Type path, Type objsize)
	{
	Integer rc;

	rc=extern access MLOC_LOCAL(path, objsize)
	   for WSTYPE_DOSWIN = MEXT_DLL
		 ("\"lnxstr02.dll\".GetFileSize(IN String, OUT Integer)")
	   for WSTYPE_W95W32 = MEXT_DLL
		 ("\"lnxstr32.dll\".GetFileSizeX(IN String, OUT Integer)")
	   for WSTYPE_NTIW32 = MEXT_DLL
		 ("\"lnxstr32.dll\".GetFileSizeX(IN String, OUT Integer)");
	}


Non-obsolete functions in alphabetical order:

CreateDir		(IN String path, OUT String success)

	Create a directory (all levels will be created).
	Return "True" if OK, "False" if the directory could not be created.

DateCompare		(IN String date1, date2, OUT Integer result)

	Compare two DateTime strings.
	Return 0 for equal, negative if date1 < date2, positive otherwise.
	The absolute value of a non-zero result shows where the difference
	occurs: 1= year, 2= month, 3= day, 4= hour, 5= minute, 6= second.

DateCurrent		(OUT[] String date,
			 IN Integer days=0, hours=0, minutes=0, seconds=0)

	Return the current date & time plus (or minus if negative)
	the specified number of days, hours, minutes and seconds.

DecryptFile		(IN[] String path, OUT Integer result)

	Decrypt the file. (See EncryptFile.)

EncryptFile		(IN[] String path, OUT Integer result)

	Encrypt the file using the algorithm byte[i] = 255 - byte[i].
	Return 0 for OK, 1 if the file cannot be opened.

FileExists		(IN String path, OUT String success)

	Check whether the file exists.
	Return "True" if the file exists, "False" otherwise.

FormatIntegers		(OUT[] String msg, IN String format, 
			 IN Integer i1=0, i2=0, i3=0, i4=0, i5=0)

	Format up to 5 integers into msg (with the C-function wsprintf). 
	In the format, use  e.g. '%ld' to insert an integer.
		
FormatStrings		(OUT[] String msg, IN String format,
			 IN String s1, s2=nil, s3=nil, s4=nil, s5=nil)

	Format up to 5 strings into msg (with the C-function wsprintf). 
	In the format, use e.g. '%s' to insert a string.
	Specify OUT instead of IN if some string sx is nil (???).

GetEnvironmentVariable[X]	(IN String var, OUT[] String value,
				 OUT Integer result)

	Get the value of the specified environment variable.
	Return 0 for OK, 1 if the environment variable does not exist.

GetFileSize[X]		(IN String path, OUT Integer objsize)

	Return the file-size (in bytes) of the specified file.
	Return 0 if the file cannot be opened.
	(Cannot be used if the file is opened via the ILockBytes interface.)

GetPrivProfileInt	(IN String filename, section, entry,
			 IN Integer default, OUT Integer value)

	Retrieve an integer-item from an ".ini" file.

GetPrivProfileString	(IN String filename, section, entry,
			 IN String default, OUT[] String value)

	Retrieve a string-item from an ".ini" file.

GetTicks		(OUT Integer result)

	Return the number of milliseconds elapsed since Windows was started.

IntegerToString		(IN Integer i, OUT[] String str)

	Convert an integer to a string.

LockDLL			()

	Lock this DLL in memory. (Improves performance up to 6 times.)
	(LinkWorks normally gives a Load and Free for each call.)

PathConvert		(OUT[] String tostr, IN String fromstr)

	Convert a path to a real filename for the current client PC.
	The following conversions are handled:
	 <windows>: is replaced by the windows directory
	 <windows-system>: is replaced by the windows system directory
	 <lnx>: is replaced by the LinkWorks directory

SetPrivProfileInt	(IN String filename, section, entry,
			 IN Integer value, OUT Integer result)

	Assign an integer-value to an entry in a ".ini" file.
	Return 0 for OK or the error code from WritePrivateProfileString. 

SetPrivProfileString	(IN String filename, section, entry,
			 IN String value, OUT Integer result)

	Assign a string-value to an entry in a ".ini" file.
	Return 0 for OK or the error code from WritePrivateProfileString. 

SetSystemDateTime	(IN String date)

	Set the Date and Time of client PC (e.g. to synchronise with server).

ShowMessage		(IN String msg, IN String title, OUT Integer result)

	Display a message in a POPUP window with OK and Cancel buttons.
	Return 1 for Cancel (or ESC button), 2 for OK.

SplitPath		(OUT[] String dir, file, IN String path)

	Split up a filename in a directory part and a filename part.
	e.g. C:\LNX\APO\ADC.EXE -> directory: C:\LNX\APO, file: ADC.EXE

StartTool		(IN String command, OUT Integer result)

	Start a Windows application asynchronously.
	(MEXT_COMMANDLINE starts applications synchronously.)
	Return 0 if OK, 1 if the aplication cannot be started.

StringCompare		(IN String str1, str2, OUT Integer result)

	Compare two strings (with the C-function strcmp).
	Return 0 for equal, negative if str1 < str2, positive otherwise.

StringConcatenate	(INOUT[] String str1, IN String str2)

	Append the second string to the first string.
	Note: The same can be achieved using 'FormatStrings'

StringConcatenate2	(INOUT[] String str1, IN String str2, str3)

	Append the second and third string to the first string.
	Note: The same can be achieved using 'FormatStrings'

StringLength		(IN String str, OUT Integer len)

	Return the length of the string.

StringSearch		(IN String str, IN String text, OUT Integer offset)

	Search for a text within the string.
	Return the offset of the text in the string (>=0).
	Return -1 if the text does not occur in the string.

StringToInteger		(IN String str, OUT Integer i)

	Convert a string to an integer (with the C-function atoi).

SubString		(IN String str, IN Integer offset=0,
			 IN Integer length=0, OUT[] String newstr)

	Copy a sub-string into a new string (offset starts at 0).
	Copy upto the end of the string if length=0.
	Note: use this function to convert a LinkWorks string MYSWC:MyString 
	to a real string.

UnLockDLL		()

	UnLock this DLL in memory.