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

lynchspawn

@lynchspawn
About
Posts
29
Topics
18
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Remote Desktop with UDP socket [modified]
    L lynchspawn

    I'll try to be brief here because I could go on and on: We have an existing app which keeps track of employee in/out status. It uses UDP in a client/server architecture. We are starting to use Remote Desktop and are having some problems with this app. Originally, we kept getting the error that basically said the listen port (on the client app) was already in use. I made the change to allow reuse and that error is now gone. Now, it seems that the first client to get the notification from the server (in the OnRecieve() call) is the only one that gets data. I have a feeling the data is removed from the socket buffer and the other apps are probably getting a recv length of 0. They may not be getting a notification at all - I need to verify this. To be a little more clear - we are testing with multiple people logged into the Terminal Server. At the most, only one client works properly at any time. How can I handle this? -- modified at 15:53 Wednesday 7th June, 2006

    C / C++ / MFC question sysadmin testing beta-testing architecture

  • Disabling Wireless while on network
    L lynchspawn

    I have a program that disables the wireless NIC when a hard-wired network connection is detected. It works fine but there is one catch - when you want to use wireless later, you have to go to the Network Connections window and click Disable, then Enable to get it working again. People at our company just cannot remember to do this and I would really like to avoid them having to do this if possible. The method of disabling the NIC I have used is roughly: myMIBIFROW.dwAdminStatus = MIB_IF_ADMIN_STATUS_DOWN; dwError = SetIfEntry(&myMIBIFROW); It works but one drawback is that the control panel Network Connections window still thinks it is enabled after this. I think this is why you have to click Disable first then Enable to get the wireless going again. So, does anyone know how to programatically simulate a click on the Disable and Enable menu options? Any other tricks to help? BTW - setting the status to up and calling SetIfEntry() did not work. Thanks. Dave

    C / C++ / MFC sysadmin help tutorial question

  • CPU usage 100%
    L lynchspawn

    I have been using a simple routine to wait while connected hardware is performing a reset, ... The routine is: DWORD stop_time = GetTickCount() + iCount; while ((long)(GetTickCount() - stop_time) < 0L){ MSG msg; if (PeekMessage(&msg,NULL,0,0,PM_REMOVE)) { TranslateMessage(&msg); DispatchMessage(&msg); } } Someone has complained that the task manager in XP is showing that the CPU usage goes to 100% during this wait period. Do I need to add a sleep in there or something else to prevent this?

    C / C++ / MFC hardware question

  • DAO Notification?
    L lynchspawn

    I have an .mdb file (MS Access) that each employee will be using to tell who is in or out of the office. The .mbd file will be located on one of our servers. A windows program currently polls at a certain interval to refresh the status. Is there some built-in way to have notifications sent from the DAO objects instead of polling? I was also considering writing a server app and have each users program register with the server and handle it that way. If there is a better way, please let me know.

    Database sysadmin question

  • Wireless power switch
    L lynchspawn

    Does anyone know if there is software access to the wireless power switch you often see on notebook PC's nowadays? I've been asked to see if there is a way to "simulate" the switch function (turn off the wireless) through a program. I have some code that disables the NIC but he wants to actually shut the power off to the xmters as well if it can be done. He said that his notebook has a key combination that does the power on/off rather than a slider or toggle switch. Is this done through the bios? How would that work and would I be able to access that function in some way? Thanks, Dave

    Hardware & Devices question

  • Run hidden on startup
    L lynchspawn

    Please help me with the proper terms here. I want to run an application on startup and have it run hidden. I don't care if it shows in the task list but I don't want it visible anywhere on the desktop. What should I be searching on? I have a console app that does what I want it to do now but I can convert it to something like a service if that's what it needs to be. Thanks!

    C / C++ / MFC algorithms help question

  • Detect network connection?
    L lynchspawn

    Thanks guys - I don't think either one will work though. The reason why InternetGetConnectedState won't work is that it seems to only detect if a connection to the internet is found. This won't be true since by default, any new PC will not be allowed to connect to the internet from within our building (MAC filtering). What I need is a way to determine if the connection is good for a particular interface. Similar to what the connection status icon does in XP. For now, I'm using a ping to our server name. I guess it's about as good as I will be able to do. If anyone has a better suggestion, please let me know.

    C / C++ / MFC sysadmin question

  • Detect network connection?
    L lynchspawn

    Is there a way for a program to know when a network connection has been made? Ideally, I'd like to know when a certain interface is connected (I don't have to know when it was connected, just if it currently is physically connected). It seems as though XP can detect this since it has tray icons for this. Any idea how they are doing it?

    C / C++ / MFC sysadmin question

  • Disable network iface?
    L lynchspawn

    This one will be difficult- Here's my situation: The owner of my company is ultra-paranoid about wireless networks. We have a few notebook PC's that will be in and out of our office. He wants all of those to have some way of auto-disabling the wireless when connecting to our network. I'd need to detect if they have a wireless device, detect if they are connected to our network (I could get away with connected to any network on a non-wireless if I had to), and find a way to disable the wireless. Is there a way to accomplish this? I don't need a full solution - just some pointers if you can. I have a way to find the interface info. I can use pcap or I have another library that uses the MIB (I hope I'm remembering that acronym properly). I don't know if either can tell me if it is wireless though. I also don't know if there is a way to disable an interface from within a program. Thanks for any help you may be able to provide. This one is really critical. Dave

    C / C++ / MFC sysadmin help question

  • _AFX_MAIL_STATE with dynamicly linked MFC dll
    L lynchspawn

    When I use my application statically linked to MFC, this is no problem. Since I'm trying to use localized resources (multiple languages), I need to dynamically link MFC. When I make this one change, the program no longer links. I get the following: xxxx.obj : error LNK2001: unresolved external symbol "class CProcessLocal _afxMailState" (?_afxMailState@@3V?$CProcessLocal@V_AFX_MAIL_STATE@@@@A) Release/xxxx.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe. Is there some way around this? For those who aren't familiar with what this is for - it's the code you often see on the web for sending email from within an application. It uses MAPI to accomplish this (at least that's my understanding). I've tried many searches but I only get code samples for sending email. Nothing on this linker issue. Thanks for any help you may be able to provide. -- modified at 9:44 Friday 18th November, 2005

    C / C++ / MFC help c++ question announcement

  • Hide my app w/o CreateProcess()??
    L lynchspawn

    I have a console app that I'd like to run without the console popping up - no matter who calls it. I know normally, the calling app would use certain flags to hide it when calling CreateProcess() but the ability may not always be there for our users. They are calling it from within another app with scripting capabilities so they are not actually writing a C++ project to call out app. There may be a way to do it from that software (Citect) but I can't be sure. Other than re-writing it as a Windows GUI app, is there anything else I can do to have it run without the console popping up?

    C / C++ / MFC c++ question

  • Find the exe name when loading dll
    L lynchspawn

    Bummer. Unfortunately, not all of the app's that call my dll are written by my company. I guess I can add something to detect my app but the rest will have to remain unidentified. Thanks anyway.

    C / C++ / MFC help debugging question

  • Find the exe name when loading dll
    L lynchspawn

    I'm trying to debug a problem where multiple applications (exe's) are loading a common dll. I have some debug output in the InitInstance() and ExitInstance() of the dll's CWinApp class. I'd really like to know which app is loading/unloading for each line of debug output (I'm writing lines to a file) but have not found a way to do this. The m_pszExeName and m_pszAppName variables are always the name of the dll - so that's no help. The m_lpCmdLine is always blank so that's no help either. Is there a way to do this?

    C / C++ / MFC help debugging question

  • Ultimate Grid 6.1 (tab font)
    L lynchspawn

    Is it possible that the mTab object hasn't been created yet (not a window yet)?

    C / C++ / MFC css tools help tutorial question

  • SDI w/ splitter - SetActiveView()???
    L lynchspawn

    I have an SDI app with a splitter and two views. The left view is a tree view and I'm trying to make the app come up with the last selection visible/active. The menus/toolbars are indicating that the view is active but the focus/selection mark in the tree control acts as if it is not the active view. Part of the problem may be that the EnsureVisbile() call doesn't actually make it visible (the selection is hidden under a scroll bar). I don't know if that is what is causing the trouble or if the fact that the view really isn't the active view (in terms of mouse, keyboard) is why they EnsureVisible() isn't working (the chicken/egg thing). I'm using a timer in the MainFrame and forcing the active view after 300ms using SetActiveView(). Is there something else I should be doing to make the view act as if I just clicked on the item? Any idea why the EnsureVisible() isn't placing the selected item within sight? Thanks.

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

  • MKS command line
    L lynchspawn

    I'm not sure if this is the best place for this question but here it goes: Does anyone here use MKS Source Integrity for source control? If so, does anyone know how to use their command line interface to add project members?

    C / C++ / MFC question tutorial

  • multi-language - HELP!!!!
    L lynchspawn

    Thank you very much for the replies. I will try to convince our marketing dept. that using a text file may not be the best way to go. Actually, I have to convince them - I'm a dead man if I can't ;).

    C / C++ / MFC sales help tutorial question

  • multi-language - HELP!!!!
    L lynchspawn

    I have a fairly small project (main window with about 6 dialogs) that I have built using VC6. Our marketing dept. has decided that we need to make it a multi-language app. He wants to be able to give a text file to someone and let them translate from the english text to their language and give the file back to us. Our program would then read in the translated text and replace each instance. It sounds like a real nightmare. Are there better ways to go about this? It's a technical app with references to things such as Ethernet switches, controllers, ... so I don't know if any of the auto-translation products would be able to handle it correctly. Also - how to people deal with the text field lengths (static boxes, group boxes, buttons, ...) when the translations end up needing more space? Thanks so much for any help you might be able to provide. Dave

    C / C++ / MFC sales help tutorial question

  • bit field question
    L lynchspawn

    Thanks. Here's what I found: if I use unsigned shorts, everything works fine. Apparently, the value is sign- extended when using signed variables - so the 1F40 (when looking at it as a 13 bit number) is a negative number and the sign bit is extended out when placing the value in the struct (giving FF40). Hope that makes sense. Thanks - I got there eventually but it really looked strange at first.

    C / C++ / MFC question

  • bit field question
    L lynchspawn

    I don't use bit fields much at all. I have a simple struct as folows (on an INTEL format machine): typedef struct{ short f1 : 13; short f2 : 1; short f3 : 1; short f4 : 1; } tststruct; tststruct tst; tst.f1 = 8000; what ends up happening is f1 gets a value of 0xFF40 instead of what I thought I would get (0x1F40). The other members (f2,f3,f4) are all 0x00 as I would expect. Any idea why?

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