Thread: Viruses error code!!

  1. #1
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    2,158

    Viruses error code!!

    When I call StartServiceCtrlDispatcher I get -1073741819 error code. And it's not in winerr.h so I don't know what it means. After googling it I found that many people's security systems returned that error code when they where infected by a virus. I don't think I have a virus, but that does make me wonder why my program does this. Any one know what this code means?

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    I think you can find 0xC0000005 in the error codes, which is the hex version of the number you've just given.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    2,158
    I've already looked, the hex isn't there either.

    I found this from msdn.
    Quote Originally Posted by http://support.microsoft.com/kb/306497
    This problem can be caused by an access violation that happens randomly because an uninitialized handle was passed by a downlevel layer.
    What does THAT mean??

  4. #4
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    2,158
    I just read some more, and there are other places that mention access violation.
    Could the be because my program access rights arn't high enough?

  5. #5
    Registered User
    Join Date
    Mar 2005
    Location
    Mountaintop, Pa
    Posts
    1,058
    That's a STATUS_ACCESS_VIOLATION error code. Let me take a wild guess here and assume you are calling HeapAlloc somewhere in your code. If so, are your function input parms correct?

  6. #6
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    STATUS_ACCESS_VIOLATION can happen for ALL sorts of reasons - they are all related to passing invalid values into the kernel or in other ways accesing memory in an invalid way.

    It's basicly "you tried to access some memory that doesn't exist" (that memory could be referenced through a pointer, a handle or any out of a number of other ways to get to a memory address - incorrectly telling Windows how many elements you have in some array can lead to this too).

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  7. #7
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    2,158
    No, even with debugging privs it happens.
    I'm not calling HeapAlloc.
    matsp, that makes sence, I will look through my code for this.

  8. #8
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    In particular, check for calls that are unsuccessfull and then continuing to "use" the data "returned" by the call, such as unsuccessfull file opening, invalid parameters to some other function and then using the "not filled in" parts that you expected back or some such.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. I hate Viruses........... :o
    By jawwadalam in forum A Brief History of Cprogramming.com
    Replies: 8
    Last Post: 01-04-2003, 11:13 AM
  2. Question - Emails - Viruses
    By MethodMan in forum Tech Board
    Replies: 2
    Last Post: 12-30-2002, 04:57 PM
  3. Why do people thing viruses are cool?
    By VirtualAce in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 11-12-2001, 04:55 AM