News:

  • February 05, 2023, 07:48:13 PM

Login with username, password and session length

Author Topic: visual basic Dll  (Read 3821 times)

chrisatwan

  • Full Member
  • ***
  • Posts: 30
visual basic Dll
« on: August 12, 2011, 11:16:00 AM »
I was trying another way of skinning a cat. I have the SDK working in VB6 so thought of creating a VB6 Dll for the SDK. However I am not able to connect to and ECOM module. I can network initiate and scan network with success but can not connect. Is there any thing that can cause problem with this in ActiveX Dll:

    Public Declare Function PASCAL_HEIOpenDevice Lib "hei_pas" ( _
        ByRef pTransport As HEITransport, _
        ByRef pDevice As HEIDevice, _
        ByVal HEIAPIVersion As Integer, _
        ByVal TimeOut As Integer, _
        ByVal Retrys As Integer, _
        ByVal UseAddressedBroadcast As Boolean _
    ) As Long


Thanks,
Christopher

JMB

  • Jr. Member
  • **
  • Posts: 15
Re: visual basic Dll
« Reply #1 on: August 12, 2011, 02:38:07 PM »
Hi Christopher,

That seems to match the definition in the samples.  What errors are you getting exactly?

Jacob

PS - I posted the updated EtherCCM sample if you want to give that a try now too.
Jacob Berghofer
Robotics and Automation Engineering Technologist
E-One Moli Energy (Canada) Ltd, Maple Ridge, B.C.

chrisatwan

  • Full Member
  • ***
  • Posts: 30
Re: visual basic Dll
« Reply #2 on: August 12, 2011, 10:21:42 PM »
Jacob,

I was able to get the Dll to connect and it finds the ECOM module. The problem now is the CCM_ProcessCommand function. At first the line:

    rc = PASCAL_HEICCMRequest(aDevices(tDevice), bWrite, CCM_DataType, DataAddress, DataLength, ByteBuffer(0))

Would cause the program to crash. I removed line and just put rc=0 for testing purposes. However If I do a register read or write I don't get errors but I am also unable to read value back from register or write to it. It is like I am not actually connected to ECOM even though I was able to find it. I have code to share if anyone wants to see it.

Thanks,
Christopher