Forum Index > Using Comm64.dll in a .net class

By: Guest Posted on: Jun 5 2018 at 07:44:40 AM
Can you give guidance please?
I want to apply the comm64 in a class rather than added to a form where I can receive and transmit data. However, the scomm input properties are not accepted for some reason?


For example

Imports Scomm.lib
Public Class clsscomm

public property scommport as new Scommlib.Scomm

Public Openport
etc
Addhandler scommport.OnComm, Addressof ReceiveHandler 'Is this the correct way to implement the event for the Scomm64 ?

End Sub


Private Sub ReceiveHandler()
with scommport
Select case .ComEvent
case 2
bytesoread= .inbuffercount
.InputMode=Inputmodeconstants.cominputmodebinary
Dim byBuf(bytesoread) as byte
byBuf = .Input 'Visual Studio error Conversion from Object to Byte ?



end select


End Sub


 

Reply - add comment to this topic
You may enter letters, numbers and standard punctuation only. HTML and other scripts/tags will be rejected
  Topic:- Using Comm64.dll in a .net class

Your Name


 


Forum scripts and databases - Copyright (c) 2009 - 2012 AxCoL.com