VB6 Guru needed: VB6 Multithreaded ActiveX exe and Typelibs 
Author Message
 VB6 Guru needed: VB6 Multithreaded ActiveX exe and Typelibs

I'm not sure I understand your problem, but have you considered making the
subject item public but hidden via {Tools | Procedure Attributes}. This will
make a member hidden unless the user right-clicks on the Object Browser to
display hidden members.

If it's within the same project there is also the "Friend ProcName" vs.
"Public ProcName".

--
Monte Hansen
Vb Yuk Yuk

No spam please


Quote:
> Good day,

> I have a question for a Visual Basic/ActiveX guru.
> Thank you in advance for your help.

> I'm developping an ActiveX exe with VB6 to perform asynchronous
operations.
> I have read roundabout 20 times "building code components" in my MSDN to
> understand the circular references,
> correct thread creation and destruction, call backs and so on. I have
> eventualy made a fully operational multithread
> VB component and it runs fine.

> The component contains two classes designed to run in two different
threads
> (instancing property set to MultiUse)
> * The first class InterfClass contains all the operations the component's
> user is able to do, it also
> contains a number of events to report errors and completions.
> * The second class IOClass contains the actual monitoring of system events
> using the WaitForMultipleObjects API.
> the ioclass object is created by the interfclass object during its
> initialization.
> It also has a class DefsClass, defined as PublicNotCreatable used to store
> constants for the programmer's use.

> So what's the problem?
> I don't want the component users to be confused by the IOClass, I want
them
> to be able to create the
> InterfClass only, IOClass doing its job as a "backgroung thread" hidden to
> the programmer.
> Problem #1: If I want to hide the IOClass in the Typelib, I have to set
the
> instancing property to "Private".
>   This causes a problem when using CreateObject (because the class is not
in
> the typelib)
> Problem #2: If I use New instead of CreateObject to create IOClass, the
> object creation is ok,
>   but it is created in the InterfClass thread. Thus I lose the
> multithreading capability.

> Related Problems:
> InterfClass ans IOClass need to exchange information. In a VB 6.0
> multithreaded environment,
> only Public Functions, Subs and Properties can do this.
> This makes them visible in the typelib, however they should be "Friend"
and
> not appear in the typelib.

> Q1: Is there a way to hide the IOClass in the Typelib and still being able
> to start a new thread when I create
>  an IOClass object from inside my component?
> Q2: Is there a way (besides a friend declaration) to hide some InterfClass
> functions and still being able to call
>  them from the IOClass object?

> Thank you for your help.

> --------------------------------------------------------------------
> Marc PERSONENI
> Cipango Pty Ltd Australia
> -------------------------------------------------------------------



Fri, 12 Jul 2002 03:00:00 GMT  
 VB6 Guru needed: VB6 Multithreaded ActiveX exe and Typelibs
Good day,

I have a question for a Visual Basic/ActiveX guru.
Thank you in advance for your help.

I'm developping an ActiveX exe with VB6 to perform asynchronous operations.
I have read roundabout 20 times "building code components" in my MSDN to
understand the circular references,
correct thread creation and destruction, call backs and so on. I have
eventualy made a fully operational multithread
VB component and it runs fine.

The component contains two classes designed to run in two different threads
(instancing property set to MultiUse)
* The first class InterfClass contains all the operations the component's
user is able to do, it also
contains a number of events to report errors and completions.
* The second class IOClass contains the actual monitoring of system events
using the WaitForMultipleObjects API.
the ioclass object is created by the interfclass object during its
initialization.
It also has a class DefsClass, defined as PublicNotCreatable used to store
constants for the programmer's use.

So what's the problem?
I don't want the component users to be confused by the IOClass, I want them
to be able to create the
InterfClass only, IOClass doing its job as a "backgroung thread" hidden to
the programmer.
Problem #1: If I want to hide the IOClass in the Typelib, I have to set the
instancing property to "Private".
  This causes a problem when using CreateObject (because the class is not in
the typelib)
Problem #2: If I use New instead of CreateObject to create IOClass, the
object creation is ok,
  but it is created in the InterfClass thread. Thus I lose the
multithreading capability.

Related Problems:
InterfClass ans IOClass need to exchange information. In a VB 6.0
multithreaded environment,
only Public Functions, Subs and Properties can do this.
This makes them visible in the typelib, however they should be "Friend" and
not appear in the typelib.

Q1: Is there a way to hide the IOClass in the Typelib and still being able
to start a new thread when I create
 an IOClass object from inside my component?
Q2: Is there a way (besides a friend declaration) to hide some InterfClass
functions and still being able to call
 them from the IOClass object?

Thank you for your help.

--------------------------------------------------------------------
Marc PERSONENI
Cipango Pty Ltd Australia
-------------------------------------------------------------------



Sat, 13 Jul 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Question about Multithreaded ActiveX Contol and VB6

2. VB6 - SP5 exe generates drWatson during OLE communication with VB6 - SP3 exe

3. Can't open VB6 because VB6 caused a stack fault in module VB6.EXE

4. Can't open VB6 because VB6 caused a stack fault in module VB6.EXE

5. VB6 Guru - I need to thread a server

6. GURU needed: VB6 webbrowser: Detect Navigation to local File system -- suppress new window

7. Passing data between objects of a multithreaded ActiveX EXE

8. Multithreaded ActiveX exe behaves odd on NT Server!

9. Multithreaded ActiveX Exe's

10. Multithreaded ActiveX Exe's

 

 
Powered by phpBB® Forum Software