Thread: Please point out the obvious

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User deoren's Avatar
    Join Date
    Mar 2003
    Posts
    63

    Question Please point out the obvious

    Hello all,

    I've recently decided to learn C++, and my lack of motivation to do so has been that I learned C first. Unfortunately I never learned it in depth, and I certainly don't know C++ in depth.

    So, yes, I'm another newbie.

    I have a program which compiles, and works, but if I use VC++ 6.0 to compile it, I get ESP errors. I've done quite a bit of looking around the net, and I keep coming back to what the compiler tells me.

    ******************************************
    The value of ESP was not properly saved across a
    function call. This is usually a result of calling
    a function declared with one calling convention with
    a function pointer declared with a different calling
    convention.
    ******************************************

    I've attached the source file so everyone can see what I'm talking about.

    That's a bit cryptic for me, but some of you I'm sure it's obvious.

    Here is a couple things I do know:

    * This program properly compiles
    * This program properly executes once compiled (and linked) using DevCpp 4 or DevCpp beta 5 w/mingw32
    * The program will compile and link with MS VC++ 6.0, but will NOT execute properly.
    * I'm using URLDownloadToFile API, and LoadLibrary along with all other required functions for that concept to work.


    I originally used urlmon.lib to link with a previous project with VC++ 6.0, but I wanted to develop this application (this source file is just a small module of a larger project I'm translating, it's actually just one function) to use API calls from dlls rather than compiling using implicit linking and extra header files.

    DevCpp wouldn't compile too well with the old method. It now compiles flawlessly.

    I just don't understand everything that is going on. I really don't understand why VC 6.0 is complaining like it is.

    I apologize for the length of the post, but I'm new and a bit flustered with all of the time I've spent trying to figure it out. C++ can be kinda' daunting...

    Thanks.

    ~ DM

    If anyone can look at the attached file and give me some hints as to what's going on, I would greatly appreciate it.

    ------------------------------------------------------------------------
    As of March 14, 2003, this problem has been fixed. Download new source and/or read the following posts to see fix for problem. Thanks for everyone's help.
    Last edited by deoren; 03-14-2003 at 08:10 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help realy needed
    By ZohebN in forum C++ Programming
    Replies: 2
    Last Post: 04-08-2008, 09:37 AM
  2. Getting a floating point exception
    By SnertyStan in forum C Programming
    Replies: 13
    Last Post: 03-25-2008, 11:00 AM
  3. How to monitor process creation?
    By markiz in forum Windows Programming
    Replies: 31
    Last Post: 03-17-2008, 02:39 PM
  4. instantiation point discussion
    By George2 in forum C++ Programming
    Replies: 1
    Last Post: 03-08-2008, 03:48 AM
  5. overloading operator help
    By syrel in forum C++ Programming
    Replies: 8
    Last Post: 09-30-2004, 10:49 AM