Page 4 of 5

Posted: Thu Jan 18, 2007 4:12 pm
by Denis
Many Thks

:D

Denis

Posted: Fri Jan 19, 2007 3:38 am
by ts-soft
Small Update: (1.2)
Added a Statusbar with UnDecorateSymbolName of C++ Symbols, if selected
This is only usefull for c++ programmer

Posted: Sun Jan 21, 2007 1:26 am
by SFSxOI
Doesn't seem to be producing macros for me. I get the code for the .pbi with the decorated functions but never see any macros. I'm using v1.2, it was the same with v1.0.

Posted: Sun Jan 21, 2007 5:40 am
by ts-soft
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.

Posted: Sun Jan 21, 2007 2:33 pm
by SFSxOI
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.

Posted: Thu Mar 08, 2007 6:10 pm
by ts-soft
Small Update

Missing CloseFile() added :oops:

Posted: Tue Mar 18, 2008 12:53 am
by Tipperton
Is this still available?

Download link in first post returns 404 file not found.

Thanks!

Posted: Tue Mar 18, 2008 6:18 am
by ts-soft
Tipperton wrote:Is this still available?

Download link in first post returns 404 file not found.

Thanks!
I will upload it on my new webspace, next days, sry ...

Posted: Tue Mar 18, 2008 12:38 pm
by Tipperton
No problem, and thanks! :)

Posted: Tue Mar 18, 2008 5:01 pm
by ts-soft
New download link on first post (no changes!)

Re: Lib2PBImport Version 1.2

Posted: Tue Nov 03, 2009 2:02 pm
by Kwai chang caine
Thanks TS-Soft for this useful tools 8)

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 :shock:

Code: Select all

Import
 Function(a.l) As "_Function@4"
EndImport

Procedure Function(Parameter.s)
 ..
 ..
 ..
End Procedure

Re: Lib2PBImport Version 1.2

Posted: Tue Nov 03, 2009 2:53 pm
by srod
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.

Re: Lib2PBImport Version 1.2

Posted: Tue Nov 03, 2009 3:09 pm
by Kwai chang caine
Hello MASTER glad to talk to you, there is a long time :D
I suppose you are in vacancy without KCC :mrgreen:
But it's finish......i'm here :D

I have like usually several questions :oops:

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"
EndImport
or just this is sufficient ?? :roll:

Code: Select all

Import "Dll.lib"
 Function(a.s)
EndImport
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")

Re: Lib2PBImport Version 1.2

Posted: Tue Nov 03, 2009 3:16 pm
by srod
Kwaï chang caïne wrote: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"
EndImport
or just this is sufficient ?? :roll:

Code: Select all

Import "Dll.lib"
 Function(a.s)
EndImport
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.

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")
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.

Re: Lib2PBImport Version 1.2

Posted: Tue Nov 03, 2009 3:23 pm
by Kwai chang caine
My great MASTER wrote:Use buffers to be absolutely safe
:shock:
Where is this buffer ????? :shock:
Have you a little example of him ??? :roll: