I have a client program on one computer and server on the other.
What I want to do is send the .dll from the client to the server so that the server can put it in it’s local folder and read from it.
So my question is:
Is it possible to convert a .dll into bytes, send it over to the server, then have the server turn the bytes into a .dll file and put it in the local folder and read it?
(by the way, i already have the code for sending the bytes, i just dont know how to convert)
Related posts:








1 response so far ↓
1 LoverOfWine // Sep 5, 2009
If you have the code for sending the information, then all you need to do is to read the file in, send the data over to the server and have it write it out, like you would any other file.
This is an example of reading and writing the data in a binary file (which an exe or dll is).
Dim inputPath As String
Dim outputPath As String
Dim input As New FileStream(inputPath, FileMode.Open,FileAccess.Read)
Dim output As New FileStream(outputPath, FileMode.Create,FileAccess.Write)
Dim count As Integer = 1024
Dim buffer(count - 1) As Byte
count = input.Read(buffer, 0, count)
Do Until count = 0
output.Write(buffer, 0, count)
count = input.Read(buffer, 0, count)
Loop
input.Close()
output.Close()
Leave a Comment