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
J

jimNLX

@jimNLX
About
Posts
161
Topics
80
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • vs2005 Form window Error C2039
    J jimNLX

    Yes it is

    C / C++ / MFC help winforms graphics debugging question

  • vs2005 Form window Error C2039
    J jimNLX

    I'm converting a project from VS2005 to VS2017 and have many errors: I'm getting many errors for items not being members of System Windows Forms Drawing Panel Button etc.... Is there something missing from my old code or is this not available in VS2017 or is there something that wasn't included? I think the app creates a form.... Any help to debug would be much appreciated. Jim

    C / C++ / MFC help winforms graphics debugging question

  • porting _beginthreadex from VS2005 to VS2017
    J jimNLX

    Leon, Thank you for all your help with getting this working. Jim

    C / C++ / MFC help c++ tutorial

  • porting _beginthreadex from VS2005 to VS2017
    J jimNLX

    I really wish I didn't have to keep dragging this one, but I still don't know why this won't work. It worked perfectly fine in VS2005, but now I can't make a thread? Doesn't make sense. From what I have learned the original code was built with /CLR:pure or managed. I've tried to remove this but the error are so extensive I don't think I would ever get through them. Is there another function I can use to create the thread? Or some other way to get this thread to run without rewriting the whole thing? Any help would be much appreciated. This is where I'm at now: #include "Connection.h" #include "Packet.h" #include "Opcodes.h" using Ig::Connection; using Ig::CriticalSection; using namespace Ig; CriticalSection::CriticalSection() { ... Connection::Connection() { ... } Connection::~Connection() { // Wait for the thread to exit. exitThreads(); // Clear any pending opcodes. clearPendingOpcodes(); } bool Connection::open(const char* ip, const int port, const int timeOut) { // Make sure the threads are not already running. exitThreads(); // Setup the ports // Setup the sockets. // Set the receive socket timeout. // Set up the send address. // Setup the receive address // Change the state to connecting // Connect to the sender address. if (::connect(m_sendSocket, (sockaddr *)&m_sendAddress, sizeof(m_sendAddress)) == SOCKET_ERROR) { int error = WSAGetLastError(); closesocket(m_sendSocket); return false; } // Bind to the receiver address. if (::bind(m_receiveSocket, (sockaddr *)&m_receiveAddress, sizeof(m_receiveAddress)) == SOCKET_ERROR) { int error = WSAGetLastError(); closesocket(m_sendSocket); closesocket(m_receiveSocket); return false; } // Clear pending opcodes. clearPendingOpcodes(); // Start the threads // THIS IS WHERE ALL MY PROBLEMS BEGIN!!!!!!!!!!!!!!!!!!!!!!!!!!!! // // m_sendThread = (HANDLE)_beginthreadex(NULL, 0, sendData, this, 0, &this->m_sendThreadId); m_receiveThread = (HANDLE)_beginthreadex(NULL, 0, receiveData, this, 0, &this->m_receiveThreadId); return true; } unsigned int Connection::sendData(void* param) { bool request_thread_exit = false; ConnectionState state = Connection::connecting; // The param should be an instance of the connection class. if (param == 0) return 0; // Cast it to a connection Connection* connection = static

    C / C++ / MFC help c++ tutorial

  • porting _beginthreadex from VS2005 to VS2017
    J jimNLX

    Thank again Leon. Seems like anything I change in the compiler just makes things 1000 times worse. I looks like there is going to be no easy way to get this to work and I may have to take a couple of classes to get up to speed. Thanks for all your time and thorough answers. Jim :confused:

    C / C++ / MFC help c++ tutorial

  • porting _beginthreadex from VS2005 to VS2017
    J jimNLX

    Thanks again for the detailed response. I attempted to apply this calling convention into my program and really got twisted up with outer errors. So I'm trying now to do this again. Still getting errors: error C2664: '_beginthreadex' : cannot convert parameter 3 from 'unsigned int (__clrcall *)(void *)' to 'unsigned int (__stdcall *)(void *)' Address of a function yields __clrcall calling convention :confused: Jim

    C / C++ / MFC help c++ tutorial

  • porting _beginthreadex from VS2005 to VS2017
    J jimNLX

    Thank you for the response. Just getting back to working on this and will look over and try to fix with your suggestions.

    C / C++ / MFC help c++ tutorial

  • porting _beginthreadex from VS2005 to VS2017
    J jimNLX

    Thank you for your time and response. I didn't know this was responded too as my email has an issue.

    C / C++ / MFC help c++ tutorial

  • porting _beginthreadex from VS2005 to VS2017
    J jimNLX

    I'm attempting to port some old code from VS2005 C++ to VS2017. One problem that I don't know how to address is how to convert the old _beginthreadex to what would be the correct call in 2017. VS2005 code is calling a member function that is in a class: m_sendThread = (HANDLE)_beginthreadex(NULL, 0, sendData, this, 0, &this->m_sendThreadId); I've casted it it to: m_sendThread = (HANDLE)_beginthreadex(NULL, 0, (unsigned(__stdcall *)(void *))sendData, this, 0, &this->m_sendThreadId); Code compiles but will exit with code 1073741855. The class is a class that handles winsock connections and sendData is called to start the thread once the socket has been established. I am new to classes and even newer to threaded programs so it is hard for me to say how to fix this problem. Any help would be much appreciated. Thanks.

    C / C++ / MFC help c++ tutorial

  • Dataview...adding additional columns
    J jimNLX

    I have data coming from multiple tables and I need some of the data to go into a 3rd column. So far all I can get is the name in the first column and the data in the second. I am not sure how I can create the 3rd column and then populate it with data. Any help would be much appriciated. Thanks, Jim

    ASP.NET help

  • start mail
    J jimNLX

    How do I do the equvialent of "mailto:" in asp? Thanks!

    ASP.NET question

  • Error CS1705
    J jimNLX

    This is the error message: (0,0): error CS1705: Assembly 'Common, Version=1.0.2516.28982, Culture=neutral, PublicKeyToken=null' uses 'Eng.Common, Version=2.0.1623.14765, Culture=neutral, PublicKeyToken=0989625e39e31c91' which has a higher version than referenced assembly 'Eng.Common, Version=2.0.131.0, Culture=neutral, PublicKeyToken=0989625e39e31c91' in the object browser it shows both versions of this dll... How can I overcome this problem? Thanks, Jim

    C# help question announcement

  • Can't find files
    J jimNLX

    I have a solution that contains several projects. Most of these projects use files that are common between them all. I would like to only have the common files in one place so that I only have one version of them. Thus if one of the common files is changed all of the projects that use it will be updated/compiled again. Any help with this would be very much appriciated. Thanks, Jim

    C / C++ / MFC help announcement

  • many projects -> solution
    J jimNLX

    I have 16 project that I only have the source code for that I would like to put into a Solution. I have been able to create a solution with all the 16 project directories, but when I view this in the Solution Config it only show the Project for which the Solution was create. Thus I can't compile and run each of the 16 project by them selves. Kind of looks like this: Solution A StartServer .C/.Cpp/.h ShutdownServer .C/.Cpp/.h . . . RunReport .C/.Cpp/.h Directory file structure is: c:\Solution A\ c:\Solution A\StartServer\ c:\Solution A\ShutdownServer\ ... c:\Solution A\RunReport Config file only shows Solution A thus it compile all 16 everytime... I should be able to select on of the projects and compile/run it. Any help would be much appriciated. Jim

    C / C++ / MFC c++ help

  • Link error using
    J jimNLX

    Would it make a difference that I have both C & CPP files in this project?

    C / C++ / MFC visual-studio graphics help question

  • Link error using
    J jimNLX

    Anybody else have any ideas on where to go from here? It really seems like the info from is getting stepped on or something. Help I'm totally stuck!! Thanks, Jim

    C / C++ / MFC visual-studio graphics help question

  • Link error using
    J jimNLX

    haven't set that.

    C / C++ / MFC visual-studio graphics help question

  • Link error using
    J jimNLX

    /MLd is the only one I saw in there. The app does load 1 DLL*****I take that back, it doesn't link to a dll -- modified at 13:32 Thursday 15th June, 2006

    C / C++ / MFC visual-studio graphics help question

  • Link error using
    J jimNLX

    msvcprt.lit wasn't in the additional libraries so I added it and re-compiled everything and still received the same errors. this is the whole error, it may help: error LNK2001: unresolved external symbol "class std::basic_string,class std::allocator > __cdecl GetConfiguredClientTypes(class std::vector,class std::allocator >,class std::allocator,class std::allocator > > > *)" (?GetConfiguredClientTypes@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PAV ?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@2@@Z) thanks again!

    C / C++ / MFC visual-studio graphics help question

  • Link error using
    J jimNLX

    I have rebuilt everything many times. I'm using ../vc98/lib and ../vc98/mfc/lib I'm compliling with Visual C++ 6.0 Thanks for the help, I'm really lost on how to debug this.. Jim

    C / C++ / MFC visual-studio graphics help question
  • Login

  • Don't have an account? Register

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