• Welcome to Powerbasic Museum 2020-B.
 

News:

Forum in repository mode. No new members allowed.

Main Menu

WinAPI-Library for PureBasic

Started by Theo Gottwald, February 29, 2016, 04:29:38 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Theo Gottwald

This library contains 1052 sample codes in PureBasic for WinAPI calls.
All of these is available in following languages:

  • German
  • English
  • Spanish
  • French


There are two versions:
Online: http://www.rsbasic.de/winapi-library
Offline: http://www.rsbasic.de/downloads/winapi_library.zip

Original Post in PureBasic Forum

Bob Houle

The nice thing about these samples, is that they are always available.

Simply add them to your templates in the IDE, and then double-click on the code you want 'injected' into your source.

Very handy.  ;D

blueb

Theo Gottwald

Sometimes a few screenshots or a more detailled explanation would be appreaciated,
so people can really also duplicate this what you write about.
How does that look?

Bob Houle

Okay...

Here's my PureBasic IDE.

I've chosen to place my 'ToolsPanel' on the left-side of the IDE (optional)
and have placed the WinAPI library inside my Templates folder.
As you can see, my Templates folder contains not only the WinAPI information
but much, much more. There about 1,000 code-snippets in the WinAPI folder alone,
so I think there may be 2,000 total in my Templates folder!

Notice the buttons at the top of my Templates Folder... you can add, edit,
deleted folders and snippets easily from here.

To demonstrate, I simply selected a function "determine menory" from the WinAPI
library and double-clicked on the function and it injected the code into my empty file.

As you can see from the code in the IDE, it uses the API to determine the memory of my machine.

HTH
blueb

Theo Gottwald

#4
Can you pack the code snippets and send them to me (or publish them here for anybody)?  :-)
I am just starting with PureBasic, and this looks like it could be helpful.

Bob Houle

Templates are simply code snippets you find handy.

You can determine your own hierarchy (folders) according to your needs.

I downloaded the http://www.rsbasic.de/winapi-library file a while back and converted it to English (it was German) and have added to it ever since.

I had asked a similar question on the forums about getting the format for this file but never got an answer, so as far as I know there is no way to do so.

The file is hiding in the '\Users\Bob\AppData\Roaming\PureBasic\Templates.prefs' directory, and it seems to be a readable string file, so parsing this file is certainly do-able.

For now the best thing is to download the WinAPI file and convert it to the language of your choice.

NOTE: Because this file is important... I do backup this folder often.

HTH