🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.ms-windows.programmer.win32
Article #2186

Running a PIF file using CreateProcess in an allocated console window

#2186
From: Ran
Date: Mon, 26 Apr 2004 14:15
39 lines
2344 bytes
Hello,

I am trying to find a way to execute a pif file within the context of
my own application's console using AllocConsole.

My basic need is to have the console in my context so I can use the
console API's AND I must use the pif parameters for EMS, XMS, and a
few other parameters.

Is there a way to do this ? Is there a way around ?

For example, try running "start /b XX.pif" 

I am getting an error message

The NTVDM CPU has encountered an illegal instruction.
and get the Close Ignore buttons.

This is not related to any problems in the DOS application.

If I use CREATE_NEW_CONSOLE in the creation flags, ofcourse everything
works,
but it is open in a new window. in the allocated console window I
always get this GPF.

Is there a way to get the console window in my context after the OS
created it ?

I can change _default.pif and just execute cmd.exe but I do not want
to be dependant on _default.pif because of multiple executions issue.
_default.pif is is hardcoded into ntvdm.exe.
How can I allocconsole, run CMD with PIF settings ? and no
_default.pif?

Help ?

Thanks for your time,

Ran.
Technical Details
Message-ID: <2d73b65b.0404260615.4d28b9aa@posting.google.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 113dfb,96238a6b4094de6b,start
X-Google-Thread: f94dd,5caf29689b7aca92,start
X-Google-Thread: 104093,1923a51ef2371e4f,start
X-Google-Thread: 110c1b,47b2e465e7d83716,start
X-Google-Thread: f645d,311346bbd5e70fc1,start
X-Google-Attributes: gid113dfb,gidf94dd,gid104093,gid110c1b,gidf645d,public
X-Google-ArrivalTime: 2004-04-26 07:15:19 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mail
From: ran_tao@netvision.net.il (Ran)
Newsgroups: comp.os.ms-windows.programmer.win32,borland.public.delphi.nativeapi,microsoft.public.vb.winapi,microsoft.public.win32.programmer.ui,comp.lang.basic.visual
Subject: Running a PIF file using CreateProcess in an allocated console window
Date: 26 Apr 2004 07:15:18 -0700
Organization: http://groups.google.com
Lines: 39
Message-ID: <2d73b65b.0404260615.4d28b9aa@posting.google.com>
NNTP-Posting-Host: 212.235.112.28
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1082988919 22823 127.0.0.1 (26 Apr 2004 14:15:19 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 26 Apr 2004 14:15:19 +0000 (UTC)