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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
E

EiSl

@EiSl
About
Posts
31
Topics
18
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Efficiency with reading 60 sockets
    E EiSl

    Hello all, I've the situation that I've to observe 60 sockets and process their data (small amounts of data). Those 60 sockets are: - 30 data sockets receiving realtime data each 15-35ms per socket. - 30 signalling sockets receiving data around (average) every 4 seconds per socket. My question now is: what is the most efficient way of observing those sockets by select()-call followed by reading from the socket(s)? Due design it is prefered to have only 1 thread for observing, but 2 threads (one for data, and for signalling) is also acceptable. My point is that I've the feeling that doing a FD_SET-of-60-sockets and than select() followed by FD_ISSET per channel + reading and processing is not really going well. With regards, EiSl

    C / C++ / MFC question design

  • Getting correct ChildFrame ptr in xxxDoc
    E EiSl

    Thanks for reply Alois, I've updated my example since I'm indeed first calling     if (!CDocument::OnNewDocument())       return FALSE; after I'm continueing with the rest of my stuff. More background info: In my ChildFrame (not mainframe) I've defined a statusbar (at bottom). This one should be updated with information I've available at the 'OnNewDocument' (so the Doc) or in the View. That's the reason I need a pointer to ChildFrame to be able access my CStatusBar member. Thanks, EiSl

    C / C++ / MFC question help

  • Getting correct ChildFrame ptr in xxxDoc
    E EiSl

    Hello all, I really have the feeling that this is a stupid question, but for some reason I do not see the answer :-O Problem (Multi Doc Interface project): When creating a new document (OnNewDocument), I also need to have access to its ChildFrame object to set some data member (via public method). I used next code, but its unfortunaltely faulty. BOOL MyAppDoc::OnNewDocument() {   if (!CDocument::OnNewDocument())      return FALSE;   ...   CMainFrame *pMainFrame = ( CMainFrame* )AfxGetMainWnd();   ASSERT( pMainFrame );   CChildFrame *pChild = (CChildFrame *) pMainFrame->GetActiveFrame();   // Now using pChild to access a public methode which sets a datamember-> crash   ... } Where I'm going the wrong way? More background info: In my ChildFrame (not MainFrame) I've defined a statusbar, which should be updated with info I've available at the moment of creation doc (or view). Thanks in advance, EiSl

    C / C++ / MFC question help

  • Missing mfc42d.lib
    E EiSl

    Are you sure you can handle such e-mails? I've checked, but the LIB-directory is 43MB in size (at my PC), and ZIPing won't make it much smaller. Cheers, EiSl

    C / C++ / MFC c++ csharp visual-studio help question

  • Passing macro's via NMAKE & handling (Q237870)
    E EiSl

    Editted: for better understanding, I suggest one read the MSDN-Q237870 before continue Hello all, We've here automated build-scripts (Batch files and also 4NT batch-files) that creates user environment at a central (build)server. One of the scripts also executes NMAKE in order to build the application. Problem: Within the scipts I've the variable MAJOR_VER, MINOR_VER and BUILD_NR. I would like to pass these with NMAKE in such way that I can use those variables (Macro's) to fill in the VERSIONINFO-resource: the file + product version entires. This structure is already moved to .RC2-file so its in our control. When manually define them in a header-file and include this in RC2-file (as mentioned in MSDN: Q237870) this works. But... I want to pass this info via batch-file (NMAKE), iso calling a script which modifies a headerfile. Anyone suggestions? Thanks in advance, EiSl

    C / C++ / MFC sysadmin tools help question announcement

  • Best way to intercommunicate between apps
    E EiSl

    Thx for reply Christian, You mean using the WM_COPYDATA with use of HWND_BROADCAST in SendMessage ? With regards, EiSl

    C / C++ / MFC question

  • Best way to intercommunicate between apps
    E EiSl

    Hello all, We've a couple of applications using to perform regression tests. The 'front-end' application which launches and controls all. Current situation (part of) - Front-end launches the 'big-app' and uses a fixed delay before continue operation to give 'big-app' the possibility to initialize itself. Bad part: fixed delay in combination with fast or slow PC. Prefered situation - Front-end launches the 'big-app' and continues execution when 'big-app' signals its ready to continue. My question: What is the best solution for this signalling event. I need no other info than: "I'm ready... go on". A named pipe looks a bit overkill too me. With regards, EizSl

    C / C++ / MFC question

  • CTRL-F6 (toggle between windows in MDI) fails
    E EiSl

    Hello all, After almost completion of my MDI appl, I figure out that the hot-key CTRL-F6 (switching between windows) is not working anymore (might never have worked :-D ). I haven't change anything in the accelerator resources (it's actually still there). In a default MDI-project of VC++6.0 it does work. It might have something to do with having a tab-control bar I've included (as part of MainFrm). The doc/view are also splitted, but that should be at another level. Have any of you any idea's how I can pin-point where it's going wrong? By the way: what messages are sent? Thanks in advance, EiSl

    C / C++ / MFC c++ question

  • Why using BOOL over bool (or not)
    E EiSl

    Hello all, I was just wondering about the typical difference in usage between type BOOL and bool. Within the Windows environment, the BOOL is an unsigned integer. When using data-structures you find the bool used iso BOOL, which is put inside a kind of bit-array by the compiler. This is of course logical due memory usage, since the BOOL takes in Win32 4 bytes. Is there any reason to use the BOOL over the bool type definition? Thanks in advance, EiSl

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

  • Scope of try...catch constructions (over threads)
    E EiSl

    Hello all, I was wondering about the scope of try...catch constructions over threads. An example (very simplified example of existing code, where the Main_thread acts like a scheduler and the Worker_Threads are the 'processes'):

    Main_thread
    {
    try {
    // Launch some Worker_threads
    }
    catch( ... ) {
    // Do some actions
    }
    }

    Worker_thread
    {
    try {
    // The executing code, which might also execute
    // the throw-function.
    }
    catch( condition ) {
    // Do some actions, but continue operation
    }
    catch( ... ) {
    // Do some actions
    throw( something ); // should be catched in Main_Thread
    }
    }

    Is it possible to (or 'how to') catch the last throw from the Worker_thread into the Main_thread? What is the nice way to do this? Thanks in advance, EiSl

    C / C++ / MFC tutorial question

  • Stackwalk in dbghelp/imagehlp (Advanced, debugging)
    E EiSl

    Hello all, When walking through the stack (in my Unhandled Exception Handler) using StackWalk from dbghelp/imagehlp library, this function also provides me the parameters (max. 4) of the function called. Now... Where/how do they get that parameter info? Because I want to make a kind of raw-stack-dump, like provided in DrWatson logs. I need the address pointing to the frame containing the stack contents like (possible) parameters. When doing the 'classic' way of stackwalking (using EBP-register as starting point=frame), than you will find: - Return address (at offset 0, is previous function call) - Program Counter (at offset 8) - Possible parameters passed with function (at offset 16+) But... when you use optimized code, above doesn't work most the time and MSDN suggests using the DBGHELP stuff. Also the other articles in MSDN are not diving into the raw-stack usage. Above is quite complex material, and even MSDN (including technical articals) are not going that deep (except for using the classical way). Thanks in advanced, EiSl

    C / C++ / MFC data-structures question

  • How to detect that a user has logged in (Service & NT)
    E EiSl

    Hello folks, I know that a service process (under NT/Win2k) should not communicate with GUI, since no user has to be logged in so no shell is available. But... When my service is crashing (unhandled exception), I want my general exception handler sends a messagebox to the user in case there's a user logged in. So... How can I detect if a shell exist (aka: a user is logged in), so I can safely shoot a messagebox. Thanks, EiSl

    C / C++ / MFC linux tutorial question lounge

  • MiniDump (as part of DBGHELP.DLL)
    E EiSl

    Hello folks, I'm currently working on my own Unhandled Exception Handler in order to provide me more information regarding the crash occurred and make a 'grateful' crash ;) . When checking the DGBHELP-library (MSDN) it also provides " User-mode Minidump Files" (crash dumps), that can be loaded within a debugger (like WinDBG). Now my questions: 1. Very little info is provided in MSDN about these MiniDumps: what exactly do they dump and how to use it (is it usefull)? 2. MSDN states: "You can use this function on versions of Windows prior to Whistler without redistributing DbgHelp.dll. To do so, link with the static library MiniDump.lib, which is included in the Platform SDK." No way I can find the Minidump.lib in the latest SDK, or more information about this. What about this library? Any info about this MiniDump is highly appreciated! Thanks, EiSl

    C / C++ / MFC debugging tutorial question

  • Adv: How does e.g. Dr Watson hook into an exception
    E EiSl

    Hello fellow programmers, I was wondering how a program like Dr.Watson is hooked into the exception handling mechanism. This question actually has a background: For my next project, they've asked me to do some bug-hunting in a HUGE (multi threaded) service process (netto > 1 mil. lines of code over 10.000 files). This peace of code (telecommunication related) has been ported from embedded system, and NO active usage of structured exception handling is used (more C than C++ oriented). The problem is that in some situations an exception occures, and we want to be able to produce *any* possible kind of info. But since the Windows NT exception handling mechanism is taking over everything, no way of getting some runtime-info. And also: it is a service process, so no interface to user exists. My idea was to implement a kind of 'general exception handling' function within our application, dumping possible information to a file. Other suggestions are also welcome, or links to site/topics regarding this topic. Cheers, EiSl

    C / C++ / MFC help c++ hardware question lounge

  • multirow buttons in CToolBar
    E EiSl

    One of the examples on this site explaines the usage of multiple checkboxes in one 'placeholder' In stead of checkboxes buttons should be possible to. Be care full about keeping the GUI user friendly! Give a yell if you need more help EiSl

    C / C++ / MFC tutorial question

  • UDP Socket
    E EiSl

    What do you actually mean?!?! You want a 'client' be able to test if a 'server/service' exist on a service-port over UDP? UDP is a connectionless protocol, so the only way for the 'client' is to check the connection is waiting for any response on your message. I write 'client' and 'server' between brackets, since client-server in UDP environment is not really a client-server architecture. With TCP/IP you split a socket when a connection is make (by listen -> accept), UDP doesn't do this, but you can use recvfrom to collect the others ip-address+port. EiSl

    C / C++ / MFC com sysadmin tutorial question

  • Problem around usage of RUNTIME_CLASS
    E EiSl

    Hello all... I'm lost... maybe because I'm searching to deep, but anyway. My collega came to me for help, but unfortunately.. :confused: Let's take a look to this sample:

    class CMySystems{
    // Anything
    };

    class CMyDetails{
    // Anything
    };

    void xxx::SomeMethod( void )
    {
    ...
    // Sets up the (docking) TabControlBar
    m_wndMyCtrlBar.AddView("Systems", RUNTIME_CLASS(CMySystems));
    m_wndMyCtrlBar.AddView("Details", RUNTIME_CLASS(CMyDetails));
    ...
    }

    Now the problem: In the class CMySystems I want to be able to use methods from the class CMyDetails. How can I at runtime pass the 'this' pointer of the CMyDetails class to the CMySystems? Thanks in advance, EiSl

    C / C++ / MFC help question algorithms

  • need an advice...
    E EiSl

    You don't want to know this ;-) RTFM stand for: Read The Fucking Manual. Cheers, EiSl

    C / C++ / MFC question tutorial

  • How: each doc/view in own thread (advanced)
    E EiSl

    Thanks for your answer! Most the time you read answer like: "better do this way" without a clear explaination why to do so. I've never thougth about the combination of CFormView with ListBox, because I was only looking to derivation of the View. Since it only accepts xxxView I was thinking about the ClistView or CEditView and have chosen for the editview. When everything is working fine I will take a look for changing that part, since it's quite easy to change. Happy programming! Eize

    C / C++ / MFC debugging help tutorial question

  • How: each doc/view in own thread (advanced)
    E EiSl

    Hello John, Does this really matters?!? Ok in case of a CFormView yes it matters. In my case we're talking about a read-only CEditView, but maybe this is changed to a CListView. Sincerly, EiSl

    C / C++ / MFC debugging help tutorial 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