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
C

ceuba

@ceuba
About
Posts
3
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • TerminateProcess w2k and xp!
    C ceuba

    Hello Tomasz, thank you for your tip. I changed PROCESS_ALL_ACCESS to PROCESS_TERMINATE in OpenProcess(...). But i have the same effect as before. When i alredy had terminated the programm b.exe and it doesn't exist in the tast-manager. I do step 2 and the handle is alawy not NULL. But i see this effect only in XP. W2k show me NULL and I can start b.exe with createprocess. What do i wrong! Thanks Chris ceuba@gmx.net Student

    C / C++ / MFC question

  • TerminateProcess w2k and xp!
    C ceuba

    VC6.0 Hello, i have a question, how can i terminate a process from an another process? Ich my Situation i want start program b.exe from a.exe. But b.exe should start once a time! I do it with that: 1) First start b.exe: PROCESS_INFORMATION ProcInfo; STARTUPINFO startupInfo; memset(&startupInfo, 0, sizeof(startupInfo)); startupInfo.cb = sizeof(startupInfo); CreateProcess(NULL, // lpApplicationName "C:\\b.exe", // lpCommandLine NULL, // lpProcessAttributes NULL, // lpThreadAttributes NULL, // bInheritHandles NULL, // dwCreationFlags NULL, // lpEnvironment NULL, // lpCurrentDirectory &startupInfo, // lpStartupInfo ProcInfo); // lpProcessInformation 2) Second i check, wheter program is still activ HANDLE handle = OpenProcess(PROCESS_ALL_ACCESS,TRUE,pProcInfo->dwProcessId); if (handle!=NULL) { ... if programm b.exe activ terminate b.exe ... } else { ... start b.exe ... } 3) If programm b.exe active i terminate it and restart it I do it with this code: TerminateProcess(m_pProcInfo->hProcess, 0); Now i got back to step 1: This works fine in w2k, but in xp step 2 doesn't work. The handle is always not NULL. What is wrong? Give's a better way to do that? Thanks Chris Student

    C / C++ / MFC question

  • Unable to capture ENTER key on a CEdit Control
    C ceuba

    You can catch the ENTER key in your own edit control class in PreTranslateMessage: BOOL MyClass::PreTranslateMessage(MSG* pMsg) { if(pMsg->message == WM_KEYDOWN && pMsg->wParam == VK_RETURN) { DoAnything(); or // pMsg->wParam=0; } return CDialog::PreTranslateMessage(pMsg); } Student

    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