|
Subject:
|
vb6 to vb.net conversion question
|
|
Posted By:
|
tomz
|
Post Date:
|
1/23/2004 3:48:06 PM
|
I have a vb6 appl that I am converting to vb.net. I am having trouble replacing/converting vb6 use of the LSet stmt (LSet is not supported in vb.net). Does anyone have any ideas? Thanks!
The vb6 code uses the following public types: Public Type SecurityAccessProps strUserName As String * 30 strApplID As String * 30 strApplType As String * 1 strApplDesc As String * 50 lngAccessLevel As Long dtDateLastUpdated As Date strLastUpdatedBy As String * 30 dtDateCreated As Date strCreatedBy As String * 30 blnIsNew As Boolean blnIsDeleted As Boolean blnIsDirty As Boolean End Type
Public Type SecurityAccessBuffer strBuffer As String * 186 End Type _____________________________________________________
The vb6 code is as follows:
Private mudtProps As SecurityAccessProps
Private Sub SetState(strBuffer As String) Const SUB_NAME = "SetState" Dim udtData As SecurityAccessBuffer udtData.strBuffer = strBuffer LSet mudtProps = udtData End Sub
Private Function GetState() As String Const SUB_NAME = "GetState" Dim udtData As SecurityAccessBuffer LSet udtData = mudtProps GetState = udtData.strBuffer
End Function
Is there a way in vb6 to re-write/replace the LSet stmt so the udtdata string buffer can be assigned the SecurityAccessType data and vice versa for the SetState & GetState functions? I need to keep the String functionality of the SetState & GetState functions. OR ... Is there a way to convert this code to vb.net without the LSet stmt? Again, I need to keep SetState & GetState as Strings.
Thanks Tomz
|
|
Reply By:
|
planoie
|
Reply Date:
|
1/26/2004 10:49:18 AM
|
Pardon my ignorance, I didn't have the pleasure of working with VB a whole lot.
What is LSet? Goggle spit back this which might help you: http://www.dotnet247.com/247reference/msgs/38/192700.aspx
Peter ------------------------------------------------------ Work smarter, not harder.
|
|
Reply By:
|
Hal Levy
|
Reply Date:
|
1/28/2004 9:51:45 AM
|
Personally, I wouldn't try to Port anything over- I'd rewrite.. it's usually less work.
Hal Levy Web Developer, PDI Inc.
NOT a Wiley/Wrox Employee
|