CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: 99bobster99

Page 1 of 3 1 2 3

Search: Search took 0.05 seconds.

  1. Replies
    0
    Views
    3,057

    VBA - HTML element extraction

    I am pulling my hair out on why I am seeing different results in the VBA routines below. One method works perfectly (Internet Explorer code), the other (MSXML2.XMLHTTP code) does not work. I really...
  2. Replies
    13
    Views
    2,231

    Re: Memory Leak within worker thread

    Here is my TimestampDT() function;





    CString TimeStampDT()
    {
    // Variable Declarations
    SYSTEMTIME st;
  3. Replies
    13
    Views
    2,231

    Re: Memory Leak within worker thread

    Really weird, if I remove all the "pass though" varaibles created in the structure "ACC_MessageBox_Params" basically not using any of these variables [pParams->i] or [pParams->ACC_ErrorBuffer] the...
  4. Replies
    13
    Views
    2,231

    Re: Memory Leak within worker thread

    I fixed the code tags up, again sorry.

    This memory leak is making me pull my hair out ... any ideas on why whenever this worker thread exists that immediately there is an increased use in memory?...
  5. Replies
    13
    Views
    2,231

    Re: Memory Leak within worker thread

    Sorry about the code tags, I will use them next time.

    That is the way I had it when I started, I added the (LPCTSTR) for testing. The same affect happens with or without this (LPCTSTR) casting.
    ...
  6. Replies
    13
    Views
    2,231

    Memory Leak within worker thread

    I have a memory leak whenever this code is executed, any ideas on what I am doing wrong?



    typedef struct ACC_MessageBox_Params
    {
    int i;
    CString ACC_ErrorBuffer;
    ...
  7. Re: (MFC Dialog app) -> Closing ofstream in Dlg.cpp from InitInstance?

    Sorry, I am very new at C++ ... what is the "application class" and where is it located? Is "m_nNumber" the actual variable that would be shared between the routines?
  8. Re: (MFC Dialog app) -> Closing ofstream in Dlg.cpp from InitInstance?

    Could you show me a code example of how to "keep this object as application class member" in order to make the variable available throughout all my routines? This is my first C++ project, I am...
  9. (MFC Dialog app) -> Closing ofstream in Dlg.cpp from InitInstance?

    I have an ofstream object declared as a global variable in my Dlg.cpp file, I'd like to close this ofstream when my "Close" button is selected in my AfxMessagebox routine which is on my main dialog...
  10. Replies
    4
    Views
    1,521

    Re: ADO Recordset -> Immediate Updating

    I have attached my code for the sql worker thread. Please let me know if I am doing something out of the ordinary.
  11. Replies
    4
    Views
    1,521

    Re: ADO Recordset -> Immediate Updating

    According to the specs on "Requery", this just closes and re-opens the recordset as well? Can you not leave the recordset open (without closing it first) and keep cycling through the updated fields?...
  12. Replies
    4
    Views
    1,521

    ADO Recordset -> Immediate Updating

    How do you access a SQL database's recordset within a "For" loop? I'd like to continually move through the recordset (using movenext and movefirst) without having to "Close" the recordset each time?...
  13. Replies
    51
    Views
    23,235

    Re: Sharing Global variables between Threads

    Thank you very much for sharing these tips on C++! Since this has been my first project working with it, coming from VB, it does take some getting use to!

    OReubens, I am trying to figure out what...
  14. Replies
    51
    Views
    23,235

    Re: Sharing Global variables between Threads

    Is there any literature that you can recommend that deals with the proper C++ memory "structuring" you mentioned?

    I feel I have absorbed quit a bit in a very short period of time in creating my...
  15. Replies
    51
    Views
    23,235

    Re: Sharing Global variables between Threads

    I simply have 2 threads, sharing 6 variables (CString and ofstream), why is this so difficult? I should just stick with VB ....

    Does anyone have any examples of a Modeless Messagebox? I tried...
  16. Replies
    51
    Views
    23,235

    Re: Sharing Global variables between Threads

    I think I may revert back to a "Modeless Messagebox" and combine my thread1 and thread2. My only issue that lead me to try separate threads is because my messageboxes were stalling my single thread...
  17. Replies
    51
    Views
    23,235

    Re: Sharing Global variables between Threads

    How do you get around timing issues between threads sharing variables? The code is scanning by so fast on one thread that it never gives the other thread a chance to exceute it's code, which is...
  18. Replies
    51
    Views
    23,235

    Re: Sharing Global variables between Threads

    I added this code to cleanup should a unhandled exception occur;

    =====================================================
    void myterminate ()
    {
    exit(0); // forces abnormal termination
    }

    ...
  19. Replies
    51
    Views
    23,235

    Re: Sharing Global variables between Threads

    Do you have any example code to demonstrate such a Cleanup routine? How do you determine which objects need cleaning up? I could add "if" statements to see which mutex variables are still open and...
  20. Replies
    51
    Views
    23,235

    Re: Sharing Global variables between Threads

    Thank you for all your feedback and patience with me, since I am new in this C++ field!

    Arjay, I did skim through most of your articles, honestly, for a newbie it was a bit overwhelming. I did get...
  21. Replies
    51
    Views
    23,235

    Re: Sharing Global variables between Threads

    I think I figured it out .... please let me know if I am out in left field on this one;


    The code between the "lock.lock()" and "lock.unlock()" regions, is what gets executed, toggling between...
  22. Replies
    51
    Views
    23,235

    Re: Sharing Global variables between Threads

    FYI,
    I found this code on the web. My question is, where would the actual variables I will be using, be declared (i.e. the "ofstream" output file)?? How does the CMutex global object determine what...
  23. Replies
    51
    Views
    23,235

    Re: Sharing Global variables between Threads

    Which method of synchronisation would be ideal for my application? I don't want to over complicate my code if it is not needed. Would using the "Semaphore" or "Mutex" method be my best option, or the...
  24. Replies
    51
    Views
    23,235

    Re: Sharing Global variables between Threads

    My thread2 is strictly for handling communication with the SQL database. The values that are written/read by thread2, are copied into a global variable which is then, in turn, read/written by...
  25. Replies
    51
    Views
    23,235

    Re: Sharing Global variables between Threads

    My SQL database updating routine is a simple read and copy to variable sequence. These variables are then read by my main routine. Would I need any sync'ing between these 2 threads, for the shared...
Results 1 to 25 of 61
Page 1 of 3 1 2 3





Click Here to Expand Forum to Full Width

Featured