CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Dec 2000
    Location
    NY
    Posts
    324

    0xC0000096: Privileged Instruction???

    Hi All

    what this error means?

    First-chance exception in test.exe (MYDLL.DLL): 0xC0000096: Privileged Instruction.

    thnax


  2. #2
    Join Date
    Aug 2001
    Posts
    10

    Re: 0xC0000096: Privileged Instruction???

    Hi there
    Here i would like to explain both first chance exception and privileged instructions seprately.
    First - First chance exception

    Structured exception handling (SEH) takes a little getting used to, particularly when debugging. It is common practice to use SEH as a signaling mechanism. Some application programming interfaces (APIs) register an exception handler in anticipation of a failure condition that is expected to occur in a lower layer. When the exception occurs, the handler may correct or ignore the condition rather than allowing a failure to propagate up through intervening layers. This is very handy in complex environments such as networks where partial failures are expected and it is not desirable to fail an entire operation simply because one of several optional parts failed. In this case, the exception can be handled so that the application is not aware that an exception has occurred.

    However, if the application is being debugged, it is important to realize that the debugger will see all exceptions before the program does. This is the distinction between the first and second chance exception. The debugger gets the "first chance," hence the name. If the debugger continues the exception unhandled, the program will see the exception as usual. If the program does not handle the exception, the debugger will see it again (the "second chance"). In this latter case, the program normally would have crashed had the debugger not been present.


    Now Privileged Instruction -

    Win32-based applications that call inp(), outp(), and so forth can be successfully compiled and linked. However, these applications will generate the privileged instruction exception because the port I/O functions cannot be called from code running in user mode.

    Do not call the following functions from within a Win32-based application executing in user mode:

    _inp()
    _inpw()
    _inpd()
    _outp()
    _outpw()
    _outpd()


    I hope this answers your question.



    Savinder

  3. #3
    Join Date
    Sep 2006
    Posts
    1

    Re: 0xC0000096: Privileged Instruction???

    Please
    I want use paralell port
    other alternative or other funtions.
    Thanks

  4. #4
    Join Date
    Feb 2002
    Posts
    4,640

    Re: 0xC0000096: Privileged Instruction???

    Quote Originally Posted by Omar45
    Please
    I want use paralell port
    other alternative or other funtions.
    Thanks
    What does this have to do with the original question?

    You should post a new thread, and explain your problem a little more.

    Viggy

  5. #5
    Join Date
    Jun 2006
    Location
    Bangalore, India
    Posts
    332

    Re: 0xC0000096: Privileged Instruction???

    If you need to access LPT or similar ports take a look at this link. This will provide with the indepth details.
    Last edited by kumaresh_ana; September 21st, 2006 at 11:50 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured