473,785 Members | 2,576 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Convert VB6 Type To .NET Structure

Dan
Good Day All,

I have the following VB6 Type

Type IAListRecordTyp e
lID As Long
strName As String * IALISTSTRSIZE
End Type

I need to convert this to VB .NET. How do I do this? I have come up with

Structure IATaskListRecor dType
Dim lID As Long
Dim strName As String * IATASKLISTSTRSI ZE
End Structure

However, the * IATASKLISTSTRSI ZE will not compile. I get a message

"End Of Statement Expected"

Any suggestions would be appreciated. Thanks!

Dan
Nov 20 '05 #1
3 3367
The syntax is incorrect, what are you expecting to happen with this line.?

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
"Dan" <Da*@discussion s.microsoft.com > wrote in message
news:6C******** *************** ***********@mic rosoft.com...
Good Day All,

I have the following VB6 Type

Type IAListRecordTyp e
lID As Long
strName As String * IALISTSTRSIZE
End Type

I need to convert this to VB .NET. How do I do this? I have come up with

Structure IATaskListRecor dType
Dim lID As Long
Dim strName As String * IATASKLISTSTRSI ZE
End Structure

However, the * IATASKLISTSTRSI ZE will not compile. I get a message

"End Of Statement Expected"

Any suggestions would be appreciated. Thanks!

Dan

Nov 20 '05 #2
Hi,

The dotnet integer is the same as the old long. Replace any longs with
integers.

Structure IATaskListRecor dType
Dim lID As Integer
<VBFixedString( IATASKLISTSTRSI ZE)> Dim strName As String
End Structure

Ken
---------------

"Dan" <Da*@discussion s.microsoft.com > wrote in message
news:6C******** *************** ***********@mic rosoft.com:
Good Day All,

I have the following VB6 Type

Type IAListRecordTyp e
lID As Long
strName As String * IALISTSTRSIZE
End Type

I need to convert this to VB .NET. How do I do this? I have come up with

Structure IATaskListRecor dType
Dim lID As Long
Dim strName As String * IATASKLISTSTRSI ZE
End Structure

However, the * IATASKLISTSTRSI ZE will not compile. I get a message

"End Of Statement Expected"

Any suggestions would be appreciated. Thanks!

Dan


--
Outgoing mail is certified Virus Free.
Checked by AVG Anti-Virus (http://www.grisoft.com).
Version: 7.0.230 / Virus Database: 263.3.0 - Release Date: 6/12/2004
Nov 20 '05 #3
Dan
Ken,

Thanks for the quick response. That did the trick. I really appreciate it.

Dan

"Ken Tucker [MVP]" wrote:
Hi,

The dotnet integer is the same as the old long. Replace any longs with
integers.

Structure IATaskListRecor dType
Dim lID As Integer
<VBFixedString( IATASKLISTSTRSI ZE)> Dim strName As String
End Structure

Ken
---------------

"Dan" <Da*@discussion s.microsoft.com > wrote in message
news:6C******** *************** ***********@mic rosoft.com:
Good Day All,

I have the following VB6 Type

Type IAListRecordTyp e
lID As Long
strName As String * IALISTSTRSIZE
End Type

I need to convert this to VB .NET. How do I do this? I have come up with

Structure IATaskListRecor dType
Dim lID As Long
Dim strName As String * IATASKLISTSTRSI ZE
End Structure

However, the * IATASKLISTSTRSI ZE will not compile. I get a message

"End Of Statement Expected"

Any suggestions would be appreciated. Thanks!

Dan


--
Outgoing mail is certified Virus Free.
Checked by AVG Anti-Virus (http://www.grisoft.com).
Version: 7.0.230 / Virus Database: 263.3.0 - Release Date: 6/12/2004

Nov 20 '05 #4

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

Similar topics

1
5660
by: phancey | last post by:
I am trying to invoke a web service method dynamically. I have created a generic function that takes a method name, string of parameters and calls the web method using System.Reflection: MethodInfo mi = proxyInstance.GetType().GetMethod(methodName); object paramsArray = (object)methodParams.ToArray(typeof(object)); object result = mi.Invoke(proxyInstance, paramsArray); where methodParams is an array of parameters where the value...
7
3433
by: Randy Yates | last post by:
Hi, I work in an embedded environment in which we often use a mix of C and assembly code. Thus a recurring requirement is to be able to take a C header file with structure definitions as input and create an assembly include file with the structure member offsets defined. The problem is that the structure offsets are a complicated function of other syntactic elements such as other structures (I could have a structure as a member of...
2
12198
by: Mel WEaver | last post by:
Hello, I have the following delphi structure for a binary file. I'm looking for idea how to read this file. Mel type TMenuDataStruct = packed record exename : string;
9
12689
by: Charles Law | last post by:
Suppose I have a structure Private Structure MyStruct Dim el1 As Byte Dim el2 As Int16 Dim el3 As Byte End Structure I want to convert this into a byte array where
8
4548
by: Carlos | last post by:
I have a strinf with comma separated field. Is is possible to convert it to a Structure ? Thanks
2
4980
by: Jarod_24 | last post by:
Structure myXMLtype Dim Filename As String Dim sql As String End Structure .... Dim obj as New ArrayList ...... return CType(obj.ToArray, myXMLtype) 'This wont work
6
4263
by: Eric | last post by:
.... my eternal gratitude!!! :p Here is the problem. A sample of my original VB6 code : '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Public Type INFO name(1 To 3) As String * 41 address As String * 41 End Typ ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
1
1147
by: Peter | last post by:
Does anybody know how to convert a string to a varible? For example, I have defined 2 structures Structure SS dim Name as string dim ID as short end structure Structure TT
7
3146
by: manstey | last post by:
Hi, How do I convert a string like: a="{'syllable': u'cv-i b.v^ y^-f', 'ketiv-qere': 'n', 'wordWTS': u'8'}" into a dictionary: b={'syllable': u'cv-i b.v^ y^-f', 'ketiv-qere': 'n', 'wordWTS': u'8'} Thanks, Matthew
0
9485
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10161
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8986
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7506
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5390
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5523
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4058
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3662
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2890
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.