Wrox Programmer Forums
|
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 3rd, 2004, 03:34 PM
Registered User
 
Join Date: Jun 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Signaling A Remote Event

I have a program that I have written in VB.NET that needs to signal an event. The program is kicked off by a parent program and when the VB.NET program is kicked off, the parent program creates an event and stores the event object name in an environment variable. I can get the event object name, but I am not sure how to signal it.

Here is some C++ from another program that does what I am trying to do:

if( GetEnvironmentVariable("Notify",szValue,sizeof(szV alue)) )
{
hEvent = OpenEvent(EVENT_ALL_ACCESS,FALSE,szValue);
if( NULL == hEvent )
{
printf("AppStarted OpenEvent failed %d <%s>\n",
GetLastError(),szValue);
goto RET;
}
}
if (!SetEvent(hEvent))
{
printf("AppStarted SetEvent failed %d <%s>\n",
GetLastError(),
szValue);
goto RET;
}
}


Here is what I have so far in VB.NET:

Dim szNotify as String
szNotify = Environment.GetEnvironmentVariable("Notify")
DebugPrint("Notify: " & Notify, 1)

If (szNotify.Length > 0) Then

'** Set Event Here... Some How.

End If



Does anyone know how to do this?






Similar Threads
Thread Thread Starter Forum Replies Last Post
"The remote name could not be resolved" teddyk ASP.NET 2.0 Basics 0 October 28th, 2008 12:49 AM
Event - Sender & Event args dash dev C# 2005 9 December 9th, 2007 07:24 AM
Remote Scripting anandham ASP.NET 2.0 Basics 0 December 21st, 2005 09:22 AM
About Button event and Keydown event zhangxujun1981 XSLT 1 March 6th, 2004 04:59 AM
how to override an event with an event? blah VB.NET 2002/2003 Basics 5 November 13th, 2003 03:06 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.