Results 1 to 4 of 4

Thread: win32api module

  1. #1

    win32api module

    I have trouble understanding the win32api.inc file. I would like to suggest that someone might make a module to make using the function...alias a little bit easier.

    If anyone would like to try this I sure would appreciate it.

    Thanks
    Sandy

  2. #2
    thinBasic MVPs
    Join Date
    May 2007
    Location
    UK
    Posts
    1,427
    Rep Power
    159

    Re: win32api module

    the best way to understand the functions in win32api.inc is to lookup the function on msdn.


    Update fixed spelling
    Home Desktop : Windows 7 - Intel Pentium (D) - 3.0 Ghz - 2GB - Geforce 6800GS
    Home Laptop : WinXP Pro SP3 - Intel Centrino Duo - 1.73 Ghz - 2 GB - Intel GMA 950
    Home Laptop : Windows 10 - Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz, 2401 Mhz, 2 Core(s), 4 Logical Processor(s) - 4 GB - Intel HD 4400
    Work Desktop : Windows 10 - Intel I7 - 4 Ghz - 8GB - Quadro Fx 370

  3. #3
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10

    Re: win32api module

    WIN32API.INC file is produced by Power Basic and (c) by Power Basic.
    We cannot use it directly but we have to rewrite our DECLAREs following thinBasic syntax, that is very very close to Power Basic one and to other basic like FreeBasic.

    WIN32API.INC contains almost all functions (API functions) exported by the main operating system dll plus a lot of structures used by the same API functions.

    As Abraxas correctly stated, the best way to understand them is to use Microsoft MSDN documentation. To find info about an API fucntion, the way I use is to go to Google searching for the function name followed by the word "function" followed by the word "msdn", all connected with a "+" sign (that means "AND"). In this way, 99% of the times the first link returned by Google is Microsoft documentation.

    For example to seach for "GetLogicalDriveStringsA" API function, go to www.google.com and enter:
    +GetLogicalDriveStringsA +function +msdn

    All new Microsoft documentation is under http://msdn2.microsoft.com

    During functions study you will need some info about data type of function parameters. Most of the time documentation reports syntax from C or C++. So this link can help you to better understand C/C++ data types used in Windows API documentation: http://msdn2.microsoft.com/en-us/library/aa383751.aspx

    Ciao
    Eros
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  4. #4
    thinBasic MVPs
    Join Date
    May 2007
    Location
    UK
    Posts
    1,427
    Rep Power
    159

    Re: win32api module

    thanks for the link about datatypes I am sure that will come in handy.

    Home Desktop : Windows 7 - Intel Pentium (D) - 3.0 Ghz - 2GB - Geforce 6800GS
    Home Laptop : WinXP Pro SP3 - Intel Centrino Duo - 1.73 Ghz - 2 GB - Intel GMA 950
    Home Laptop : Windows 10 - Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz, 2401 Mhz, 2 Core(s), 4 Logical Processor(s) - 4 GB - Intel HD 4400
    Work Desktop : Windows 10 - Intel I7 - 4 Ghz - 8GB - Quadro Fx 370

Members who have read this thread: 1

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •