You are not logged in.

axisdj

Beginner

  • "axisdj" is male
  • "axisdj" started this thread

Posts: 4

Date of registration: Mar 17th 2009

Location: San Antonio Texas

Occupation: Software Developer, Nightclub Owner

Hobbies: Write Software

  • Send private message

1

Tuesday, November 10th 2009, 2:57pm

Set string lengths

in vb6:



Dim textSend As String * 256
Dim textRecieve As String * 256



Call FT_Write(myDongleHandle, textSend, 256, lngBytesWritten)



How do i accomplish this in Jabaco. Need to set the string lengths to send to a hardware device, becuase the dll requires a certian length string even if it is empty.



also in calling a dll:



Call FT_Purge(myDongleHandle, 1 Or &O2)



the &02 is hex, how do you do this in jabaco.



Thanks

A1880

Intermediate

  • "A1880" is male

Posts: 500

Date of registration: Jan 1st 2009

Location: Hanover, Germany

Occupation: Software Engineer

Hobbies: Hilbert Curves

  • Send private message

2

Tuesday, November 10th 2009, 4:47pm

Hi,
hex constants have to be entered via a workaround (for the time being). See here. "1 or 2" will yield "3". The "or" is implemented as bitwise or as it is the case in VB6.

Strings of a specific length can be defined as follows:

Jabaco Source

1
2
3
4
5
6
7
Option Explicit

Public Sub Command1_Click()
   Dim s As String = Space(255)
   
   Debug.Print Len(s)
End Sub


Calling DLLs is a bit tricky in Jabaco. Dig this forum for WINAPI to get to know details.

Greetings!

A1880

Rate this thread
WoltLab Burning Board