PDA

View Full Version : Windows API Call Database



Greg Sergeant
30-Mar-2005, 09:42 AM
This is a first attempt at a tool similar to the API Text Viewer that
comes with Visual Basic. It is a database containing over 55000 defined
constants, over 6500 function declarations and over 450 type definitions
and a viewer to search and view them.

I created conversion rules to convert a list in Visual Basic syntax to
Visual DataFlex syntax. The rules are not perfect so I know there are
some entries that are not perfect either. If you can find a consistent
problem with a conversion, let me know and I will attempt to adjust my
rules.

At some point, I plan to add the ability to type in a call (or type or
constant) in Visual Basic syntax and have a convert button to instantly
convert it to VDF with an option to add it to the database. Also I need
to add a facility to edit an existing entry and resave it. But before I
did those things, I thought I would share and see what everyone thought.

Thanks to Curtis Krauskopf of The Database Managers, Inc for hosting
this file for everyone. He did an excellent job with the webpage. Way
more than I expected. Also thanks for his suggestions to make the file
easier for people to download and use.

Here is a link to the webpage he created, with a screenshot, where it
can be downloaded...

http://www.decompile.com/dataflex/tips/winapi.htm

Please Note: The information in the API database is based on the work of
Michael Ciurescu. He is to receive all the credit for creating the
original list of types, constants and declarations in Visual Basic
syntax. His website is http://webmike.sytes.net

Greg

Vincent Oorsprong
30-Mar-2005, 01:08 PM
Greg,

Great!

The picture it looks like the tool generates DataFlex code. But the type
shown is the old (pre VDF11) syntax. Would be great if it generates new
code.

I also wonder where the information come from. I wonder if the source will
be updated enough and it does not run out of date soon.

--
Kind Regards,
Vincent Oorsprong
Data Access Europe BV
Lansinkesweg 4
7553 AE Hengelo
The Netherlands
Telephone: +31 (0)74 - 255 56 09
Fax: +31 (0)74 - 250 34 66
http://www.dataaccess.nl

Sture Andersen
30-Mar-2005, 02:19 PM
Greg and Curtis,

That is a very nice thing to have. Thanks!

I can see that you have compiled it under VDF 9, and I have just used VDF 11
without a problem so I assume that it works with every version between these
two.

-Sture

PS! I also find the www.decompile.com very professionally looking

Greg Sergeant
30-Mar-2005, 03:32 PM
Vincent-

We are still running under VDF9 so that is why I used that syntax. To
be honest, I am not even familiar with the VDF11 syntax. Is it only the
type declarations that have changed? How significant is the change, can
you give me an easy example? It might be an easy change for me.

Unfortunately, the source file I used will most likely not be updated.
The person that did this last updated it in 2002. So it is already
somewhat old. The good news is that my import could be used to add more
to the database if someone can find files of more examples in VB syntax.

That is also the reason I want to add a converter to the view. Then
people can easily get a VDF version of a new declaration by copying and
pasting in a VB example. Finding an example in VB is usually pretty
easy to do. Then just click a button to add it to the database for next
time.

Vincent Oorsprong wrote:

> Greg,
>
> Great!
>
> The picture it looks like the tool generates DataFlex code. But the type
> shown is the old (pre VDF11) syntax. Would be great if it generates new
> code.
>
> I also wonder where the information come from. I wonder if the source will
> be updated enough and it does not run out of date soon.
>

Greg Sergeant
30-Mar-2005, 03:34 PM
Sture-

The code should be compatible with all versions 9 and above. I used only
standard VDF controls.

Greg


Sture Andersen wrote:

> Greg and Curtis,
>
> That is a very nice thing to have. Thanks!
>
> I can see that you have compiled it under VDF 9, and I have just used VDF 11
> without a problem so I assume that it works with every version between these
> two.
>
> -Sture
>
> PS! I also find the www.decompile.com very professionally looking
>
>

Curtis Krauskopf
30-Mar-2005, 03:47 PM
Sture,

Thank you for the kudos about www.decompile.com. I've tried very hard to
create a site that is informative, educational, professional and
cross-browser compatible.

Curtis

"Sture Andersen" <sture.aps@mail.tele.dk> wrote in message
news:RrrQW1VNFHA.3628@dacmail.dataaccess.com...
> Greg and Curtis,
>
> That is a very nice thing to have. Thanks!
>
> I can see that you have compiled it under VDF 9, and I have just used VDF
11
> without a problem so I assume that it works with every version between
these
> two.
>
> -Sture
>
> PS! I also find the www.decompile.com very professionally looking
>
>

Vincent Oorsprong
31-Mar-2005, 01:11 AM
Greg,

In VDF11 the type declaration has been superceded with real struct support.

If you had:

TYPE tPOINT
Field tPOINT.x as DWORD
Field tPOINT.y as DWORD
END_TYPE

Your new code should be:

Struct tPoint
Dword x
Dword y
End_Struct

When using it you do not longer use the commands PUT, GETBUFF etc but just
the MOVE statement. As in:

tPoint Point NextPoint
Move 10 To Point.x
Move Point.x To NextPoint.x

Structs can have nested structs which is very common in type declarations.

The very good news about the structs is the debugger support. You can see
what is in each element and see it changing.

--
Kind Regards,
Vincent Oorsprong
Data Access Europe BV
Lansinkesweg 4
7553 AE Hengelo
The Netherlands
Telephone: +31 (0)74 - 255 56 09
Fax: +31 (0)74 - 250 34 66
http://www.dataaccess.nl

Greg Sergeant
31-Mar-2005, 11:07 AM
Wow, seems like a huge improvement to VDF. I have incorporated Structs
into the database. So now you can choose whether you want Types or
Structs. I also fixed a problem I found with some Byte type
conversions. Sometime soon I will upload a new version for Curtis and I
will post back that it is available.

Thanks
Greg


Vincent Oorsprong wrote:
> Greg,
>
> In VDF11 the type declaration has been superceded with real struct support.
>
> If you had:
>
> TYPE tPOINT
> Field tPOINT.x as DWORD
> Field tPOINT.y as DWORD
> END_TYPE
>
> Your new code should be:
>
> Struct tPoint
> Dword x
> Dword y
> End_Struct
>
> When using it you do not longer use the commands PUT, GETBUFF etc but just
> the MOVE statement. As in:
>
> tPoint Point NextPoint
> Move 10 To Point.x
> Move Point.x To NextPoint.x
>
> Structs can have nested structs which is very common in type declarations.
>
> The very good news about the structs is the debugger support. You can see
> what is in each element and see it changing.
>