marshall EventWaitHandle reference between .Net COM library and VB6executable

S

swartzbill2000

Hello,

I am using a VB.Net COM library to provide multi-threading to an
existing VB6 app. Library functions that start background operations
create an EventWaitHandle to be used to cancel the operation. How can
I return some kind of reference to the EventWaitHandle to the VB6 app
that can be used later in another library function call to cancel the
operation?

Bill
 
H

Herfried K. Wagner [MVP]

I am using a VB.Net COM library to provide multi-threading to an
existing VB6 app. Library functions that start background operations
create an EventWaitHandle to be used to cancel the operation. How can
I return some kind of reference to the EventWaitHandle to the VB6 app
that can be used later in another library function call to cancel the
operation?

Take a look at the overloaded constructor of 'EventWaitHandle'. Some
overloads accept a 'name' parameter which you can use to set the name of a
system-level event wait handle object. You can later use this name to get
access to the object by creating a new instance of the class and passing the
name to the constructor.
 
S

swartzbill2000

Take a look at the overloaded constructor of 'EventWaitHandle'. Some
overloads accept a 'name' parameter which you can use to set the name of a
system-level event wait handle object. You can later use this name to get
access to the object by creating a new instance of the class and passing the
name to the constructor.

Herfried,
Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top