Article ID: 102467
Article Last Modified on 7/13/2004
SET LIBRARY TO SYS(2004) + "FOXTOOLS.FLL" ADDITIVE
GetSysDir = RegFn("GetSystemDirectory","@CI","I")
bigstr = REPLICATE(chr(0),144) &&creates a big string
retlen = CallFn(GetSysDir, @bigstr,144)
winsys = LEFT(bigstr,retlen)
SendMail=RegFn("MAPISendDocuments","L@C@C@CL", ;
"L", winsys+"\MAPI.DLL")
T1=";"
T2="C:\AUTOEXEC.BAT"
T3=""
X=CallFn(SendMail,0,@T1,@T2,@T3,0)
RELEASE LIBRARY SYS(2004) + "FOXTOOLS.FLL"
GetSystemDirectory() is a Microsoft Windows application programming
interface (API) function used to retrieve the Windows SYSTEM
subdirectory. RegFn() returns a function handle to GetSysDir so that
the handle can be accessed by CallFn(). CallFn() is used to determine
the length of GetSysDir and assigns the numeric value to retlen. It
also puts the string value of GetSysDir in the variable bigstr. At
this point, the location of the MAPI.DLL file is known, and the
MAPISendDocuments() function is used to send a standard Microsoft Mail
message.
Keywords: kbhowto kbinterop KB102467