473,320 Members | 1,909 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

using LSET to load records into types in VB6 - how to do in .NET

Hi,
In VB6 I wrote an application that had to read lots of fixed length disk
records from another system. These records were divided up into many fixed
length fields.

In VB6 the easy solution to breaking up the record into the fields was to
define all the fields in a VB6 Type as fixed length strings and then use Lset
to load the record into the type - worked a treat.

However this won't work in .NET - and I haven't see any easy alternative.

Any ideas ?

Regards
Michael
Jul 21 '05 #1
2 2098

"Michael" <mi***********@solventgreen.com.nospam> schrieb im Newsbeitrag news:AA**********************************@microsof t.com...
Hi,
In VB6 I wrote an application that had to read lots of fixed length disk
records from another system. These records were divided up into many fixed
length fields.

In VB6 the easy solution to breaking up the record into the fields was to
define all the fields in a VB6 Type as fixed length strings and then use Lset
to load the record into the type - worked a treat.

However this won't work in .NET - and I haven't see any easy alternative.

Any ideas ?

Perhaps the following MSDN article about marshalling a structure with fixed length
arrays will help you:

http://msdn.microsoft.com/library/de...filesample.asp

Another solution would be to use the VB6 application and export some Read methods, via
COM and using COM interop in the .NET application

Hope that helps.
Andre

Regards
Michael

Jul 21 '05 #2
Andre,
Thanks for that - but specifying the fields as fixed length strings via
marshalling I had already figured out.

The question is - how to get a fixed length disk record loaded into that
type ?

Regards
Michael

"Andre Kaufmann" wrote:

"Michael" <mi***********@solventgreen.com.nospam> schrieb im Newsbeitrag news:AA**********************************@microsof t.com...
Hi,
In VB6 I wrote an application that had to read lots of fixed length disk
records from another system. These records were divided up into many fixed
length fields.

In VB6 the easy solution to breaking up the record into the fields was to
define all the fields in a VB6 Type as fixed length strings and then use Lset
to load the record into the type - worked a treat.

However this won't work in .NET - and I haven't see any easy alternative.

Any ideas ?


Perhaps the following MSDN article about marshalling a structure with fixed length
arrays will help you:

http://msdn.microsoft.com/library/de...filesample.asp

Another solution would be to use the VB6 application and export some Read methods, via
COM and using COM interop in the .NET application

Hope that helps.
Andre

Regards
Michael


Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Lucky | last post by:
I have a vb.net windows app that connects to an access database. The database has 1 table. One of the columns is called "Address". A user enters any address into a textbox (txtValue) then clicks...
6
by: DH | last post by:
We have a VB6 windows application. It had LSet to assign a User_Defined Type, a string, into another User_Defined Type, an Array of String. It looked like Type tPTStrin PTString As String * 2...
7
by: johkar | last post by:
I am confused on childNodes or children. When you have nested lists, I would think it would all be one list in the Dom, this doesn't seem to be the case. So how do you traverse an unordered list?...
19
by: James Fortune | last post by:
I have a lot of respect for David Fenton and Allen Browne, but I don't understand why people who know how to write code to completely replace a front end do not write something that will automate...
11
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this DTS package. If I PC Anywhere into the server on...
3
by: TT (Tom Tempelaere) | last post by:
Hi there I am making a service project in C#, and I'm in the process of writing the installer. I made an installer class by using the "Add Installer" menu-item in the design window of the service,...
2
by: Michael | last post by:
Hi, In VB6 I wrote an application that had to read lots of fixed length disk records from another system. These records were divided up into many fixed length fields. In VB6 the easy solution...
7
by: John | last post by:
hi, i have created a search form, and i want to search for a specific item in a field. e.g. i have a field called colour, which has record1 = 'red, blue, green' and another record2 = 'red' ...
8
by: sexauthor | last post by:
I'm converting a VB6 application over that called a 3rd party DLL with specific data structures. The VB6 code defined custom types for those data structures (ie: one with the specific data types,...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.