Author Topic: WinAPI-Library for PureBasic  (Read 5491 times)

0 Members and 1 Guest are viewing this topic.

Offline Theo Gottwald

  • Administrator
  • Hero Member
  • *****
  • Posts: 935
  • User-Rate: +30/-4
    • it-berater
WinAPI-Library for PureBasic
« on: February 29, 2016, 04:29:38 PM »
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

Offline Bob Houle

  • Newbie
  • *
  • Posts: 41
  • User-Rate: +3/-3
  • "It was too lonely at the top."
Re: WinAPI-Library for PureBasic
« Reply #1 on: March 01, 2016, 12:28:30 AM »
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

Offline Theo Gottwald

  • Administrator
  • Hero Member
  • *****
  • Posts: 935
  • User-Rate: +30/-4
    • it-berater
Re: WinAPI-Library for PureBasic
« Reply #2 on: March 01, 2016, 10:03:08 AM »
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?

Offline Bob Houle

  • Newbie
  • *
  • Posts: 41
  • User-Rate: +3/-3
  • "It was too lonely at the top."
Re: WinAPI-Library for PureBasic
« Reply #3 on: March 01, 2016, 04:21:49 PM »
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

Offline Theo Gottwald

  • Administrator
  • Hero Member
  • *****
  • Posts: 935
  • User-Rate: +30/-4
    • it-berater
Re: WinAPI-Library for PureBasic
« Reply #4 on: March 01, 2016, 06:04:55 PM »
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.
« Last Edit: March 01, 2016, 06:06:51 PM by Theo Gottwald »

Offline Bob Houle

  • Newbie
  • *
  • Posts: 41
  • User-Rate: +3/-3
  • "It was too lonely at the top."
Re: WinAPI-Library for PureBasic
« Reply #5 on: March 04, 2016, 04:49:59 PM »
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