FoxAPI
Written 1999 by Christof Lange and Mark Wilden
Placed into Public Domain by The Foxpert!

INTRODUCTION	1
ACKNOWLEDGEMENTS	1
WHAT'S INCLUDED?	1
THE DOCUMENTATION	2
GETTING SUPPORT AND PROVIDING FEEDBACK	2
WINDOWS NT AND UNICODE	2
VISUAL FOXPRO 5.0 AND VISUAL FOXPRO 6.0	3
THE USUAL LEGAL STUFF	3
Introduction
Welcome to the world of API programming and structures! Many times I've heard from Visual FoxPro developers that API programming is difficult and using structures is virtually impossible. The latter is even more dissatisfying, since many Windows API functions make use of structures. If you look at the Solution.App that ships with Visual FoxPro, there's one sample for using structures, but it's almost impossible to understand and the principle used there doesn't apply to more complicated structures that have pointers or even include other structures.
With many Visual FoxPro developers I share the attitude that nothing is impossible in Visual FoxPro, especially not structures. The result is this class library. My goals were simple: Make using structures as easy as using objects. Anybody, who can create a class in Visual FoxPro, can also create and use structures. And I think, with this class library, I reached my goals. The class hides all the complexity that is involved in handling structures. And there is a lot going on under the hood. The struct class has to manage memory, handle pointers, convert VFP data types into binary C data types, and so on. But you don't need to know this if all you want to do is to use a structure in an API function.
Acknowledgements
I'd like to thank all the people that helped me developing this component. Sebastian Flucke gave me the initial idea to implement Struct. Mark Wilden did a lot of programming. A huge number of people asked question on the CompuServe VFOX forum that made me think of new samples and features to include into this component or tested the library. There are just too many of them to name them individually, so thanks to all of you!
What's included?
This package consists of several files:
 Readme.Doc, the file you are just reading,
 Struct.Doc, the documentation for the struct classes,
 Demo.Doc, a doc describing all the demo programs that are included,
 Version.Doc, a history of all modifications and enhancements,
 Struct.Vcx, the actual class library that lets you implement structures in your application,
 WinStruct.Vcx, a collection of several Windows structures, ready for use,
 ApiDef.Prg, a program that declares a number of API functions,
 ApiDef.H, several constants for API functions,
 ApiX.Prg, a procedure library with some utility functions for API programming,
 Convert.FLL, a Visual FoxPro library that handles conversion between VFP data types and C data types. The struct class calls it,
 StructMember.H, an include file that is used by the struct class,
 and several programs and forms that demonstrate the usage of the struct class.
The documentation
We are developers, and I know what developers think about documentation, but please do yourself a favor and at least check out some of the sample programs before you start using the struct class, and if possible, read the first chapters of the documentation, too. Otherwise the struct class could cause you a lot of grief, API function isn't as difficult as it is made, but it's not as easy, either. You can crash your application, if you pass the wrong parameters; and you definitely don't get the expected results, if you make a mistake.
Getting support and providing feedback
If you have any questions about the struct class, you can post these questions on the VFOX forum, the FOXUSER forum, section 9, and the FOXGER (German language) on CompuServe. In these fora I'm mostly active. You can also post questions about this class and API programming in general on the Universal Thread (www.universalthread.com) and on the Microsoft Visual FoxPro news groups. While I don't frequently monitor these fora, there are a lot of knowledgeable people out there that can answer your question.
Just like everybody else's code this class library is certainly not bug free, although I tried to test it intensively. If you find a bug, don't hesitate to send me an Email on 110213.1361@compuserve.com. Also, if you have any suggestions how I can improve these classes, or you have to share some structures or sample programs, please send them me via Email. I'd try to answer all question sent to me via Email that are related to the struct component, but please understand that I can't always answer questions that are beyond that scope, like questions about certain API functions.
I'm really interested in all sort of feedback you can offer me on this class. If you think there's something to improve, tell me about that. If you think this tool is great, or it's really horrible, share your feelings. I established a mailing list. If you want to receive a new version as soon as it is available, just send me a note, and I add you to the list.
Windows NT and UNICODE
This class library does support Windows NT. BUT, because I only run Windows 98 on my computers, I haven't tested it on Windows NT. I fixed some problems that some folk have reported during the beta cycle, but there might be further problems, especially when security structures come into play in the samples. UNICODE is supported in so far as there are data types for UNICODE structures and even an automatism to use different definitions on Windows NT and on Windows 9x. But, all strings are converted back to ANSI, in order to handle them properly in Visual FoxPro. This works well for all Western languages, but I apologize if this causes trouble for those of you that use Asian, Russian, Hebrew or any other international version of Windows and Visual FoxPro that doesn't rely on Latin characters. Since I couldn't install such a system (I won't be able to read it), I couldn't test it. If you are from such a country, please let me know what I have got to change in order to make it work for you, too.
Visual FoxPro 5.0 and Visual FoxPro 6.0
The Struct class library works with both versions of Visual FoxPro, but not with Visual FoxPro 3.0. The FindFiles.Prg samples requires Visual FoxPro 6.0, because it uses the extended DATETIME() function. All sources have been compiled in Visual FoxPro 6.0, because this is the most recent version of Visual FoxPro. When you are a Visual FoxPro 5.0 user, you must recompile the Struct.Pjx. Ignore any error that is reported during compiling. Don't worry, it's just that FoxTools.Fll is not included in the project and therefore those functions are not found. It's automatically located in the HOME() directory at runtime. If you get an error message that ccMemoryAddress cannot be found, you forgot to recompile the struct library.
The usual legal stuff
In the Visual FoxPro community there has always been a unique spirit of donating tools to the public. A lot of commonly used and great tools have been written by Visual FoxPro developers over the time and released into public domain. With this class library I'd like to continue this tradition and place the entire package into Public Domain. That means, you can use it in your application, no matter whether it's a private application or a commercial one, without paying royalties or a registration fee. If you like, you can modify the class to suit your needs. 
If you publish a modified version of these classes, I'd like you to ask for some things. First, please don't pretend that it's completely your work, but you won't do this anyway, right? Second, if any of the features you added could be of common interest, I'd like to implement it in my version, too. Also, if possible, please send me a copy of your modified version.
And finally, I'm not responsible for any damages that using this classes might cause. You use it on your own risk and you have to make sure that everything works as expected. API programming can crash your program and cause damage to the computer system, which might result in data loss and the need to re-install your operating system as well as all applications. Of course, I don't guarantee anything. Well, it's not as bad as it sounds, but you surely understand that I don't want to be made responsible for anything.
