How do I call the Windows API? Just for reference.
How do I call the Windows API? Just for reference.
I tried this on the General board. I got a different anwer to my problem. However... I still want to know how to call it.
I thought you would be interested in the APIGuide..
[Edit]
..so sorry, but the only link I have seems to be outdated..
The APIGuide is no longer available(from that site..)
[Edit2]
http://www.soft-ware.net/hobby/programm ... pro=p03951
Select a DL-Mirror of your choice, the guide is in english
The link is okay, I just downloaded a more recent version than I already have..
regards
ytwinky
[Edit]
..so sorry, but the only link I have seems to be outdated..
The APIGuide is no longer available(from that site..)
[Edit2]
http://www.soft-ware.net/hobby/programm ... pro=p03951
Select a DL-Mirror of your choice, the guide is in english
The link is okay, I just downloaded a more recent version than I already have..
regards
ytwinky
Most windows API functions (and enums, types, constants, etc) are available in FreeBASIC by including the appropriate header files.
See the ./inc/windows.bi file and ./inc/win/ directory of your FreeBASIC installation.
An example from another post:
See the ./inc/windows.bi file and ./inc/win/ directory of your FreeBASIC installation.
An example from another post:
yetifoot wrote:i use a zstring as follows, to avoid having to Left(...) to get rid of nullsCode: Select all
#include "windows.bi"
Dim buffer As ZString * 1024
Dim buffersize As DWORD = 1024
If GetUserName(@buffer, @buffersize) = 0 Then
Print "Failed to obtain UserName"
Else
Print buffer
End If
Sleep
In the API Guide you have explanations, hints and examples, so it's a good overview, imho.
Of course you do not have a reference to all WinAPI-functions
(fyi: Copyright © The KPD-Team, 1998-2002), it is only a point to get started.
Look up a function in the API Guide and then use the appropriate FB-headers..
regards
ytwinky
Of course you do not have a reference to all WinAPI-functions
(fyi: Copyright © The KPD-Team, 1998-2002), it is only a point to get started.
Look up a function in the API Guide and then use the appropriate FB-headers..
regards
ytwinky
For a lot of things, it really is as simple as
#include "windows.bi"
then you can start using them.
For the last few years the only documentation I would recommend is MSDN.
http://msdn.microsoft.com/
#include "windows.bi"
then you can start using them.
For the last few years the only documentation I would recommend is MSDN.
http://msdn.microsoft.com/
Who is online
Users browsing this forum: No registered users and 4 guests