Click here to Skip to main content
16,013,465 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Collection in VB6 and VB.Net Pin
Dave Kreskowiak16-Feb-09 10:13
mveDave Kreskowiak16-Feb-09 10:13 
GeneralRe: Collection in VB6 and VB.Net Pin
Samir Ibrahim16-Feb-09 19:34
Samir Ibrahim16-Feb-09 19:34 
QuestionIs Vs = and nothing Pin
thesum16-Feb-09 5:23
thesum16-Feb-09 5:23 
AnswerRe: Is Vs = and nothing Pin
Jay Royall16-Feb-09 5:40
Jay Royall16-Feb-09 5:40 
AnswerRe: Is Vs = and nothing Pin
N a v a n e e t h16-Feb-09 5:57
N a v a n e e t h16-Feb-09 5:57 
AnswerRe: Is Vs = and nothing Pin
supercat916-Feb-09 8:12
supercat916-Feb-09 8:12 
AnswerRe: Is Vs = and nothing Pin
kvelu.d16-Feb-09 20:51
kvelu.d16-Feb-09 20:51 
QuestionHopelessly lost in converting some VB6 code that is reading a binary file [modified] Pin
Jon_Boy16-Feb-09 5:21
Jon_Boy16-Feb-09 5:21 
I'm attempting to convert the following VB6 code. The code is going to position 675 in a binary file and reading in a numeric value. The returned numeric value is a pointer to a place in the same file where to start reading in data (gRecord is a UDT setup with fixed length strings and integer values). The numeric value will vary from file to file to determine where the data is stored.

VB6 Code:
Dim intFile As Integer
intFile = FreeFile
Open txtWinIGPath.Text & strFilename For Binary As #intFile

'First record location.  Offset-1 of first record is stored at location 675
Get #intFile, 675, lngPos
Debug.Print lngPos (in this particular file its 702)
lngPos = lngPos + 1

Do While Not EOF(intFile)
	Get #intFile, lngPos, gRecord



I'm reading in the file with this code. I'm reading 11 bytes just to see the data. I'm not getting any value near 758 (even with doing conversions).

.Net code:
Using fs As New FileStream(strFilePath, FileMode.Open, FileAccess.Read), br As New BinaryReader(fs)
	fs.Seek(674, SeekOrigin.Begin)
	ReDim byt(10)
	byt = br.ReadBytes(10)



Here is the raw data displayed through UltraEdit (included 1 line up and down of data).

Can someone explain what I am doing wrong here?
AnswerRe: Hopelessly lost in converting some VB6 code that is reading a binary file Pin
Alan N16-Feb-09 6:57
Alan N16-Feb-09 6:57 
GeneralRe: Hopelessly lost in converting some VB6 code that is reading a binary file Pin
Jon_Boy16-Feb-09 7:31
Jon_Boy16-Feb-09 7:31 
GeneralRe: Hopelessly lost in converting some VB6 code that is reading a binary file [modified] Pin
Alan N16-Feb-09 7:36
Alan N16-Feb-09 7:36 
GeneralRe: Hopelessly lost in converting some VB6 code that is reading a binary file Pin
Jon_Boy20-Feb-09 6:25
Jon_Boy20-Feb-09 6:25 
QuestionHow to add Office assistant to any personal application Pin
Sujay chakraborty16-Feb-09 4:51
Sujay chakraborty16-Feb-09 4:51 
AnswerRe: How to add Office assistant to any personal application Pin
Eddy Vluggen16-Feb-09 5:06
professionalEddy Vluggen16-Feb-09 5:06 
JokeRe: How to add Office assistant to any personal application Pin
Mycroft Holmes16-Feb-09 16:15
professionalMycroft Holmes16-Feb-09 16:15 
GeneralRe: How to add Office assistant to any personal application Pin
Sujay chakraborty18-Feb-09 5:41
Sujay chakraborty18-Feb-09 5:41 
GeneralRe: How to add Office assistant to any personal application Pin
Eddy Vluggen18-Feb-09 20:34
professionalEddy Vluggen18-Feb-09 20:34 
QuestionAdding the next weekday to a date Pin
GeorgieMPorgie16-Feb-09 4:33
GeorgieMPorgie16-Feb-09 4:33 
AnswerRe: Adding the next weekday to a date Pin
Alan N16-Feb-09 7:08
Alan N16-Feb-09 7:08 
QuestionFull Text Query Pin
Muhammad Fahim Baloch16-Feb-09 1:19
Muhammad Fahim Baloch16-Feb-09 1:19 
AnswerRe: Full Text Query Pin
EliottA16-Feb-09 2:41
EliottA16-Feb-09 2:41 
AnswerRe: Full Text Query Pin
Steven J Jowett16-Feb-09 4:18
Steven J Jowett16-Feb-09 4:18 
Questionhow save image to bitmap file? Pin
hamziak16-Feb-09 1:03
hamziak16-Feb-09 1:03 
GeneralRe: how save image to bitmap file? Pin
Luc Pattyn16-Feb-09 1:07
sitebuilderLuc Pattyn16-Feb-09 1:07 
JokeRe: how save image to bitmap file? Pin
DaveAuld16-Feb-09 1:31
professionalDaveAuld16-Feb-09 1:31 

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.