Jason B
Mar 10th, 2001, 06:37 PM
Hi... I very new to VC++ but i have been programming in VB for a long time now.. I want to create a dll in Visual C++ to be used in VB. I am writing it in VC because what i want to Code wont work in VB code.. Typical Huh? Anyway.. the structure which i want to write it in is as follows..
***** Code Start Here *****
'local variable(s) to hold property value(s)
Private mvarResponseCode As String 'local copy (Max Length = 2)
Private mvarResponseText As String 'local copy (Max Length = 20)
Private mvarPort As String 'local copy (Max Length = 1)
Private mvarPrintString As String 'local copy (Max Length = MAX_BUFF_SIZE)
Private Function PrinterOnline() As Boolean
End Function
Private Sub PrintData()
End Sub
Public Sub Start()
End Sub
Public Property Let PrintString(ByVal vData As String)
'used when assigning a value to the property, on the left side of an assignment.
'Syntax: X.PrintString = 5
mvarPrintString = vData
End Property
Public Property Get PrintString() As String
'used when retrieving value of a property, on the right side of an assignment.
'Syntax: Debug.Print X.PrintString
PrintString = mvarPrintString
End Property
Public Property Let Port(ByVal vData As String)
'used when assigning a value to the property, on the left side of an assignment.
'Syntax: X.Port = 5
mvarPort = vData
End Property
Public Property Get Port() As String
'used when retrieving value of a property, on the right side of an assignment.
'Syntax: Debug.Print X.Port
Port = mvarPort
End Property
Public Property Get ResponseText() As String
'used when retrieving value of a property, on the right side of an assignment.
'Syntax: Debug.Print X.ResponseText
ResponseText = mvarResponseText
End Property
Public Property Get ResponseCode() As String
'used when retrieving value of a property, on the right side of an assignment.
'Syntax: Debug.Print X.ResponseCode
ResponseCode = mvarResponseCode
End Property
***** Code ENDS Here *****
Could someone please show me how to create a structure in VC++ which is exactly the same as the one i have pasted above..
Thanks Heaps
***** Code Start Here *****
'local variable(s) to hold property value(s)
Private mvarResponseCode As String 'local copy (Max Length = 2)
Private mvarResponseText As String 'local copy (Max Length = 20)
Private mvarPort As String 'local copy (Max Length = 1)
Private mvarPrintString As String 'local copy (Max Length = MAX_BUFF_SIZE)
Private Function PrinterOnline() As Boolean
End Function
Private Sub PrintData()
End Sub
Public Sub Start()
End Sub
Public Property Let PrintString(ByVal vData As String)
'used when assigning a value to the property, on the left side of an assignment.
'Syntax: X.PrintString = 5
mvarPrintString = vData
End Property
Public Property Get PrintString() As String
'used when retrieving value of a property, on the right side of an assignment.
'Syntax: Debug.Print X.PrintString
PrintString = mvarPrintString
End Property
Public Property Let Port(ByVal vData As String)
'used when assigning a value to the property, on the left side of an assignment.
'Syntax: X.Port = 5
mvarPort = vData
End Property
Public Property Get Port() As String
'used when retrieving value of a property, on the right side of an assignment.
'Syntax: Debug.Print X.Port
Port = mvarPort
End Property
Public Property Get ResponseText() As String
'used when retrieving value of a property, on the right side of an assignment.
'Syntax: Debug.Print X.ResponseText
ResponseText = mvarResponseText
End Property
Public Property Get ResponseCode() As String
'used when retrieving value of a property, on the right side of an assignment.
'Syntax: Debug.Print X.ResponseCode
ResponseCode = mvarResponseCode
End Property
***** Code ENDS Here *****
Could someone please show me how to create a structure in VC++ which is exactly the same as the one i have pasted above..
Thanks Heaps