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. "The application has requested the Runtime to terminate it in an unusual way" CRT error??

"The application has requested the Runtime to terminate it in an unusual way" CRT error??

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestioncomannouncement
7 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.
  • J Offline
    J Offline
    JackPuppy
    wrote on last edited by
    #1

    here is the official demonstrating: http://support.microsoft.com/kb/884538[^] 1.It is really a problem with CRT, or just another fallacy of my application? 2.if it is really the problem with CRT, and how I can fix it? is the version above 7.1 without this problem? How can I make my application adopt another version?

    H C 2 Replies Last reply
    0
    • J JackPuppy

      here is the official demonstrating: http://support.microsoft.com/kb/884538[^] 1.It is really a problem with CRT, or just another fallacy of my application? 2.if it is really the problem with CRT, and how I can fix it? is the version above 7.1 without this problem? How can I make my application adopt another version?

      H Offline
      H Offline
      Hamid Taebi
      wrote on last edited by
      #2

      Could you explain about your program ?

      Of one Essence is the human race thus has Creation put the base One Limb impacted is sufficient For all Others to feel the Mace (Saadi )

      J 1 Reply Last reply
      0
      • J JackPuppy

        here is the official demonstrating: http://support.microsoft.com/kb/884538[^] 1.It is really a problem with CRT, or just another fallacy of my application? 2.if it is really the problem with CRT, and how I can fix it? is the version above 7.1 without this problem? How can I make my application adopt another version?

        C Offline
        C Offline
        Cedric Moonen
        wrote on last edited by
        #3

        Chances are that you are doing something wrong in your application. Did you try to debug to see what the exact problem was ? Once you've done that, you'll be able to see much clearly what the problem might be.

        Cédric Moonen Software developer
        Charting control [v1.5] OpenGL game tutorial in C++

        1 Reply Last reply
        0
        • H Hamid Taebi

          Could you explain about your program ?

          Of one Essence is the human race thus has Creation put the base One Limb impacted is sufficient For all Others to feel the Mace (Saadi )

          J Offline
          J Offline
          JackPuppy
          wrote on last edited by
          #4

          #include "stdafx.h"

          #include
          #include
          #include
          #include
          #include

          ///////////////////have to installed boost liberay at first
          #include <boost/regex.hpp>
          #include <boost/lambda/lambda.hpp>
          using namespace std;
          using namespace boost;

          #pragma comment(lib, "ws2_32.lib ")

          WSAData Wsadata;
          WORD wVersion;

          //////////this structure is used for grab specific infomation of one page
          struct DOC{
          string pcClass;
          string pcNm;
          string pcNmWb;
          string pcDocNm;
          string pcDocWb;
          string pcDy;
          string pcHr;
          string pcRpDy;
          string pcRpHr;
          string pcRead;
          string pcRpCn;
          };

          HANDLE hSemaThr,hCont,hSema;
          int CanThr;

          int GetHostName(const string& HttpHead,string& hostname);
          int BuildRequest(string& HttpRequest ,const string& url);
          ///
          ///connect the client to the host
          ///
          int ConnectClient(const string& hostname,SOCKET& client)
          {

          char\* ip = new char\[hostname.size()+1\];
          memset(ip,0,hostname.size()+1);
          strcpy(ip,hostname.c\_str());
          char\* port = "80";
          struct addrinfo aiHints;
          struct addrinfo \*aiList = NULL;
          int retVal;
          
          memset(&aiHints, 0, sizeof(aiHints));
          aiHints.ai\_family = AF\_INET;
          aiHints.ai\_socktype = SOCK\_STREAM;
          aiHints.ai\_protocol = IPPROTO\_TCP;
          
          if ((retVal = getaddrinfo(ip, port, &aiHints, &aiList)) != 0) {
          	cout<<"getaddrinfo() failed.\\n"<<GetLastError();
          	return 0;
          }
          else if(connect(client,(sockaddr\*)aiList->ai\_addr,sizeof(\*aiList->ai\_addr))==SOCKET\_ERROR){
          	cout<<"connect error"<<WSAGetLastError()<<endl;
          
          	WSACleanup();
          	return 0;
          }
          else return 1;
          

          }
          ///
          ///send buf and return a vector
          ///
          int SendRecive(const string& request,SOCKET& client,string& answer)
          {

          answer.clear();
          string HostName;
          if(!GetHostName(request,HostName))
          {
          	return 0;
          }
          if(!ConnectClient(HostName,client))
          {
          	return 0;
          }
          
          char\* crequest=new char\[request.size()+1\];
          memset(crequest,0,request.size()+1);
          strcpy(crequest,request.c\_str());
          send(client,crequest,(int)strlen(crequest),NULL);
          delete\[\] crequest;
          crequest=0;
          
          char bufrecv\[1000\];
          
          int byRecv=0;
          
          while(byRecv!=SOCKET\_ERROR){
          	memset(bufrecv,0,1000);
          	byRecv=recv(client,bufrecv,999,0);
          	if ( byRecv == 0  ){
          		cout<<"all received out"<<endl;
          
          		return 1;
          
          	}
          	else if(byRecv == WSAECONNRESET){
          		cout<<"wsaeconnreset"<<endl;
          		return 0;
          
          	}
          	answer+=st
          
          J 1 Reply Last reply
          0
          • J JackPuppy

            #include "stdafx.h"

            #include
            #include
            #include
            #include
            #include

            ///////////////////have to installed boost liberay at first
            #include <boost/regex.hpp>
            #include <boost/lambda/lambda.hpp>
            using namespace std;
            using namespace boost;

            #pragma comment(lib, "ws2_32.lib ")

            WSAData Wsadata;
            WORD wVersion;

            //////////this structure is used for grab specific infomation of one page
            struct DOC{
            string pcClass;
            string pcNm;
            string pcNmWb;
            string pcDocNm;
            string pcDocWb;
            string pcDy;
            string pcHr;
            string pcRpDy;
            string pcRpHr;
            string pcRead;
            string pcRpCn;
            };

            HANDLE hSemaThr,hCont,hSema;
            int CanThr;

            int GetHostName(const string& HttpHead,string& hostname);
            int BuildRequest(string& HttpRequest ,const string& url);
            ///
            ///connect the client to the host
            ///
            int ConnectClient(const string& hostname,SOCKET& client)
            {

            char\* ip = new char\[hostname.size()+1\];
            memset(ip,0,hostname.size()+1);
            strcpy(ip,hostname.c\_str());
            char\* port = "80";
            struct addrinfo aiHints;
            struct addrinfo \*aiList = NULL;
            int retVal;
            
            memset(&aiHints, 0, sizeof(aiHints));
            aiHints.ai\_family = AF\_INET;
            aiHints.ai\_socktype = SOCK\_STREAM;
            aiHints.ai\_protocol = IPPROTO\_TCP;
            
            if ((retVal = getaddrinfo(ip, port, &aiHints, &aiList)) != 0) {
            	cout<<"getaddrinfo() failed.\\n"<<GetLastError();
            	return 0;
            }
            else if(connect(client,(sockaddr\*)aiList->ai\_addr,sizeof(\*aiList->ai\_addr))==SOCKET\_ERROR){
            	cout<<"connect error"<<WSAGetLastError()<<endl;
            
            	WSACleanup();
            	return 0;
            }
            else return 1;
            

            }
            ///
            ///send buf and return a vector
            ///
            int SendRecive(const string& request,SOCKET& client,string& answer)
            {

            answer.clear();
            string HostName;
            if(!GetHostName(request,HostName))
            {
            	return 0;
            }
            if(!ConnectClient(HostName,client))
            {
            	return 0;
            }
            
            char\* crequest=new char\[request.size()+1\];
            memset(crequest,0,request.size()+1);
            strcpy(crequest,request.c\_str());
            send(client,crequest,(int)strlen(crequest),NULL);
            delete\[\] crequest;
            crequest=0;
            
            char bufrecv\[1000\];
            
            int byRecv=0;
            
            while(byRecv!=SOCKET\_ERROR){
            	memset(bufrecv,0,1000);
            	byRecv=recv(client,bufrecv,999,0);
            	if ( byRecv == 0  ){
            		cout<<"all received out"<<endl;
            
            		return 1;
            
            	}
            	else if(byRecv == WSAECONNRESET){
            		cout<<"wsaeconnreset"<<endl;
            		return 0;
            
            	}
            	answer+=st
            
            J Offline
            J Offline
            JackPuppy
            wrote on last edited by
            #5

            #include <<windows.h>> #include <<iostream>> #include <<winsock2.h>> #include <<ws2tcpip.h>> #include <<vector>>

            H 1 Reply Last reply
            0
            • J JackPuppy

              #include <<windows.h>> #include <<iostream>> #include <<winsock2.h>> #include <<ws2tcpip.h>> #include <<vector>>

              H Offline
              H Offline
              Hamid Taebi
              wrote on last edited by
              #6

              I saw your link but did you see MSDN you can get this error: "When an application calls the Mfc42u.dll file to load other DLL files on a Microsoft Windows Server 2003-based system, you receive the following error message on the console session" I had this error on my console programs projects previous but if you like I can compile your project on the VS 2008.

              Of one Essence is the human race thus has Creation put the base One Limb impacted is sufficient For all Others to feel the Mace (Saadi )

              J 1 Reply Last reply
              0
              • H Hamid Taebi

                I saw your link but did you see MSDN you can get this error: "When an application calls the Mfc42u.dll file to load other DLL files on a Microsoft Windows Server 2003-based system, you receive the following error message on the console session" I had this error on my console programs projects previous but if you like I can compile your project on the VS 2008.

                Of one Essence is the human race thus has Creation put the base One Limb impacted is sufficient For all Others to feel the Mace (Saadi )

                J Offline
                J Offline
                JackPuppy
                wrote on last edited by
                #7

                Yes, please. BTW, I dumpBin my exe, and my application doesn't use MFC42u.dll, nor does it run on W Server 2003.

                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