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
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. CreateProcess in WinCE

CreateProcess in WinCE

Scheduled Pinned Locked Moved C / C++ / MFC
help
7 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    vijaywithu
    wrote on last edited by
    #1

    hi i am a fresher for WinCE and i am using createprocess to run one winceplayer application once the commandline in the create process gets executed i want another files on the row to be executed could anyone please help me in this regard CreateProcess(_T("\\windows\\ceplayer.exe"),_T("c\\folder\\new.wmv"), NULL, NULL, FALSE, CREATE_NEW_CONSOLE, NULL, NULL, NULL, &processInfo); once new is done i want next.wmv to be run Thanks in Advance

    S 1 Reply Last reply
    0
    • V vijaywithu

      hi i am a fresher for WinCE and i am using createprocess to run one winceplayer application once the commandline in the create process gets executed i want another files on the row to be executed could anyone please help me in this regard CreateProcess(_T("\\windows\\ceplayer.exe"),_T("c\\folder\\new.wmv"), NULL, NULL, FALSE, CREATE_NEW_CONSOLE, NULL, NULL, NULL, &processInfo); once new is done i want next.wmv to be run Thanks in Advance

      S Offline
      S Offline
      Sethuraman K
      wrote on last edited by
      #2

      Do you want to play the file one another? then, createprocess will not help. Bcoz, createprocess WinAPI will trigger the command to the Windows Message Queue and it will come out. Application will not wait to process completed and it will execute next statement

      Sethuraman.K

      S V 2 Replies Last reply
      0
      • S Sethuraman K

        Do you want to play the file one another? then, createprocess will not help. Bcoz, createprocess WinAPI will trigger the command to the Windows Message Queue and it will come out. Application will not wait to process completed and it will execute next statement

        Sethuraman.K

        S Offline
        S Offline
        Sethuraman K
        wrote on last edited by
        #3

        Sorry for the misguide. Mentioned earlier for ShellExecute not for CreateProcess.

        Sethuraman.K

        1 Reply Last reply
        0
        • S Sethuraman K

          Do you want to play the file one another? then, createprocess will not help. Bcoz, createprocess WinAPI will trigger the command to the Windows Message Queue and it will come out. Application will not wait to process completed and it will execute next statement

          Sethuraman.K

          V Offline
          V Offline
          vijaywithu
          wrote on last edited by
          #4

          Thank u sethuraman.k, Do you have any idea regarding my issue of playing the files in a row if yes guide me in this regard. and could you please tell me how to get the handle to the windows that have been created from createprocess(winceplayer). so that i can use that handle to close the respective window

          S 2 Replies Last reply
          0
          • V vijaywithu

            Thank u sethuraman.k, Do you have any idea regarding my issue of playing the files in a row if yes guide me in this regard. and could you please tell me how to get the handle to the windows that have been created from createprocess(winceplayer). so that i can use that handle to close the respective window

            S Offline
            S Offline
            Sethuraman K
            wrote on last edited by
            #5

            I am not sure but u just try with PROCESS_INFORMATION structure. For you "processInfo". processInfo.hProcess contains handle to the newly created process.

            Sethuraman.K

            1 Reply Last reply
            0
            • V vijaywithu

              Thank u sethuraman.k, Do you have any idea regarding my issue of playing the files in a row if yes guide me in this regard. and could you please tell me how to get the handle to the windows that have been created from createprocess(winceplayer). so that i can use that handle to close the respective window

              S Offline
              S Offline
              Sethuraman K
              wrote on last edited by
              #6

              Just try this: HWND hwnd; STARTUPINFO si; ZeroMemory( &si, sizeof(si) ); si.cb = sizeof(si); PROCESS_INFORMATION pi; ZeroMemory( &pi, sizeof(pi) ); if( !CreateProcess(NULL, "C:\\Program Files\\Windows Media Player\\wmplayer.exe", NULL, NULL, FALSE, CREATE_SUSPENDED, NULL, NULL, &si, &pi ) ) { TRACE("CreateProcess failed"); } else { TRACE("CreateProcess sucess"); } hwnd = (HWND)pi.hProcess; ShellExecute(hwnd, "open", "d:\\del\\Dancingbaby.avi", NULL, NULL, SW_SHOWNORMAL); TRACE("sucess");

              Sethuraman.K

              U 1 Reply Last reply
              0
              • S Sethuraman K

                Just try this: HWND hwnd; STARTUPINFO si; ZeroMemory( &si, sizeof(si) ); si.cb = sizeof(si); PROCESS_INFORMATION pi; ZeroMemory( &pi, sizeof(pi) ); if( !CreateProcess(NULL, "C:\\Program Files\\Windows Media Player\\wmplayer.exe", NULL, NULL, FALSE, CREATE_SUSPENDED, NULL, NULL, &si, &pi ) ) { TRACE("CreateProcess failed"); } else { TRACE("CreateProcess sucess"); } hwnd = (HWND)pi.hProcess; ShellExecute(hwnd, "open", "d:\\del\\Dancingbaby.avi", NULL, NULL, SW_SHOWNORMAL); TRACE("sucess");

                Sethuraman.K

                U Offline
                U Offline
                ujjawal kumar
                wrote on last edited by
                #7

                Hi Sethuraman, I am using create process function to open a jpg file using ie in WINCE... CreateProcess(_T("\\windows\\iesample.exe"),imFullPath, NULL, NULL, FALSE, NULL, NULL, NULL, NULL, &processInfo1); where imFullPath is the path for a jpg file. For opening the next jpg file,i am using create function() onemore time. Also it is opening in a new window. I want to open all jpg files in the same window.

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

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