한국어 English Chinese Russian

질문&답변 게시판 / 기술지원



SSL 암호화로 사용자의 입력정보가 보호되고 있습니다.
No. 1558 Re: vb.net(2010)에서 ezManagerLib.dll 참조 추가시 Error 발생건 2015-10-23

안녕하십니까. 솔내시스템 기술지원팀입니다.

VB.NET에서 ezManager DLL사용 관련하여 자료 조사한 결과를 첨부하였습니다.

회사에 VS2010을 보유하고 있지 않아서 테스트는 VS2012에서 진행하였습니다.

전체검색을 위한 구조체 선언 및 사용, IP주소 확인 및 설정을 위한 문자열 사용에 대한 부분만 확인했습니다.

이미 해결하셨는지는 모르겠지만 아래 내용을 참고하셔서 개발하시면 될 것 같습니다.

감사합니다.

-----------------------------------------------------
Imports System.Runtime.InteropServices
Imports System.Text

Public Class Form1

Private Const NI_MAXHOST As Integer = 1025

Public Structure eztcp_info
Public mac_address() As Byte
Public hostname() As Byte
Public comment() As Byte
Public env_status As Integer
Public product_name() As Byte
Public search_method As Integer
Public search_port As Integer
End Structure

Public l_eztcp_info As New eztcp_info

_
Public Shared Function GetWindowText(hwnd As IntPtr, lpString As System.Text.StringBuilder, cch As Integer) As Integer
End Function

_
Public Shared Sub Start_Library()
End Sub

_
Public Shared Sub End_Library()
End Sub
_
Public Shared Function EzTCP_Search(udp_port_number As Integer, ByRef err As Long) As Integer
End Function

_
Public Shared Function get_eztcp_count() As Integer
End Function

_
Public Shared Function get_eztcp_info_by_index(index As Integer, ByRef out_eztcp_info As eztcp_info) As Integer
End Function

_
Public Shared Function get_ip4_local_address(ByRef mac_address As Byte, out_address As StringBuilder) As Integer
End Function

_
Public Shared Function set_ip4_local_address(ByRef mac_address As Byte, ip4_local_address As StringBuilder) As Integer
End Function

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim err As Long
Dim ret As Integer

ret = EzTCP_Search(50005, err)

Dim cnt As Integer
cnt = get_eztcp_count()

If cnt > 0 Then
ret = get_eztcp_info_by_index(0, l_eztcp_info)

Dim addr As StringBuilder = New StringBuilder(256)

ret = get_ip4_local_address(l_eztcp_info.mac_address(0), addr)

MsgBox(ret)

MsgBox(addr.ToString())

addr.Clear()

addr.Append("10.1.0.100")

MsgBox(addr.ToString())

ret = set_ip4_local_address(l_eztcp_info.mac_address(0), addr)

MsgBox(ret)

addr.Clear()

ret = get_ip4_local_address(l_eztcp_info.mac_address(0), addr)

MsgBox(ret)

MsgBox(addr.ToString())
End If

End Sub

Public Sub New()

's This call is required by the designer.
InitializeComponent()

's Add any initialization after the InitializeComponent() call.
Start_Library()
End Sub

Protected Overrides Sub Finalize()
End_Library()

MyBase.Finalize()
End Sub
End Class

-----------------------------------------------------

> 김승호 wrote:
> ------------------------------------
> 안녕하세요..
>
> vb.net(2010)에서 ezManagerLib.dll 참조 추가시 Error 발생되어 문의 드립니다.
>
> 동적Lib 를 홈페이지에서 다운로드 받아 사용 했으며, 개발 Tools Visual studio 2010 (vb.net) 입니다.
>
> 운영체제는 64bit windows7 입니다.
>
> IP 및 Port 설정하는 프로그램을 개발 하고 있는데 dll 오류 발생되어 문의 드립니다.

첨부파일 20151023_Form1.zip
글쓴이 솔내시스템(주) 업체명 솔내시스템(주)


NO Subject Name Date Read
1556 vb.net(2010)에서 ezManagerLib.dll 참조 추가시 Error 발생건 김승호 2015-10-20 1727
1557 Re: vb.net(2010)에서 ezManagerLib.dll 참조 추가시 Error 발생건 솔내시스템(주) 2015-10-20 1463
1558 Re: vb.net(2010)에서 ezManagerLib.dll 참조 추가시 Error 발생건 솔내시스템(주) 2015-10-23 1814