Re: How to define Structure like C in VB
From: vbgnr (vbgnr_at_programmer.net)
Date: 03/01/04
- Next message: vbgnr: "Re: How to define Structure like C in VB"
- Previous message: Bob O`Bob: "Re: What is wrong with this code?"
- In reply to: Mike D Sutton _at_ Work: "Re: How to define Structure like C in VB"
- Next in thread: Veign: "Re: How to define Structure like C in VB"
- Reply: Veign: "Re: How to define Structure like C in VB"
- Reply: Mike D Sutton: "Re: How to define Structure like C in VB"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 02 Mar 2004 02:25:16 +0800
hi Mike,
thanks for your reply. here are my further question:
On Mon, 1 Mar 2004 12:03:54 -0000, Mike D Sutton @ Work <EDais@mvps.org>
wrote:
>> i want to write a snmp trap monitor program with visual basic. the snmp
>> trap string i read from winsock control is a binary string, i have to
>> determine information in the snmp message body by analysing the string.
>> in C, i can define a structure, then copy the data to the structure,
>> then get each kind of information by access each field in the
>> structure. how can i do same with visual basic?
>
> You'll need to declare a UDT that has the same structure as the
> structure you're receiving and use RtlMoveMemory()/CopyMemory() to
> write the data you receive from SNMP into it. If the structure uses
the lengths of snmp UDP packeks vary according to different trap event, and
the structure of it should be hieratical, looks like the following:
snmp package
version
community name
data (variable)
type
agent ip
time stamp
trap data (variable)
oid
string
oemid
text (variable)
does UDT support such type like this? any idea?
thanks in advance!
vbgnr
- Next message: vbgnr: "Re: How to define Structure like C in VB"
- Previous message: Bob O`Bob: "Re: What is wrong with this code?"
- In reply to: Mike D Sutton _at_ Work: "Re: How to define Structure like C in VB"
- Next in thread: Veign: "Re: How to define Structure like C in VB"
- Reply: Veign: "Re: How to define Structure like C in VB"
- Reply: Mike D Sutton: "Re: How to define Structure like C in VB"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|