From - Tue Sep 16 08:08:27 1997 Path: news.mitre.org!blanket.mitre.org!news.tufts.edu!cam-news-feed5.bbnplanet.com!cam-news-hub1.bbnplanet.com!cpk-news-hub1.bbnplanet.com!news.bbnplanet.com!news-peer.sprintlink.net!news-sea-19.sprintlink.net!news-in-west.sprintlink.net!news.sprintlink.net!Sprint!159.56.2.2!thetimes.pixel.kodak.com!news.kodak.com!newsserver.rdcs.Kodak.COM!not-for-mail From: TVLE Newsgroups: comp.os.ms-windows.programmer.nt.kernel-mode Subject: Help: OpenEvent fails with an ERROR_ACCESS_DENIED?? Date: Mon, 15 Sep 1997 17:04:29 -0500 Organization: Eastman Kodak Company Lines: 37 Message-ID: <341DB0ED.4D78@KODAK.COM> Reply-To: TVLE NNTP-Posting-Host: hypercube.hidal.kodak.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 2.01Gold (WinNT; I) Hi everyone-- I use IoCreateNotificationEvent() in my driver to signal when my PCI board has data available to be read. In my user app, after I CreateFile() to open a handle to my driver, I OpenEvent() to get the handle to the event. Why does OpenEvent()fail with a GetLastError of ERROR_ACCESS_DENIED? Please help me to understand what it is that I'm doing wrong. Thanks in advance.. // open driver if ((m_driverHandle = CreateFile(driverName, GENERIC_WRITE | GENERIC_READ, 0, // no file sharing 0, // no security descriptor OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL|FILE_FLAG_OVERLAPPED, 0 // no template file )) != INVALID_HANDLE_VALUE) { // driver opened successfully // open a handle to the board data available event m_boardDataAvailableEventHandle = ::OpenEvent(SYNCHRONIZE, FALSE, DATA_AVAILABLE_EVENT_NAME0); if (m_boardDataAvailableEventHandle == NULL) { CString error; error.Format("OpenEvent failed! Error = 0x%.8x",GetLastError()); AfxMessageBox((LPCTSTR)error); return STATUS_OPEN_DATA_AVAIL_EVENT_FAILED; } // create a thread to wait on the event and read data from the // board into the circular buffer // ... // ... }