Multithreading in VB 6.0... 
Author Message
 Multithreading in VB 6.0...

Hello all,

I have a Client Application (Std.Exe) doing some long-
running database queuries (maybe 1 minute). This query
must NOT block the Client Application so I want to do this
by using an Out-of-Process COM-server (ActiveX EXE).

But - no matter what I do with this server (ActiveX EXE),  
the Client is just blocked completely.

See codesnippet below.

Thanks in advance!!
/Clkon

Client App:
Private WithEvents oObj As ActiveX_COM.CClass
Private Sub Command4_Click()
 Set oObj = New ActiveX_COM.CClass
 oObj.QueryDB "argument1"
 MsgBox "done on calling oMail.send"
 Set oMail = Nothing
end sub

Private sub oObj_Done()
MsgBox "Client: Query done!"
End sub

ActiveX_COM.CClass:
Public event Done()

Public sub QueryDB (byval argument as string)
do some stuff...

RaiseEvent Done

end sub



Sun, 16 Jan 2005 04:49:41 GMT  
 Multithreading in VB 6.0...

Hello all,

I have a Client Application (Std.Exe) doing some long-
running database queuries (maybe 1 minute). This query
must NOT block the Client Application so I want to do this
by using an Out-of-Process COM-server (ActiveX EXE).

But - no matter what I do with this server (ActiveX EXE),  
the Client is just blocked completely.

The following MS KB article should help you:

HOWTO: Use Events to Generate Asynchronous Callbacks
http://support.microsoft.com/default.aspx?scid=KB;EN-US;q176951&


Microsoft MVP (Visual Basic)



Sun, 16 Jan 2005 06:54:09 GMT  
 Multithreading in VB 6.0...

Quote:

> I have a Client Application (Std.Exe) doing some long-
> running database queuries (maybe 1 minute). This query
> must NOT block the Client Application so I want to do this
> by using an Out-of-Process COM-server (ActiveX EXE).

This might not be a good idea, since passing lots of data between
processes or even between threads is slow with ActiveX components
written in VB.  Could you use "asynchronous queries" instead?

 URL:http://groups.google.com/groups?selm=e19x92pICHA.668%40tkmsftngp09

--
Joe Foster <mailto:jlfoster%40znet.com>  Sacrament R2-45 <http://www.xenu.net/>
WARNING: I cannot be held responsible for the above        They're   coming  to
because  my cats have  apparently  learned to type.        take me away, ha ha!



Sun, 16 Jan 2005 10:03:30 GMT  
 Multithreading in VB 6.0...
Thanks Poul,

That article was exactly what I was missing...

Rgds.
/Clkon

Quote:
>-----Original Message-----
>On Tue, 30 Jul 2002 13:49:41 -0700, "clkon"

> Hello all,
>
> I have a Client Application (Std.Exe) doing some long-
> running database queuries (maybe 1 minute). This query
> must NOT block the Client Application so I want to do
this
> by using an Out-of-Process COM-server (ActiveX EXE).
>
> But - no matter what I do with this server (ActiveX
EXE),  
> the Client is just blocked completely.
>

>The following MS KB article should help you:

>HOWTO: Use Events to Generate Asynchronous Callbacks
>http://support.microsoft.com/default.aspx?scid=KB;EN-
US;q176951&


>Microsoft MVP (Visual Basic)
>.



Sun, 16 Jan 2005 15:26:28 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Abt Multithreading in VB 6.0

2. Abt Multithreading in VB 6.0

3. VB 6.0 - Visual FoxPro 6.0 Tables and VB

4. VB 6.0 reports vs. Crystal 6.0

5. VB 6.0 and IE 6.0 system OCXs and DLLs incompatibilities

6. VB 6.0, Crystal 6.0 & ODBC

7. VB 6.0 and Crystal Reports 6.0

8. VB 6.0 reports vs. Crystal 6.0

9. VB 6.0 DLL debugging from ASP/IIS 6.0 in Windows 2003 Server

10. Change printing orientation or page setup in IE 6.0 with VB 6.0

11. VB 6.0 and IE 6.0

12. RightFax 6.0 and Crystal 8.5 and VB 6.0 Font size

 

 
Powered by phpBB® Forum Software