Skip to content
Jiowcl edited this page Dec 23, 2021 · 3 revisions

Helper

Thread Start

EnableExplicit

IncludeFile "../Core/ZeroMQ.pbi"

Global lpszLibZmqDll.s = "libzmq.dll"

Global hLibrary.i = ZmqDllOpen(lpszLibZmqDll)

ProcedureC TestZmqThreadRepProc(vData.i)
EndProcedure

ProcedureC TestZmqThreadReqProc(vData.i)
EndProcedure

If hLibrary
  Define threadRep.i = ZmqThreadstart(hLibrary, @TestZmqThreadRepProc(), 0)
  Define threadReq.i = ZmqThreadstart(hLibrary, @TestZmqThreadReqProc(), 0)

  ZmqDllClose(hLibrary)
EndIf

Thread Start (ZMQ Wrapper)

EnableExplicit

IncludeFile "../../Core/Enums.pbi"
IncludeFile "../../Core/ZeroMQWrapper.pbi"

UseModule ZeroMQWrapper

Global lpszLibZmqDll.s = "libzmq.dll"

ProcedureC TestZmqThreadRepProc(vData.i)
EndProcedure

ProcedureC TestZmqThreadReqProc(vData.i)
EndProcedure

If DllOpen(lpszLibZmqDll)
  Define threadRep.i = ZmqHelper::Threadstart(@TestZmqThreadRepProc(), 0)
  Define threadReq.i = ZmqHelper::Threadstart(@TestZmqThreadReqProc(), 0)

  DllClose()
EndIf
Clone this wiki locally