Denis
Lib2PBImport Version 1.2
Small Update: (1.2)
Added a Statusbar with UnDecorateSymbolName of C++ Symbols, if selected
This is only usefull for c++ programmer
Added a Statusbar with UnDecorateSymbolName of C++ Symbols, if selected
This is only usefull for c++ programmer
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.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Macros only if checked and on stdcall libs by ms, kernel32.lib for example
Most libs doesn't have ansi and unicode versions with A or W at the end.
Most libs doesn't have ansi and unicode versions with A or W at the end.
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.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Ahhhh...OK I see. I was confused as the information in the thread seemed to indicate that macros could be produced from any converted .lib, thanks ts-soft. Its a very nice tool. 
ts-soft wrote:Macros only if checked and on stdcall libs by ms, kernel32.lib for example
Most libs doesn't have ansi and unicode versions with A or W at the end.
Small Update
Missing CloseFile() added
Missing CloseFile() added
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.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

I will upload it on my new webspace, next days, sry ...Tipperton wrote:Is this still available?
Download link in first post returns 404 file not found.
Thanks!
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.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

New download link on first post (no changes!)
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.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

- Kwai chang caine
- Always Here

- Posts: 5502
- Joined: Sun Nov 05, 2006 11:42 pm
- Location: Lyon - France
Re: Lib2PBImport Version 1.2
Thanks TS-Soft for this useful tools
But i have a little problem
Is it normal that when i have a procedure with string parameter, your tools create a integer parameter for the same procedure
But i have a little problem
Is it normal that when i have a procedure with string parameter, your tools create a integer parameter for the same procedure
Code: Select all
Import
Function(a.l) As "_Function@4"
EndImport
Procedure Function(Parameter.s)
..
..
..
End Procedure
The happiness is a road...Not a destination
Re: Lib2PBImport Version 1.2
Kwai,
import libraries do not generally hold information regarding the types of individual parameters (C++ name mangling aside!).
The only information which can be obtained from a PB generated import library is the number of parameters taken by individual functions.
All you have to do is modify the code generated by ts-soft's tool yourself as appropriate.
import libraries do not generally hold information regarding the types of individual parameters (C++ name mangling aside!).
The only information which can be obtained from a PB generated import library is the number of parameters taken by individual functions.
All you have to do is modify the code generated by ts-soft's tool yourself as appropriate.
I may look like a mule, but I'm not a complete ass.
- Kwai chang caine
- Always Here

- Posts: 5502
- Joined: Sun Nov 05, 2006 11:42 pm
- Location: Lyon - France
Re: Lib2PBImport Version 1.2
Hello MASTER glad to talk to you, there is a long time 
I suppose you are in vacancy without KCC
But it's finish......i'm here
I have like usually several questions
1/ Am i forced to write this As "_Function@X" after each fonction,
or just this is sufficient ?? :roll:
2/If i want return a string value from my DLL and want use import/endimport
This code is the more simple to do this ??? :roll:
I suppose you are in vacancy without KCC
But it's finish......i'm here
I have like usually several questions
1/ Am i forced to write this As "_Function@X" after each fonction,
Code: Select all
Import "Dll.lib"
Function(a.s) As "_Function@X"
EndImportCode: Select all
Import "Dll.lib"
Function(a.s)
EndImportThis code is the more simple to do this ??? :roll:
Code: Select all
Import "Dll.lib"
MyFunctionInTheDll(a.s)
EndImport
Procedure.s MyFunctionInExe(Sentence.s)
ProcedureReturn PeekS(MyFunctionInTheDll(Sentence))
EndProcedure
Debug MyFunctionInExe("Hello Kcc")
The happiness is a road...Not a destination
Re: Lib2PBImport Version 1.2
For STDCALL dll's, either would be fine (at least with PB x86). I always use the first so that I know where I stand.Kwaï chang caïne wrote:1/ Am i forced to write this As "_Function@X" after each fonction,or just this is sufficient ?? :roll:Code: Select all
Import "Dll.lib" Function(a.s) As "_Function@X" EndImport
Code: Select all
Import "Dll.lib" Function(a.s) EndImport
Yes providing the dll returns a global or static string. This is not a threadsafe way of doing it though. Use buffers to be absolutely safe.2/If i want return a string value from my DLL and want use import/endimport
This code is the more simple to do this ??? :roll:
Code: Select all
Import "Dll.lib" MyFunctionInTheDll(a.s) EndImport Procedure.s MyFunctionInExe(Sentence.s) ProcedureReturn PeekS(MyFunctionInTheDll(Sentence)) EndProcedure Debug MyFunctionInExe("Hello Kcc")
I may look like a mule, but I'm not a complete ass.
- Kwai chang caine
- Always Here

- Posts: 5502
- Joined: Sun Nov 05, 2006 11:42 pm
- Location: Lyon - France
Re: Lib2PBImport Version 1.2
My great MASTER wrote:Use buffers to be absolutely safe
Where is this buffer ?????
Have you a little example of him ??? :roll:
The happiness is a road...Not a destination


