Click here to Skip to main content
15,890,399 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: typical sorting problem Pin
-- NA --7-Jul-03 5:10
-- NA --7-Jul-03 5:10 
GeneralCreating new objects Pin
Anonymous2-Jul-03 23:04
Anonymous2-Jul-03 23:04 
GeneralRe: Creating new objects Pin
Wayne Phipps4-Jul-03 22:34
Wayne Phipps4-Jul-03 22:34 
QuestionHow to suport my application with sounds Pin
elmahdy2-Jul-03 10:53
elmahdy2-Jul-03 10:53 
AnswerRe: How to suport my application with sounds Pin
J. Dunlap2-Jul-03 11:02
J. Dunlap2-Jul-03 11:02 
GeneralDxSolo Pin
DxSolo2-Jul-03 9:00
DxSolo2-Jul-03 9:00 
GeneralRe: DxSolo Pin
DxSolo3-Jul-03 6:53
DxSolo3-Jul-03 6:53 
GeneralFile Download - web service Pin
jrmcdona2-Jul-03 7:22
jrmcdona2-Jul-03 7:22 
I am trying to build a web service that downloads a file to my local directory.

I have the basics here but I just cannot get it to work, anybody know of any examples on this. Here is my code so far.

<br />
Dim l_oWR As WebRequest<br />
        Dim l_oWebResp As WebResponse<br />
        Dim l_oBR As BinaryReader<br />
        Dim l_oBW As BinaryWriter<br />
        Dim l_oStream As Stream<br />
        Dim bFile() As Byte<br />
        Dim l_iCnt As Long<br />
        Dim l_dtNow As DateTime = DateTime.Now<br />
        Dim l_sDir As String = l_dtNow.ToString("MMddyyyy")<br />
        Dim l_oDir As Directory<br />
        Dim l_sFile As String<br />
        Dim l_sCnnStr As String<br />
<br />
        Try<br />
<br />
            'download file<br />
            l_oWR = HttpWebRequest.Create("http://www.abc.com/abc.exe")<br />
            l_oWebResp = l_oWR.GetResponse()<br />
            l_oBR = New BinaryReader(l_oWebResp.GetResponseStream(), Encoding.ASCII)<br />
            l_iCnt = l_oWebResp.ContentLength<br />
            bFile = l_oBR.ReadBytes(CType(l_iCnt, Integer))<br />
            If Not System.IO.Directory.Exists("C:\ofac") Then<br />
                System.IO.Directory.CreateDirectory("C:\ofac")<br />
            End If<br />
            l_oStream = New FileStream("C:\ofac\t11sdall.exe", FileMode.Create, FileAccess.Write)<br />
            l_oBW = New BinaryWriter(l_oStream)<br />
            l_oBW.Write(bFile)<br />


Thanks for any help here!
Jordan
Questionhow solving the error cordbg.exe Pin
gary6662-Jul-03 6:59
gary6662-Jul-03 6:59 
GeneralDataGridEx Pin
Bernhard Hofmann2-Jul-03 2:59
Bernhard Hofmann2-Jul-03 2:59 
QuestionString to Integer? Pin
oliver_twistor1-Jul-03 8:09
oliver_twistor1-Jul-03 8:09 
AnswerRe: String to Integer? Pin
apferreira1-Jul-03 8:16
apferreira1-Jul-03 8:16 
AnswerRe: String to Integer? Pin
Matt Casto1-Jul-03 8:16
Matt Casto1-Jul-03 8:16 
GeneralFinding the End Of File Pin
DxSolo1-Jul-03 7:45
DxSolo1-Jul-03 7:45 
GeneralRe: Finding the End Of File Pin
dynamic2-Jul-03 8:33
dynamic2-Jul-03 8:33 
General?? displaying data Pin
shirleyLo1-Jul-03 3:10
shirleyLo1-Jul-03 3:10 
GeneralObtaining Focus in VB application Pin
Simes1-Jul-03 1:12
Simes1-Jul-03 1:12 
Generallarge Memory used in .NET application Pin
maxfava30-Jun-03 23:17
maxfava30-Jun-03 23:17 
GeneralRe: large Memory used in .NET application Pin
Ian Darling1-Jul-03 6:43
Ian Darling1-Jul-03 6:43 
GeneralRe: large Memory used in .NET application Pin
apferreira1-Jul-03 7:07
apferreira1-Jul-03 7:07 
Generali want this function Pin
elmahdy30-Jun-03 15:24
elmahdy30-Jun-03 15:24 
GeneralRe: i want this function Pin
Ian Darling1-Jul-03 6:39
Ian Darling1-Jul-03 6:39 
GeneralRe: i want this function Pin
elmahdy1-Jul-03 13:28
elmahdy1-Jul-03 13:28 
GeneralRe: i want this function Pin
Ian Darling2-Jul-03 22:28
Ian Darling2-Jul-03 22:28 
GeneralMultiple Textboxes in same array Pin
mpalmati30-Jun-03 12:57
mpalmati30-Jun-03 12:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.