
Denis
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.
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!
Code: Select all
Import
Function(a.l) As "_Function@4"
EndImport
Procedure Function(Parameter.s)
..
..
..
End Procedure
Code: Select all
Import "Dll.lib"
Function(a.s) As "_Function@X"
EndImport
Code: Select all
Import "Dll.lib"
Function(a.s)
EndImport
Code: Select all
Import "Dll.lib"
MyFunctionInTheDll(a.s)
EndImport
Procedure.s MyFunctionInExe(Sentence.s)
ProcedureReturn PeekS(MyFunctionInTheDll(Sentence))
EndProcedure
Debug MyFunctionInExe("Hello Kcc")
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")
My great MASTER wrote:Use buffers to be absolutely safe