Hello,
I'm trying to write a sub and a function. The function is to return a file to the sub, which will write the file to disk. Something like:
Sub Main()
File.Create("C:\NewPDF_File.pdf", GetPDF)
End Sub
Function GetPDF() as System.IO.FileStream
GetPDF = File.OpenRead("C:\OrigianlPDF.pdf")
End Function
Of course, this does not work. But I'm hoping somebody will get the idea. The 'sub' is in a VB WCF hosted in IIS, the 'function' is a VB WCF hosted in a Windows service. That part really doesn't matter, but thought I should throw it in for the sake of understanding.
So how can I create a function that will return a file, and how can I write that file to disk from the calling procedure?
Any help is greatly appreciated!
Thanks,
Jason
I'm trying to write a sub and a function. The function is to return a file to the sub, which will write the file to disk. Something like:
Sub Main()
File.Create("C:\NewPDF_File.pdf", GetPDF)
End Sub
Function GetPDF() as System.IO.FileStream
GetPDF = File.OpenRead("C:\OrigianlPDF.pdf")
End Function
Of course, this does not work. But I'm hoping somebody will get the idea. The 'sub' is in a VB WCF hosted in IIS, the 'function' is a VB WCF hosted in a Windows service. That part really doesn't matter, but thought I should throw it in for the sake of understanding.
So how can I create a function that will return a file, and how can I write that file to disk from the calling procedure?
Any help is greatly appreciated!
Thanks,
Jason