(WINUDF('exe-name','parameter-list'))
(WINUDF('-exe-name','parameter-list'))
(WINUDF('+exe-name','parameter-list'))
(WINUDF('@dll-name','parameter-list'))
A new style of udf is available which should allow people to write UDF's in most any language they want. This results in a new function called WINUDF which has the same function parameters as the UDF function. The major difference is how R:BASE communicates with the WINUDF function. The exe program that WINUDF calls is passed one parameter which is the name of a file. This file has the parameters that should be passed to the WINUDF program. When the WINUDF program is completed, it is expected to write its results to the file that passed the original parameters.
Here are simple batch files that allow you to create WINUDF programs with at least 3 different C/C++ compilers. You could also use Visual Basic to create these new WINUDF's.
Using Visual Studio:
set path=c:\Program Files\Microsoft Visual Studio\VC98\Bin;c:\Program
Files\Microsoft Visual Studio\Common\MSDev98\Bin;%path%
set include=c:\Program Files\Microsoft Visual Studio\VC98\Include
set lib=c:\Program Files\Microsoft Visual Studio\VC98\Lib
cl /nologo /ML /W3 /Gm /GX /ZI /Od /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D
"_MBCS" /GZ /c DWRD.C
LINK /MAP:DWRD.MAP /SUBSYSTEM:CONSOLE DWRD.OBJ
Using Borland:
set path=c:\f\bcc55\bin;%path%
set include=c:\f\bcc55\include
set lib=c:\f\bcc55\lib
bcc32 -Ic:\f\bcc55\include -Lc:\f\bcc55\lib -M DWRD.C
Using Microsoft C:
set path=c:\f\msc6;C:\f\msc6\bin;c:\f\msc6\binb;%path%
set include=c:\f\msc6\include
set lib=c:\f\msc6\lib
ERASE SMALL.EXE
cl -c /Gc /Oas /AL /DLINT_ARGS DWRD.C
LINK @DWRD.LNK
EXEPACK DWRD.EXE SMALL.EXE
ERASE DWRD.EXE
REN SMALL.EXE DWRD.EXE
Examples:
SET VAR vTestA = (WINUDF('wscript.exe scrudf.vbs','The Power!'))
SET VAR vTestB = (WINUDF('wscript.exe scrudf.vbs','Oh Yes!'))