473,466 Members | 1,377 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

marshall EventWaitHandle reference between .Net COM library and VB6executable

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
Jul 25 '08 #1
2 1807
<sw************@yahoo.comschrieb:
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.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Jul 25 '08 #2
On Jul 25, 4:43 pm, "Herfried K. Wagner [MVP]" <hirf-spam-me-
h...@gmx.atwrote:
<swartzbill2...@yahoo.comschrieb:
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.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Herfried,
Thanks
Jul 29 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Dgdege | last post by:
Hi all, I want to wrapp an exiting API written in C++ to .NET using managed C++ extensions. I want my managed C++ class library to link with the unmanaged dll. So I don't use PInvoke for...
5
by: Kristoffer Persson | last post by:
Hi all! I'm trying to use a named EventWaitHandle to signal events between processes that run on the same computer. One of them is a service running as SYSTEM and the other one is a normal user....
6
by: HolyShea | last post by:
All, Not sure if this is possible or not - I've created a class which performs an asynchronous operation and provides notification when the operation is complete. I'd like the notification to be...
1
by: swapniliit2222 | last post by:
Hi I have a little problem, I have a source code which need to be compiled in two diffrent ways With some diffrent # defines in both cases. And I need to link both library to link to the same...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.