Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why VFP
Message
 
To
24/11/1999 06:44:49
Walter Meester
HoogkarspelNetherlands
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00294419
Message ID:
00295048
Views:
27
Hi Walter,

>Do you see any posibility to improve Pointer handling within VFP?

You mean something like native pointer support in VFP? Technically, this can be done by Microsoft, but they won't do it. Reasons are that VFP is placed a middle-tier tool for COM server, that has nothing to do with API programming. It's a high level language, adding pointers and along with them strict typing and direct memory access would not serve this goal, and it would make the language more difficult. Even the widely used VB had to wait until version 5 before they got an AddressOf operator and native compiled code, and VB programs have much more need for such tools than a typical VFP application.

>OIW in what way could the struct class be improved ?

Oh, I've many ideas. *g* The latest addition were sychnorized structures. These are structures that are always in sync with the memory image of the structure. I don't think many folks will need it *g*, but I used it to write an application that communicates with a Delphi application via shared memory, file mapping, sempahores and MUTEXs. I doubt that this is the typical use of my class, though. ;)

Other things to come in future releases are for example automatic alignment of the structure to avoid having to insert dummy properties. Maybe more conversion routines, more utilities, more documentation, any whatever I get as suggestions.

>I for one, think that it might be handy if the struct class could import C/C++ header files to automaticly determine the internal structure, which is indeed one of the major drawbacks at the moment.

I thought about this, but had to give this up. The problem is that C++ header files are too complex to be processed automatically, not only because type declaration can be recursive, but also because I would have to write a parser for C datatypes and because a header file typically includes many conditional declarations that depend on constants defined by the compiler or set up in the make file.

The next version contains a DECLARE.H file, which maps most C data types to the ones used in the VFP DECLARE command, but even here I encounter problems when a string can either be understood as an address (INTEGER) or as a string (STRING). Also, the next version contains several hundred API declaration that you can easily incoporate into your application.

Christof
--
Christof
Previous
Reply
Map
View

Click here to load this message in the networking platform