Sys(3004), Sys(3005), Sys(3006)
These functions
are relevant only if you need to deal with localized versions of
applications, something we have no experience with. When you want
FoxPro to talk to, say, the French version of Excel via OLE, you
have to tell OLE what language you're sending the commands in.
Usage
|
cLocale = SYS( 3004 )
cResult = SYS( 3005, nLocaleId )
cResult = SYS( 3006, nLanguageId )
|
SYS(3004) tells you what language OLE currently expects.
SYS(3005) lets you change that language. Its nLocaleId parameter
is the same as the cLocale return value of SYS(3004) except for
the data type. Seems pretty dumb for one to return character
while the other expects numeric, but we've noticed that something
in the SYS() engine seems to always prefer character
returns.SYS(3006) is a little more complex and is not for the
faint-hearted. nLanguageId is a code based on both the language
and the sort order. We don't think it's an accident that the
codes are not included in Help. This is the kind of stuff usually
only C programmers mess with. We went looking for them and
eventually found them in the Developer's Library buried in
information on the Win32 Software Development Kit. Microsoft
recommends you switch these settings using DefOLELCID instead.
We're in pretty much over our heads here, so we're inclined to go
along with them.It's pretty odd to have SYS() functions that
actually change something, not just return information, but we
suspect the idea here was to bury these where only the folks who
really need them would find them.Both SYS(3005) and SYS(3006)
return the empty string.
Example
|
? SYS(3004) && Returns 1033, the code for English
|
Back to Table of Contents
Copyright © 2002-2018 by Tamar E. Granor,
Ted Roche, Doug Hennig, and Della Martin. Click for license
.