Home > Software engineering >  How used in VB6.0 by use the Debug. Print Print structure information? [for]
How used in VB6.0 by use the Debug. Print Print structure information? [for]

Time:09-28


Part of the code is as follows:
Private AlarmInfo As NET_DVR_ALARMINFO


'structure parametersType NET_DVR_ALARMINFO
DwAlarmType As Long 'alarm type
DwAlarmInputNumber As Long 'alarm input port
DwAlarmOutputNumber (15) As Long 'alarm output port
DwAlarmRelateChannel (15) As Long 'trigger video channel
DwChannel (15) As Long 'alarm channel
DwDiskNumber (15) As Long 'alarm hard drive
End Type


'the callback function
The Public Function MSGCallBack (ByVal lCommand As Long, ByRef pAlarmer As NET_DVR_ALARMER, _
ByVal pAlarmInfo As Long, ByVal dwBufLen As Long, _
ByVal pUser) As Long As Boolean 'callback function
The Debug. Print,,,
End the Function

Need to be printed in the callback function pAlarmInfo structure information, how to achieve this?

Small white one, a great god guide ah,. Thank you!

CodePudding user response:

Parameters are directly declared
 ByRef pAlarmInfo As NET_DVR_ALARMINFO 
,
Then pAlarmInfo each member of the structure installation debugging method commonly directly the Debug. Print, or write a printing process convenient and several calls,

CodePudding user response:


@ Tiger_Zhao

Is that so?
The Public Function MSGCallBack (ByVal lCommand As Long, ByRef pAlarmer As NET_DVR_ALARMER, _
ByRef pAlarmInfo As NET_DVR_ALARMINFO, ByVal dwBufLen As Long, _
ByVal pUser) As Long As Boolean 'callback function
The Debug. Print dwAlarmType
The Debug. Print dwAlarmInputNumber
The Debug. Print dwAlarmOutputNumber
The Debug. Print dwAlarmType
The Debug. Print dwAlarmType
The Debug. Print dwAlarmType
End the Function

But no log shows?

CodePudding user response:

reference 1st floor Tiger_Zhao response:
parameters directly declared
 ByRef pAlarmInfo As NET_DVR_ALARMINFO 
,
Then pAlarmInfo each member of the structure installation debugging method commonly directly. The Debug Print, or write a printing process more convenient place calls,


Is that so?
The Public Function MSGCallBack (ByVal lCommand As Long, ByRef pAlarmer As NET_DVR_ALARMER, _
ByRef pAlarmInfo As NET_DVR_ALARMINFO, ByVal dwBufLen As Long, _
ByVal pUser) As Long As Boolean 'callback function
The Debug. Print dwAlarmType
The Debug. Print dwAlarmInputNumber
The Debug. Print dwAlarmOutputNumber
The Debug. Print dwAlarmType
The Debug. Print dwAlarmType
The Debug. Print dwAlarmType
End the Function

But no log shows?

CodePudding user response:

Debug. The Print is debugging output, and what is the relationship between the log?
  • Related