Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. DLL debug error message..

DLL debug error message..

Scheduled Pinned Locked Moved C / C++ / MFC
helpc++designsysadmintesting
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Laing James
    wrote on last edited by
    #1

    Hi. I am quite new to windows and MFC programming and I have over the last few months, been developing an application that 'does stuff'. Now, I have decided that given the design, it would be much more suited to the 'DLL' concept. So, I would like to convert the application to a client/server approach. So, with a view to testing some of the 'needed' functionality, I created a very simple client and server. One or both client(s) and server require the use of MFC, that is to say, neither derive classes from MFC but the server uses MFC functions; CString, Afx.. stuff. The client may also use MFC stuff CString etc.. Before I describe the problem, it might, but I dont know if it is relevent to note that both client and server link in MFC dynamically. Anyway, I define a very simple server function that accepts an LPCTSTR which it should display in a message box. However, I keep getting the same debug error after the call from the client to the server completes: Debug Error! Run-Time Check Failure #0 - 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 differnt calling convention. I have tried all sorts of combinations of call conventions and I have now hit a brick wall. Any advice or pointers would be much appreciated. Best regards. James.

    T C 2 Replies Last reply
    0
    • L Laing James

      Hi. I am quite new to windows and MFC programming and I have over the last few months, been developing an application that 'does stuff'. Now, I have decided that given the design, it would be much more suited to the 'DLL' concept. So, I would like to convert the application to a client/server approach. So, with a view to testing some of the 'needed' functionality, I created a very simple client and server. One or both client(s) and server require the use of MFC, that is to say, neither derive classes from MFC but the server uses MFC functions; CString, Afx.. stuff. The client may also use MFC stuff CString etc.. Before I describe the problem, it might, but I dont know if it is relevent to note that both client and server link in MFC dynamically. Anyway, I define a very simple server function that accepts an LPCTSTR which it should display in a message box. However, I keep getting the same debug error after the call from the client to the server completes: Debug Error! Run-Time Check Failure #0 - 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 differnt calling convention. I have tried all sorts of combinations of call conventions and I have now hit a brick wall. Any advice or pointers would be much appreciated. Best regards. James.

      T Offline
      T Offline
      Tim Smith
      wrote on last edited by
      #2

      The simple answer is that you must use the same calling convention. Tim Smith I'm going to patent thought. I have yet to see any prior art.

      1 Reply Last reply
      0
      • L Laing James

        Hi. I am quite new to windows and MFC programming and I have over the last few months, been developing an application that 'does stuff'. Now, I have decided that given the design, it would be much more suited to the 'DLL' concept. So, I would like to convert the application to a client/server approach. So, with a view to testing some of the 'needed' functionality, I created a very simple client and server. One or both client(s) and server require the use of MFC, that is to say, neither derive classes from MFC but the server uses MFC functions; CString, Afx.. stuff. The client may also use MFC stuff CString etc.. Before I describe the problem, it might, but I dont know if it is relevent to note that both client and server link in MFC dynamically. Anyway, I define a very simple server function that accepts an LPCTSTR which it should display in a message box. However, I keep getting the same debug error after the call from the client to the server completes: Debug Error! Run-Time Check Failure #0 - 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 differnt calling convention. I have tried all sorts of combinations of call conventions and I have now hit a brick wall. Any advice or pointers would be much appreciated. Best regards. James.

        C Offline
        C Offline
        cmk
        wrote on last edited by
        #3

        Without the source and project files it will be tough to help you with this problem. It could be compiler settings on one source module are different than another. It could be something funky being done with a function pointer. It could be some kind of memory corruption. It could be ... ? ...cmk Save the whales - collect the whole set

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups