PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Ztrace  (Read 409 times)

Douglas McDonald

  • Senior Member
  • ***
  • Posts: 236
  • PB, FF3,VB6 , B4A, Proton PDS, Mikroe Basic
    • RedforkSoftware,LLC
Ztrace
« on: January 28, 2013, 03:47:32 PM »

I know Ztrace is not really a part of FF  but maybe I can get an answer. Does ztrace have a problem with types or vars assigned from types?

'Type Test_struct
'    StepNr As String * 10
'    Relay As Relays
'    AD   As ADC
'   
'End Type

        ts(j-1).StepNr = testX(j,0) 'get Realys

doesn't      ztrace ts(j-1).StepNr
 works       ? ts(j-1).StepNr

if I put it in a temp var:

dim temp as string
     
      temp = ts(j-1).StepNr 
doesn't      ztrace temp
 works       ? temp


the same thing goes for  Ztrace str$(xyz.some_Long) doesn't work

ztrace "xzy" ok
ztrace str$(some_number) ok

Is there any documentation on ztrace? I'll look again on Jose's site

Thank you
Doug
     
Logged
Doug McDonald
KD5NWK
www.redforksoftware.com
Is that 1's and 0's or 0's and 1's?

Eddy Van Esch

  • Senior Member
  • ***
  • Posts: 246
  • FF3 User
    • DevOTechS
Re: Ztrace
« Reply #1 on: January 28, 2013, 03:59:47 PM »

Doug,

This works for me in FF 3.62:
Code: [Select]
Function FORM1_IMAGEBUTTON1_BN_CLICKED ( _
                                       ControlIndex     As Long,  _  ' index in Control Array
                                       hWndForm         As Dword, _  ' handle of Form
                                       hWndControl      As Dword, _  ' handle of Control
                                       idButtonControl  As Long   _  ' identifier of button
                                       ) As Long
zTrace Str$(hWndControl)
zTrace Str$(hWndControl) + Str$(hWndForm)
End Function
I remember though that zTrace (once) used to require an ASCIIZ string as an argument.
Logged
Eddy

Eddy Van Esch

  • Senior Member
  • ***
  • Posts: 246
  • FF3 User
    • DevOTechS
Re: Ztrace
« Reply #2 on: January 28, 2013, 04:08:15 PM »

Ah, just noticed you wanted variables from types.
That works too:

Code: [Select]
Function FORM1_IMAGEBUTTON1_BN_CLICKED ( _
                                       ControlIndex     As Long,  _  ' index in Control Array
                                       hWndForm         As Dword, _  ' handle of Form
                                       hWndControl      As Dword, _  ' handle of Control
                                       idButtonControl  As Long   _  ' identifier of button
                                       ) As Long
'Type TestType Dword
'  a As Integer
'  b As Long
'End Type

Dim abcd(4) As TestType
abcd(1).b = -34

MsgBox(Str$(abcd(1).b))
zTrace Str$(abcd(1).b)
zTrace Str$(hWndControl) + Str$(hWndForm)
End Function
Logged
Eddy

Douglas McDonald

  • Senior Member
  • ***
  • Posts: 236
  • PB, FF3,VB6 , B4A, Proton PDS, Mikroe Basic
    • RedforkSoftware,LLC
Re: Ztrace
« Reply #3 on: January 28, 2013, 04:49:15 PM »

Ok thank I must have something strange going on here. I'll re-download the latest ztrace.

Thank you
Logged
Doug McDonald
KD5NWK
www.redforksoftware.com
Is that 1's and 0's or 0's and 1's?

Douglas McDonald

  • Senior Member
  • ***
  • Posts: 236
  • PB, FF3,VB6 , B4A, Proton PDS, Mikroe Basic
    • RedforkSoftware,LLC
Re: Ztrace
« Reply #4 on: January 28, 2013, 05:08:28 PM »

 I'm using ztrace ver 1.52. It looks like you still have to use asciiz strings

Code: [Select]
zTrace 1.52

Is a small Win32 SDK DLL to display debugging information into a popup window tool, and/or a text file.
zTrace uses a distinct thread to work in parallel of the current application you want to debug.

zTrace is very useful at development time to check whether a program operates properly, it has been modeled onto the WinDev's Trace API.

Declaration:
Code: [Select]

DECLARE FUNCTION zTrace LIB "zTrace.DLL" ALIAS "zTrace" (zMessage AS ASCIIZ) AS LONG

Code: [Select]

DECLARE FUNCTION zDebug LIB "zTrace.DLL" ALIAS "zDebug" (zMessage AS ASCIIZ) AS LONG


Syntax to use:
Code: [Select]

zTrace("StringInformation")

Code: [Select]

zDebug("StringInformation")

I'll have to try your code samples and see whats going on.

Thank you
Logged
Doug McDonald
KD5NWK
www.redforksoftware.com
Is that 1's and 0's or 0's and 1's?