CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: ActiveX Dll

  1. #1
    Join Date
    Feb 2001
    Posts
    25

    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





  2. #2
    Join Date
    Oct 2001
    Location
    Phoenix, AZ
    Posts
    54

    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
  •  





Click Here to Expand Forum to Full Width

Featured