-
Notifications
You must be signed in to change notification settings - Fork 0
Msg
Jiowcl edited this page Dec 29, 2021
·
2 revisions
' ZmqFreeFnProc
Sub ZmqFreeFnProc(Byval data_ As Any Ptr, Byval hint_ As Any Ptr)
End Sub#Include "../Core/ZeroMQ.bi"
Dim lpszLibZmqDll As String = "libzmq.dll"
Dim hLibrary As Any Ptr = ZmqDllOpen(lpszLibZmqDll)
If hLibrary > 0 Then
Dim vMsg As ZmqMsgT Ptr
ZmqMsgInit(hLibrary, vMsg)
ZmqMsgClose(hLibrary, vMsg)
ZmqDllClose(hLibrary)
End If#Include "../Core/ZeroMQ.bi"
Dim lpszLibZmqDll As String = "libzmq.dll"
Dim hLibrary As Any Ptr = ZmqDllOpen(lpszLibZmqDll)
' ZmqFreeFnProc
Sub ZmqFreeFnProc(Byval data_ As Any Ptr, Byval hint_ As Any Ptr)
End Sub
If hLibrary > 0 Then
Dim vMsg As ZmqMsgT Ptr
Dim lpszMsg As String = "Hi There"
Dim lMsgSize As Long = Len(lpszMsg)
Dim tMsgPtr As ZString Ptr
tMsgPtr = CAllocate(lMsgSize, SizeOfDefZStringPtr(tMsgPtr))
*tMsgPtr = lpszMsg
ZmqMsgInitData(hLibrary, vMsg, tMsgPtr, lMsgSize, @ZmqFreeFnProc, 0)
ZmqMsgClose(hLibrary, vMsg)
ZmqDllClose(hLibrary)
End If#Include "../../Core/Enums.bi"
#Include "../../Core/ZeroMQWrapper.bi"
Dim lpszLibZmqDll As String = "libzmq.dll"
Dim hLibrary As Any Ptr = ZmqDllOpen(lpszLibZmqDll)
If hLibrary > 0 Then
Dim vMsg As ZmqMsgT Ptr
LibZmqMsg.Init(vMsg)
LibZmqMsg.Close(vMsg)
LibZMQWrapper.DllClose()
End If#Include "../../Core/Enums.bi"
#Include "../../Core/ZeroMQWrapper.bi"
Dim lpszLibZmqDll As String = "libzmq.dll"
Dim hLibrary As Any Ptr = ZmqDllOpen(lpszLibZmqDll)
If hLibrary > 0 Then
Dim vMsg As ZmqMsgT Ptr
Dim lpszMsg As String = "Hi There"
Dim lMsgSize As Long = Len(lpszMsg)
Dim tMsgPtr As ZString Ptr
tMsgPtr = CAllocate(lMsgSize, SizeOfDefZStringPtr(tMsgPtr))
*tMsgPtr = lpszMsg
LibZmqMsg.InitData(vMsg, tMsgPtr, lMsgSize, @ZmqFreeFnProc, 0)
LibZmqMsg.Close(vMsg)
LibZMQWrapper.DllClose()
End If