?
Solved

VB Sending an object, or a user defined type with the winsock control

Posted on 2003-03-19
4
Medium Priority
?
171 Views
Last Modified: 2013-11-13
Loads of websites explain how to send text, datatypes or byte arrays using winsockControl.SendData

Files can be sent because one loads them as a byte array. However I need to know how to send a user defined type or an object created from a class file.

eg

Public Type MyTpe
mystring As String * 15
myinteger As Integer
End Type
Dim MyTypeToSend As mooType

How do I get this to work: WinsockControl.SendData MyTypeToSend

Do I need to convert MyTypeToSend into a byte array? (saving it as an intermediate file and loading that file into a byte array is too slow)

Thanks
0
Comment
Question by:adox
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 

Author Comment

by:adox
ID: 8165621
Dim MyTypeToSend As *MyTpe*
Dim MyTypeToSend As *MooTpe* was a typo
0
 

Accepted Solution

by:
adox earned 0 total points
ID: 8168090
I figured it out using copymemory. Problem solved!
0
 

Expert Comment

by:CleanupPing
ID: 8532008
Hi adox,
This old question (QID 20555919) needs to be finalized -- no Experts commented, so delete it and get a refund.  Please see http://www.cityofangels.com/Experts/Closing.htm for information and options.
0
 
LVL 6

Expert Comment

by:GPrentice00
ID: 8957207
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

-->PAQ - with points refunded

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

GPrentice00
EE Cleanup Volunteer
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Windows Script Host (WSH) has been part of Windows since Windows NT4. Windows Script Host provides architecture for building dynamic scripts that consist of a core object model, scripting hosts, and scripting engines. The key components of Window…
If you haven’t already, I encourage you to read the first article (http://www.experts-exchange.com/articles/18680/An-Introduction-to-R-Programming-and-R-Studio.html) in my series to gain a basic foundation of R and R Studio.  You will also find the …
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question