Page 1 of 1

Returning strings to VB from a DLL

Posted: Mon Oct 06, 2003 6:58 pm
by twobits
Hi im trying to return s string from PB to VB without success, here is my code:

PB code:

Code: Select all

  ProcedureDLL.s GetName()
  
    ProcedureReturn "Test"
  EndProcedure
VB decleration:

Code: Select all

Public Declare Function GetString Lib "purebasic.dll" () As String
VB use:

Code: Select all

Private Sub Command1_Click()

    Command1.Caption = GetString
End Sub
The command buttons caption is "" after the function is called, any help appreciated.
2_bits

Posted: Mon Oct 06, 2003 7:03 pm
by Rings
search the Resourcesite for 'VB_CALL_PBDLL' , there is a working example from me

Posted: Mon Oct 06, 2003 7:18 pm
by twobits
OK, thank you very much :)