Hi Paul,
>Simulate them using VFP strings. You need to build the sructure piece by piece (and remember to convert all numbers into memory format). You can't have pointers inside the structures.
those of you that know me from CompuServe know that I'll contradict here. *g*
Of course you can have pointers in a structure, it's just a little more work, because you have to allocate memory yourself. To make this easier a long time ago I wrote a class that implements the struct type of C. Since I got pretty busy I still haven't finished it, but the current version deals nicely with pointers to strings inside a structure (the most common type of pointer in Windows programming). It has still some problems with pointers to arrays of pointers, though.
Since it's not finished yet, I hesitate to upload it to CompuServe or the UT, but anyone who's interested can get a copy of the current version by mail.
The SYSTEMTIME structure, for example, is defined like this:
Define Class SYSTEMTIME as cusStruct
nYear = 0
nMonth = 0
nDayOfweek = 0
nDay = 0
nHour = 0
nMinute = 0
nSecond = 0
nMilliSecond = 0
cMember = ;
"w:nYear, w:nMonth, w:nDayOfWeek,"+;
"w:nDay, w:nHour, w:nMinute, w:nSecond,"+;
"w:nMilliSecond"
Enddefine
You can call a function like this to get the current system time:
Declare GetLocalTime in Win32Api String@
oTime = CreateObject("SYSTEMTIME")
lcString = oTime.GetString()
GetLocalTime(@lcString)
oTime.SetString(lcString)
or to set the time:
Declare SetLocalTime in Win32Api String
oTime.nHour = 1
oTime.nMinute = 2
oTime.nSecond = 3
SetLocalTime( oTime.GetString() )
Christof
--
Christof