Click here to Skip to main content
16,007,885 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questionhow to send text to another machine Pin
Paritos10-Jan-06 22:13
Paritos10-Jan-06 22:13 
AnswerRe: how to send text to another machine Pin
Briga11-Jan-06 0:00
Briga11-Jan-06 0:00 
QuestionVB.NET Application crashes Pin
melvis_vaz10-Jan-06 21:56
melvis_vaz10-Jan-06 21:56 
AnswerRe: VB.NET Application crashes Pin
Duncan Edwards Jones10-Jan-06 22:19
professionalDuncan Edwards Jones10-Jan-06 22:19 
AnswerRe: VB.NET Application crashes Pin
Steve Pullan10-Jan-06 22:23
Steve Pullan10-Jan-06 22:23 
GeneralRe: VB.NET Application crashes Pin
melvis_vaz10-Jan-06 22:35
melvis_vaz10-Jan-06 22:35 
GeneralRe: VB.NET Application crashes Pin
Guffa10-Jan-06 22:53
Guffa10-Jan-06 22:53 
GeneralRe: VB.NET Application crashes Pin
melvis_vaz10-Jan-06 23:23
melvis_vaz10-Jan-06 23:23 
The actual code is :

Dim bw As BinaryWriter
Dim br As BinaryReader
Dim lFileSize As Long
Dim bytBuffer() As Byte = New Byte() {}
Dim btyBufferOutput() As Byte = New Byte() {}
Dim sOutputPath As String = sFilePath.Substring(0, sFilePath.Length - 4)

Dim fsInput As New FileStream(sFilePath, FileMode.Open, FileAccess.Read)
Dim fsOutput As New FileStream(sOutputPath, FileMode.Create, FileAccess.ReadWrite)

Try
br = New BinaryReader(fsInput)
br.BaseStream.Seek(0, SeekOrigin.Begin)
lFileSize = FileSize(sFilePath)
ReDim bytBuffer(lFileSize - 1)
br.Read(bytBuffer, 0, bytBuffer.Length)

Dim MaxOut As Int32 = lFileSize - 64
ReDim btyBufferOutput(MaxOut - 1)

' DecryptBuffer() function is decrypting the value in bytBuffer and
' storing the decyrpted value in bytBuffer output. this is calling a third- ' party dll
DecryptBuffer(sLangaugeKey, bytBuffer, lFileSize, btyBufferOutput, MaxOut)

Dim Status As Int32 = 0, RetVal As Int32 = 0, Progress As Int32 = 0

Do
RetVal = CryptStatus(Status, Progress)
Loop While ((RetVal = 0) And (Status = 2))

bw = New BinaryWriter(fsOutput)
bw.Write(btyBufferOutput)
fsOutput.Flush()
br.Close()
fsInput.Close()
fsOutput.Close()
bw.Close()
Catch ex as Exception
MsgBox(ex.ToString)
Finally
fsOutput = Nothing
bw = Nothing
br = Nothing
fsInput = Nothing
End Try
GeneralRe: VB.NET Application crashes Pin
Guffa11-Jan-06 1:52
Guffa11-Jan-06 1:52 
GeneralRe: VB.NET Application crashes Pin
Steve Pullan11-Jan-06 0:14
Steve Pullan11-Jan-06 0:14 
GeneralRe: VB.NET Application crashes Pin
melvis_vaz11-Jan-06 0:55
melvis_vaz11-Jan-06 0:55 
GeneralRe: VB.NET Application crashes Pin
Steve Pullan11-Jan-06 1:25
Steve Pullan11-Jan-06 1:25 
GeneralRe: VB.NET Application crashes Pin
melvis_vaz11-Jan-06 21:50
melvis_vaz11-Jan-06 21:50 
GeneralRe: VB.NET Application crashes Pin
Steve Pullan12-Jan-06 15:15
Steve Pullan12-Jan-06 15:15 
GeneralRe: VB.NET Application crashes Pin
melvis_vaz12-Jan-06 20:04
melvis_vaz12-Jan-06 20:04 
GeneralRe: VB.NET Application crashes Pin
Steve Pullan13-Jan-06 1:26
Steve Pullan13-Jan-06 1:26 
QuestionCalling specific instance of EXEBi Pin
Birendra1247810-Jan-06 20:46
Birendra1247810-Jan-06 20:46 
QuestionInput string was not in a correct format Pin
kenn_rosie10-Jan-06 18:35
kenn_rosie10-Jan-06 18:35 
AnswerRe: Input string was not in a correct format Pin
Guffa10-Jan-06 21:08
Guffa10-Jan-06 21:08 
GeneralRe: Input string was not in a correct format Pin
kenn_rosie10-Jan-06 21:11
kenn_rosie10-Jan-06 21:11 
AnswerRe: Input string was not in a correct format Pin
Guffa10-Jan-06 22:15
Guffa10-Jan-06 22:15 
GeneralRe: Input string was not in a correct format Pin
kenn_rosie11-Jan-06 3:21
kenn_rosie11-Jan-06 3:21 
AnswerRe: Input string was not in a correct format Pin
Guffa11-Jan-06 22:06
Guffa11-Jan-06 22:06 
Questionreport generation Pin
_tasleem10-Jan-06 18:08
_tasleem10-Jan-06 18:08 
AnswerRe: report generation Pin
mr_debasishdas10-Jan-06 23:33
mr_debasishdas10-Jan-06 23:33 

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.