Lib2PBImport Version 1.2

Developed or developing a new product in PureBasic? Tell the world about it.
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

Small Update:

drop support for libfile
unusable symbols removed ("__imp")
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

r_hyde wrote:
@r_hyde: excuse the dumb ass question! Are you per-chance the R. Hyde of HLA fame?
Sorry, no. It's not the first time I've been asked, either, since I usually go by r. hyde (or similar) and in programming circles the question does occasionally come up. Would that I had but a fraction of that *other* r. hyde's talent!
:D
I may look like a mule, but I'm not a complete ass.
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

Update:
parameters in grid to combobox
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

Update:

+ Open Project
+ Save Project
+ Drop Support for Projectfile
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
Denis
Enthusiast
Enthusiast
Posts: 778
Joined: Fri Apr 25, 2003 5:10 pm
Location: Doubs - France

Post by Denis »

Hi ts-soft

nice tools indeed. I get it.

will it be possible to add in generated import code, test(s) for unicode/ainsi to get the same function name with ainsi/unicode (a checkbox or something like that will be great to generate code by this way)

this is some code i use to import some functions from "Winspool.lib"

Code: Select all

Import "Winspool.lib" ;{
 CompilerIf #PB_Compiler_Unicode
    GetDefaultPrinter(*name, stringsize.l) As "_GetDefaultPrinterW@8"
    OpenPrinter(*pPrinterName, *phPrinter, *pDefault.PRINTER_DEFAULTS) As "_OpenPrinterW@12"
  CompilerElse
    GetDefaultPrinter(*name, stringsize.l) As "_GetDefaultPrinterA@8"
    OpenPrinter(*pPrinterName, *phPrinter, *pDefault.PRINTER_DEFAULTS) As "_OpenPrinterA@12"
  CompilerEndIf

EndImport ;}
A+
Denis
Denis
Enthusiast
Enthusiast
Posts: 778
Joined: Fri Apr 25, 2003 5:10 pm
Location: Doubs - France

Post by Denis »

ts-soft

i found some problems with number of parameters

take a closer look

Code: Select all

Import "ole32.lib"
  CoGetInstanceFromFile() As "_CoGetInstanceFromFile@32"
  CoGetInstanceFromIStorage() As "_CoGetInstanceFromIStorage@28"
EndImport
CoGetInstanceFromFile must have 8 parameters etc.

Another thing

is-it possible to add to the menu an item :

Open lib from PB

to load directly from Directory : Purelibraires\Windows\Libraries
A+
Denis
Tipperton
Addict
Addict
Posts: 1286
Joined: Thu Jun 19, 2003 7:55 pm

Re: Lib2PBImport Version 1.0

Post by Tipperton »

Thanks, ts-soft!

This should be very useful for my current project!
ts-soft wrote:Unix is user friendly... it's just selective about who its friends are!
And thanks for this too! I got a good laugh out of it! :mrgreen:
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

@Denis
I will add an optional function to generate Macros like:

Code: Select all

Import "Winspool.lib" ;{
    GetdefaultprinterW(*name, stringsize.l) As "_GetDefaultPrinterW@8"
    GetdefaultprinterA(*name, stringsize.l) As "_GetDefaultPrinterA@8"
EndImport ;} 

Macro Getdefaultprinter(a,b)
  CompilerIf #PB_Compiler_Unicode
    GetdefaultprinterW(a,b)
  CompilerElse
    GetdefaultprinterA(a,b)
  CompilerEndIf
EndMacro
I will check the count of parameters for stdcall.

>> Open lib from PB
will do :wink:

@all
thx for testing
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
Denis
Enthusiast
Enthusiast
Posts: 778
Joined: Fri Apr 25, 2003 5:10 pm
Location: Doubs - France

Post by Denis »

:D
A+
Denis
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

Small Update:

+ fixed parametercount
+ Open Lib from PB (ctrl+P)
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
Denis
Enthusiast
Enthusiast
Posts: 778
Joined: Fri Apr 25, 2003 5:10 pm
Location: Doubs - France

Post by Denis »

ts-soft wrote:Small Update:

+ fixed parametercount
+ Open Lib from PB (ctrl+P)
Tks ts-soft

+ fixed parametercount --> seems to be Ok
+ Open Lib from PB (ctrl+P)[/quote] --> usefull (unless for me)
A+
Denis
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

Small Update:

+ CodeView uses Colors from PB-IDE, if found
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

Update:

+ SplitView for CodeView
+ Save-Button for CodeView
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

ts-soft wrote:@Denis
I will add an optional function to generate Macros like:
done :D

Creates optional Macros for Unicode/Ansi
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
Denis
Enthusiast
Enthusiast
Posts: 778
Joined: Fri Apr 25, 2003 5:10 pm
Location: Doubs - France

Post by Denis »

Thks ts-soft

that's Ok

And is it possible to display (on titlebar or statusbar) number of functions/selected functions
A+
Denis
Post Reply