Thread: Process

  1. #1
    Registered User
    Join Date
    Feb 2003


    Hello everybody,
    I was beginning to worry when I couldn't access the forum yesterday and this morning. It is good to see it back up and running. Anyway, to the questions at hand.

    I have a question for anyone who might can answer it. Actually it is 2 questions. Here we go.

    Question 1??
    My administrator and I are building a Medical Records system. He has used a lot of his old code written in DJGPP to basically design a command line version of a MRS(Medical Records System). The problem comes in when he calls an Image viewing program that is written in Visual C++.NET. This is a true windows app written using MFC. He can run his program fine and call the image viewer okay. But he does not have focus back on his program. We have tried using SPAWNLP with a P_NOWAIT option. The program compiles and runs, but the image view window does not come up at all. We have also tried the System command Start ImageViewer, still the same results. When calls it normal without returning focus, it works. Why would SpawnLP and System command Start, not work with DJGPP????????

    Question 2??
    We have designed a workaround for this problem. We used a console program designed in DEV C++. The DJGPP program calls the DEV program which in turn "SPAWN"'s or "START"'s the image view program. When that happens, the program runs, process is returned to the main program(DJGPP) and the imageview window opens, but it takes about 10 to 15 seconds to open. We think the problem is that the main program receives focus directly back and takes up memory causing the imageview window to open slowly. The question is, How can we control Process Priority? How can we adjust the priority that a program is running in? Say for instance, we wanted to give the Image Viewing program higher running priority than the main application. Can anyone tell me or even refer me in the direction to learn how???

    Thanks a million in advance,

  2. #2
    You're mixing crap 16 bit stuff with real 32 bit stuff and expecting it to work. Write a 32 bit application.

  3. #3
    Registered User
    Join Date
    Feb 2003
    All I am trying to do is call an app written in MFC from an app written in DJGPP. The problem with writing one big app is the the main application has been written in DJGPP. Close to 100000 lines of code non-documented. I don't know about you, but I sure don't want to have to convert it. We are making that application work until I can design a true windows application to work. So, like I posted earlier, I need to call an MFC image viewing app from dos app written in DJGPP and return focus to the dos app. We have tried a system command START application, but the image viewer does not come up. My adminstrator, who wrote the whole application in DJGPP, has been using SPAWNLP, but when he tries it with a _P_NOWAIT option, same thing the image viewer does not come up. What would keep that from working on DJGPP??? Mainly, how can I change priority on a process??????

    Thanks in advance,

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. init adopts zombie process?
    By password636 in forum Linux Programming
    Replies: 4
    Last Post: 07-01-2009, 10:05 AM
  2. create a child process that creates a child process
    By cus in forum Linux Programming
    Replies: 9
    Last Post: 01-13-2009, 02:14 PM
  3. Replies: 3
    Last Post: 10-15-2008, 09:24 AM
  4. Problem with forking a process
    By Unitedroad in forum C Programming
    Replies: 10
    Last Post: 10-04-2007, 01:43 AM
  5. process programming
    By St0rM-MaN in forum Linux Programming
    Replies: 2
    Last Post: 09-15-2007, 07:53 AM