Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
An interesing thought
#9
thank you luke Smile
but I don't understand why the following works as a whole program but not if the function alone is compiled with the shared option and then used as a dll
Code: (Select All)

Dim As String a, b, c
a = "Hello"
b = " World!"
c = adds(a, b)
Print c

Function adds$ (x As String, y As String)
adds = x + y
End Function

like the following, assuming that the function alone is saved as addl.bas and compiled with the shared option and then renamed from addl.exe to addl.dll
Code: (Select All)

Declare Dynamic Library "addl"
Function adds$ Alias "_Z18FUNC_ADDSP3qbsS0_" (x As String, y As String)
End Declare

Dim As String a, b, c

a = "Hello"
b = " World!"

c = adds(a, b)
Print c
Reply


Messages In This Thread
An interesing thought - by doppler - 07-22-2024, 07:19 PM
RE: An interesing thought - by Jack - 07-23-2024, 02:02 AM
RE: An interesing thought - by Jack - 07-23-2024, 02:11 AM
RE: An interesing thought - by Jack - 07-23-2024, 02:16 AM
RE: An interesing thought - by Pete - 07-24-2024, 12:53 AM
RE: An interesing thought - by doppler - 07-24-2024, 01:46 AM
RE: An interesing thought - by Jack - 07-24-2024, 07:09 AM
RE: An interesing thought - by luke - 07-24-2024, 08:12 AM
RE: An interesing thought - by Jack - 07-24-2024, 01:13 PM
RE: An interesing thought - by DSMan195276 - 07-25-2024, 05:30 AM
RE: An interesing thought - by Jack - 07-25-2024, 10:57 AM
RE: An interesing thought - by DSMan195276 - 07-25-2024, 03:54 PM
RE: An interesing thought - by mdijkens - 07-26-2024, 10:45 AM
RE: An interesing thought - by DSMan195276 - 07-26-2024, 02:47 PM



Users browsing this thread: 1 Guest(s)