Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3282580
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T19:56:38+00:00 2026-05-17T19:56:38+00:00

I am in Windows 7 x64, and trying to use the same Event object

  • 0

I am in Windows 7 x64, and trying to use the same Event object between 2 processes, one is an vb application, and the other is a C++ application, but seems the event created in one process can’t be recognized in another one:

VB

Option Explicit

Private Type SECURITY_ATTRIBUTES
    nLength As Long
    lpSecurityDescriptor As Long
    bInheritHandle As Long
End Type

Private Declare Function OpenEvent Lib "Kernel32" Alias "OpenEventW" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, lpName As String) As Long


Const EVENT_ALL_ACCESS = &H1F0003

Sub Testing()
    Dim hCallEvent As Long
    hCallEvent = OpenEvent(EVENT_ALL_ACCESS, 0, "GUID_Call_Event")
End Sub


Private Sub Form_Load()
    Call Testing
End Sub

C++

int _tmain(int argc, _TCHAR* argv[])
{
    HANDLE hEvent = ::CreateEvent(NULL, FALSE, FALSE, _T("GUID_Call_Event"));

    DWORD dwError = ::GetLastError();
    return 0;
}

Now if I start the C++ application to have the event created, and then start the vb application to get that event, it just failed with error message: “The system cannot find the file specified.”

Notice:

  • It failed both with VB and VBA when interact with a C++ process, but succeeded between 2 C++ processes
  • Event created in VB could not be identified in a C++ process either.

Do you have any idea on this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T19:56:38+00:00Added an answer on May 17, 2026 at 7:56 pm

    You are trying to use OpenEventW in VB6.

    Quite likely, you actually want to use OpenEventA, in which case the declaration must be fixed like this:

    Private Declare Function OpenEvent Lib "Kernel32" Alias "OpenEventA" _
      (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal lpName As String) As Long 
    

    But, if you actually want to use OpenEventW, you must do this:

    Private Declare Function OpenEvent Lib "Kernel32" Alias "OpenEventW" _
      (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal lpName As Long) As Long 
    

    and then

    hCallEvent = OpenEvent(EVENT_ALL_ACCESS, 0, StrPtr("GUID_Call_Event"))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using VMware Workstation 6.5 on Windows Vista x64. I am trying to
So I'm trying to use IApplicationAssociationRegistration , which has been introduced with Windows Vista.
I'm trying to use the Windows 7 Taskbar API to set the overlay icon
I'm using Windows Vista x64 with SP1, and I'm developing an ASP.NET app with
I am using VMware Workstation 6.5 on Windows Vista x64. I would like to
Windows 6 (Vista and Server 2008) support proper symbolic links, which can be created
I'm trying to use APPCMD to set debug=false in web.config , per the documentation
I am trying to use Dotfuscator (CE) to help protect our ASP.NET MVC .ddl.
I'm trying to use the Remote Desktop API on a remote machine that I
I'm trying to use the post build command line to get my class library

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.