Re: openevent win ce 5.0, returns error code 183

Tech-Archive recommends: Fix windows errors by optimizing your registry



I'm quite sure that CreateEvent and OpenEvent end up calling the same
function in the kernel so I imagine that ou get ERROR_ALREADY_EXIST as if
you were calling CreateEvent
on an existing event. You can check the code in
%_WINCEROOT%\\PRIVATE\WINCEOS\COREOS\NK\KERNEL if you installed it to figure
out the details

--
Luca Calligaris (MVP-Windows Embedded)
l.calligaris.nospam@xxxxxxxxxxxxxxxxxx
www.eurotech.it


"Yaakov Fruchtnis" <YaakovFruchtnis@xxxxxxxxxxxxxxxxxxxxxxxxx> ha scritto
nel messaggio news:1D958C28-B7DB-4C9D-BAD1-CD4424043E66@xxxxxxxxxxxxxxxx
I have a system, in which the WCE image creates an event by a certain name
x.
The code I run in my application is :

=========================
// print GetLastError()
HANDLE h = OpenEvent(EVENT_ALL_ACCESS,FALSE, _T("x") );
// print GetLastError()
=========================

and I get the event handle, which is of OK value.
But, in the GetLastError right after that, I get the return code 183,
which
indicates that the event is already created.

Why do I get that error code, when I did not ask to create the event, but
just to open/connect to it?

btw, the event handle works fine, and I can run all event functions on it.


.



Relevant Pages

  • Re: How to print from network printer ??????
    ... Why are you calling GetLastError? ... M trying to print image by calling print api ... netwrk printers ....... ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: I Just Want to Copy Text to the Clipboard
    ... In the following code (GetLastError calls added for debugging): ... OpenClipboard returns TRUE. ... but how about calling OpenClipboard a second ... What's so terrible about creating a hidden window? ...
    (microsoft.public.win32.programmer.kernel)
  • Re: GetLastError issues.
    ... calling it yourself just before calling WriteFile. ... GetLastError() returns whatever you passed to SetLastError(), ... >> Michael Salamone ...
    (microsoft.public.windowsce.embedded)
  • Re: GetLastError issues.
    ... calling it yourself just before calling WriteFile. ... GetLastError() returns whatever you passed to SetLastError(), ... >> Michael Salamone ...
    (microsoft.public.windowsce.app.development)
  • Re: a synchronization issue - jusy for you guys
    ... CreateEvent: ... If the function succeeds, the return value is a handle to the event ... the function returns a handle to the existing object and GetLastError ... To get extended error ...
    (comp.lang.pascal.delphi.misc)