Thread: Need help understanding this: Error -1073741819

  1. #16
    Registered User awsdert's Avatar
    Join Date
    Jan 2015
    Posts
    1,733
    I tried command line yesterday, tried double clicking via explorer still won't get anywhere, the very first thing it does is attempt to load the dll then reports it is going to try the API, then it checks the handle and reports failue in the event of a NULL handle and skips the rest of the code via a goto statement, otherwise it calls pawAPI( &paw, 0 ) to retrieve the default API, it then reports either failure or success of that and then cleans up before closing down. It does not even reach that first message which implies something goes wrong at the loading of the exe &/or dll

    Edit: Seriously just look at the code before you make your next question, it has all the info you need
    paw/pawchk.c at master * awsdert/paw * GitHub
    Last edited by awsdert; 06-02-2018 at 03:35 AM.

  2. #17
    Registered User awsdert's Avatar
    Join Date
    Jan 2015
    Posts
    1,733
    Think I may have found the problem, I didn't realise that I had to tell gcc to manually define _WIN64 & _WIN32 despite having used the -mwindows flag, after having done that I finally got a more meaningful error (although I still don't know why I get it), the error I got was lack of WinMain (even though it is definitly there - incorrect definition perhaps?) so I'm gonna try some stuff then report back

    Edit: Yep that was definitly the problem, as for the missing WinMain it was because my last edit of the makefile forgot to update some variable names in the exe compiling stage
    Last edited by awsdert; 06-02-2018 at 05:52 AM.

  3. #18
    Registered User
    Join Date
    May 2009
    Posts
    4,183
    Trouble-shooting is a lost art because people do not wish to learn how to do it! All this time, I thought people were not being taught it in schools as the issue.

    Tim S.
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

  4. #19
    Registered User
    Join Date
    May 2010
    Posts
    4,632
    the very first thing it does is attempt to load the dll then reports it is going to try the API, then it checks the handle and reports failue in the event of a NULL handle and skips the rest of the code via a goto statement,
    goto, really?? No wonder you're having problems.

    By the way I would be careful about returning a negative value from main(), I would stick with positive values that can be represented by an unsigned char when working with gcc (not sure about Visual C).

  5. #20
    Registered User awsdert's Avatar
    Join Date
    Jan 2015
    Posts
    1,733
    Quote Originally Posted by jimblumberg View Post
    goto, really?? No wonder you're having problems.
    when used correctly goto is not a problem, besides I normally only use goto to cut down on repeated closing calls to things like free() or CloseHandle() such as
    Code:
    goto main_free_tmp;
    Quote Originally Posted by jimblumberg View Post
    By the way I would be careful about returning a negative value from main(), I would stick with positive values that can be represented by an unsigned char when working with gcc (not sure about Visual C).
    Thanks for the advice, for now I just switched to throw GetLastError() into it instead so at the very least the system should be able to understand it

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help In Understanding Error
    By trey.nobles in forum C Programming
    Replies: 3
    Last Post: 09-04-2016, 06:23 PM
  2. Replies: 14
    Last Post: 07-06-2016, 01:48 PM
  3. Process terminated with status -1073741819
    By smithx in forum C Programming
    Replies: 5
    Last Post: 11-01-2010, 11:13 PM
  4. Help understanding error message
    By kotoko in forum C Programming
    Replies: 2
    Last Post: 01-13-2009, 11:57 AM
  5. new question: understanding parse error
    By Pig in forum C++ Programming
    Replies: 3
    Last Post: 11-19-2003, 01:14 PM

Tags for this Thread