Well then can anyone give me some advice on this code?
VB Code:
Public Function Download() As FileStream Return New FileStream("C:\Test.bmp", FileMode.Open, FileAccess.Read) End Function Public Sub Run Dim fileContent As Byte() Dim MyStream As FileStream = Download() MyStream.Read(fileContent, 0, Integer.MaxValue) MyStream.Close() MyStream = New FileStream("C:\TEST2.BMP", FileMode.Create, FileAccess.Write) MyStream.Write(fileContent, 0, fileContent.Length) MyStream.Close() End Sub
The Download() function will normally be a remotable class, but I've simplified things above. When the Run() method is called, I get the following error
Or if anyone has any examples of transferring files using remoting then please let me know. Thanks...Code:System.ArgumentNullException Additional information: Buffer cannot be null
Justin.




Reply With Quote