|
-
October 19th, 2001, 04:05 PM
#1
ActiveX Dll
I am creating a ActiveX Dll. Within my Dll I have a class (Thing.cls) and a form (frmThing). My Question is, How can I pass data from frmThing to Thing.cls without making a public Sub/Function in Thing.cls. I included code fragment below.
'-: ActiiveX Dll
Option Explicit
'Thing: Class
Private m_TheForm As Form
Private Sub Class_Initialize()
Set m_TheForm = new frmThing
End Sub
.
.
____________________________________________________________
Option Explicit
'frmThing: Form
.
.
Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Dim byaData() as Byte
Redim byaData(bytesTotal)
Winsock1.GetData byaData
'For example:
'Need to pass byaData here back to Thing.cls
'But do not want the function to be
'accessable by the dll user.
End Sub
-
October 19th, 2001, 04:22 PM
#2
Re: ActiveX Dll
Use a Friend function in your class. It is only visible to the project itself and not the instantiater.
friend mySub(myVar as byte)
... modify your member variables here.
End Sub
Software is like sex, it's better when it's free - Linus Torvalds
Software is like sex, it's better when I get paid for it. - me
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|