Execute a function of PowerBASIC from PureBASIC

Started by Israel Vega, May 21, 2015, 08:31:43 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Israel Vega

PowerBasic code of DLL:

#COMPILE DLL

FUNCTION MENSAJE() EXPORT AS WSTRING
  FUNCTION="Hola Israel"
END FUNCTION
                         


PureBasic code with String function reading how UNICODE:

  If OpenLibrary(0, "C:\PBWIN10\PRUEBAS\PRUEBAPB.dll")
    A$ = PeekS(CallFunction(0, "MENSAJE"),#PB_Unicode)
    MessageRequester("RESULTADO",A$,0)
    CloseLibrary(0)
  EndIf


For return a LONG change to PeekL instead of PeekS...also PeekF for float,  PeekQ for Quad...