PDA

Click to See Complete Forum and Search --> : How do you get the Info?????


EzaBlade
Mar 12th, 2002, 04:16 AM
Lately I have begun to use API calls much more in my VB programming.

However, the really frustrating thing is actually finding out what things do!!!

For instance, I have just tried to use the SHBrowseForFolder API which relies on info passed to it in the BROWSEINFO udt. Now the BROWSEINFO variable structure has 8 parts, but the example I have managed to find only sets values for three of these, one of which I can do without.

I am sure that there are things I would be able to do with the resulting dialog box if I new what else the rest of the BrowseInfo structure does.

How can I get info on the BrowseInfo variable and it's constituent
parts without hoping to stumble on an example somewhere.

This has been my experience with all API functions.

It's a similar situation with Constants.

MerrionComputin
Mar 12th, 2002, 04:54 AM
The essential API toolkit:

First you're going to need to use the MSDN library (http://msdn.microsoft.com) to find out what API calls are available, what parameters they take and what special restrictions exist about their use.

Then you're going to need to download the (fairly large) platform SDK from the same site. This includes the header files for all the core windows dlls which allows you to find out about the constants and data strutures the calls expect.

Then you are going to need to beg,buy or steal a copy of The Visual Basic programmers guide to the Win32 API by Daniel Appleman (ISBN 1-56276-287-7). This is because the first two information sources are targetted at the C/C++ programmer and this book is the best resource for translating this to VB.

Using these I have put together an object model (the EventVB.dll (http://www.merrioncomputing.com/Download/index.htm)) for about 2000 of the most useful API calls which you are free to use/dissect as you wish.

Hope this helps,
Duncan

EzaBlade
Mar 12th, 2002, 06:08 AM
Brilliant!!! Thanks for the help.
:D :D :D :D :D :D :D :D :D :D :D