Host Engineering Forum
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 23, 2012, 08:37:24 am


Login with username, password and session length


Pages: [1]
  Print  
Author Topic: visual basic Dll  (Read 268 times)
chrisatwan
Full Member
***
Posts: 30



« 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
Logged
JMB
Jr. Member
**
Posts: 11


« 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.
Logged

Jacob Berghofer
Robotics and Automation Engineering Technologist
E-One Moli Energy (Canada) Ltd, Maple Ridge, B.C.
chrisatwan
Full Member
***
Posts: 30



« 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
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM