Would anyone know how, if it's possible, to pass a user defined type through a network connection say using winsock?

For example:

type tExpl
      name as string
      address as string
      phone as string
end type
 
dim myExpl as tExpl
 
winsock1.send myExpl

As far as i know, winsock only sends text or raw data, anyone know if this is possible?

No. The reason is because how VB handles UDT's in Late-Bound functions.... you could in theory cast it to an object, but trying to send an object through a socket never works right. Your best bet, is to convert the UDT to a single string variable, delimited by a character sequence of your choice, and then on the other side (the server, or whatever is "recieving" the UDT) rip apart the string by the delimiter and put it back into a UDT.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.