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
L

Laing James

@Laing James
About
Posts
42
Topics
16
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Tooltips
    L Laing James

    Thank you very much for the pointers.. James

    Web Development question

  • Tooltips
    L Laing James

    Hi. Is there a way to provide the same kind of tooltip that you get with a hyperlink (ie; a hand hovering over the text and a synopsis of the meaning of that text/statement; without defining a hyperlink. So, in short; a hyperlink-like-tooltip without the hyperlink? Thanks in advance. James

    Web Development question

  • CString
    L Laing James

    Thanks for the reply. I have ended up using a 'string' class object to read into from cin and getting a const char pointer to it, so that I can get the data into a CString. What a mess, but it works. Thanks. James.

    C / C++ / MFC question

  • CString
    L Laing James

    Hello. Is there a way to read the (stdout) output from another application directly into a CString? ie) when I specify my application in a series of piped command-line apps, what is the best way to read from stdin, so that I can read data directly into a CString rather than have to worry about the length of the lines of input data? Thanks in advance. James.

    C / C++ / MFC question

  • Hyperlink..
    L Laing James

    Thanks Brad!

    Web Development html tutorial question

  • Hyperlink..
    L Laing James

    Hi I am not sure if this is the correct forum category in which to pose this question, but I shall go ahead anyway..if it is not then, please advise.. Could anyone advise me as to how I might, if it is at all possible, define a hyperlink in an HTML document that supports the following characteristics: 1. The target is a plain ASCII file that should be displayed in a new window, say for example using WORDPAD or NOTEPAD and not explorer, so that plain text formatting is honoured. 2. That if the user right clicks the link, a/the popup menu provides the ability to view or 'run' the target; which will be launched by own application. Note, the filetype, for example '.ABC' of the target, has already been registered/associated with my application. I would like to be able to offer the two options; so that the user can view the target file or launch my application against the file. Best regards. James.

    Web Development html tutorial question

  • IBM Mainframe and thousands of millions of ...
    L Laing James

    Hi. Find out what IBM system that you have access to. If it is an S390/ZOS or S390/Z-VM system, then you can easily write an EXEC employing PIPELINES to remove records that contain duplicate data. PIPELINES was specifically designed to handle this kind of situation; processing huge amounts of data easily and efficiently. For more information, check the IBM website for 'CMS PIPELINES', this will tell you everything that you need to know. If you do not have any joy or need further help, let me know. Regards. James. -- modified at 15:19 Friday 3rd November, 2006

    C / C++ / MFC database sql-server sysadmin algorithms architecture

  • WIN32 Console application colour ?
    L Laing James

    Sorry..that should have been "...from those that do NOT want to exhaust..." Bit of a typo problem there!

    C / C++ / MFC tutorial question

  • Threading problem..
    L Laing James

    Thanks for the update. That is spot on... The parent does wait with a WaitForMultipleObjects, but, I stupidly I coded the process to use CEvents instead of just using the HANDLE of each thread as the signal. Again. Many thanks.. James.

    C / C++ / MFC c++ help learning

  • Threading problem..
    L Laing James

    I have a WIN32 application that creates and dispatches a number of threads that perform various tasks. Now, one of the threads in particular creates and dispatches another two threads; one which reads records into a list and one which writes the records from the list to an output. The threads are created by a call to AfxBeginThread(), specifying the name of the function that serves as the worker thread (not a member function), and the argument to the call is the 'this' pointer of the parent object creating the thread (Both workers need access to the member functions of their parent). When the number of lines to read and subsequentailly write, is small, ie) one or two. I get a really strange thread protection expception. 1. The parent dispatches the first thread; the reader. It starts right away. 2. The parent dispatches the second thread; the writer. It starts right away. 3. The parent thread then hits a WaitForMultipleObjects(), waiting for an event to be signalled by both child threads indicating that they are complete. 4. The wait is broken, the parent object goes through destruction and completes. 5. Protection exception. Thrdcore.cpp @ line 114 (in my listing). nResult = (*pThread->m_pfnThreadProc)(pThread->m_pThreadParams); I cannot for the life of me find out what the problem is. It is as if a thread is being dispatched again after the parent is complete, or there is some kind of thread-clean-up that expects the function pointed to by pThread->m_pfnThreadProc and its argument pThread->m_pThreadParams (which is the address of the parent object) to be still accessible. Which of course it cannot be as the parent object has already been destroyed. I have traced the process over and over and I cannot come up with a reason why this is happening. If anyone has any suggestions or pointers I would would very much appreciate them. James.

    C / C++ / MFC c++ help learning

  • DLL debug error message..
    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 / C++ / MFC help c++ design sysadmin testing

  • Thread Safe Linked List
    L Laing James

    Hi. Sorry, I assumed that there were multiple threads waiting on 'access and/or update', otherwise the question is void. There can be as many threads waiting on the mutex as there is. The idea is that only an update 'locks' the mutex, 'reads', 'fall through'. Otherwise we might be talking about a DOS program. James.

    C / C++ / MFC question data-structures performance

  • Thread Safe Linked List
    L Laing James

    Hi. By using a simple mutex, access and update can be synchonised very easily. When the list needs to be updated, the mutex is 'set', the update is performed, this excludes all access's, the update is complete and the mutex is 'released'. Since the majority of the operations, as per the 'poster' are accesses, waiting for the mutex is infrequent. Since for the majority of the time, the mutex is 'released' the wait for reads' is satisfied 'immediately' James.

    C / C++ / MFC question data-structures performance

  • Thread Safe Linked List
    L Laing James

    Hi. A fast way to ensure synchronised access and update, is to use a simple 'mutex' that all three access/update methods conform to, ( as long as it is not a multi processor platform ). If you do not care about the specific order in which access and/or update is performed, ie) its a free for all, then a simple WaitForSingleObject() on the mutex should provide a simple and fast mechanism. James.

    C / C++ / MFC question data-structures performance

  • Reverse array
    L Laing James

    Hi. The fastest way to 'reverse' the array, would be to traverse it backwards. This requires no copying. James.

    C / C++ / MFC question data-structures

  • Questions about win32 console App.
    L Laing James

    Background. I have an App. written by me, that is a win32 console App. It does some processing and produces some console output, as they usually do. Now, I am quite happy with the output, as its simply a dump of some data. But, I have developed a GUI which ShellExeceuteEx's the console App as the user requires. So, I can have many instances of the console App running at the same time. I would like to know if it is possible, that when the user presses the keyboard pause key, only the console window with the focus is paused. At the moment thay all get paused, which of course is expected. I have looked around and I can not find any general solution. My only idea is to create a keyboard hook DLL, test if the main window focus is on one of the spawned console Apps and to issue a pause/suspend against that thread. If anyone knows of a better or any other elegant solution I would be interested to know. Oh, and one more question. Does anyone know how to specify which font is used for Stdout for a console application. Thanks. James.

    C / C++ / MFC help tutorial question lounge learning

  • Connection objects in multithreaded appliations
    L Laing James

    Hi. Prehaps it would make more sense to have a 'manager' from whom you request access, so that if you require a fourth or more thread(s) then the scaling issue is not a problem. James.

    C / C++ / MFC c++ database question

  • WaitForMultipleObjects()..
    L Laing James

    After much deliberation and study of my code, I have decided to abandon the idea of trying to handle more than 64 events. It is just not possible to integrate multiple threads, each waiting on a set of 64 events. I need to be able to maintain the current application throughput and the overhead would be too much. The list of events that I wait on is not constant and is waited on upto 3000 times per second. The intended user will just have to deal with the limitation. So thats that.

    C / C++ / MFC help

  • WaitForMultipleObjects()..
    L Laing James

    Thank you for the reply. I had thought of that, but again I did not want to compromise the throughput speed that the application currently delivers. But, I have been thinking about this all night and I cannot think of another solution that would 'scale' as well as your suggestion. So, it looks like thats the road I will have to take. Best regards. And again, thank you for the reply. James.

    C / C++ / MFC help

  • WaitForMultipleObjects()..
    L Laing James

    Hi. I have an application where I use WaitForMultipleObjects() to wait for any one ( ie) 'any of' not all ), of a number of events to become signalled. However, the maximum number of events that I can wait on in a single call to WaitForMultipleObjects is 64. I need to be able to wait on more than 64. I know that I could create groups of 64 and loop through them with a timeout until I get one of the events signalled. But, I cannot afford the time waiting for a timeout to occur, however small. If anyone has an idea of how I could get around this I would appreciate the help. James.

    C / C++ / MFC help
  • Login

  • Don't have an account? Register

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