AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Wie funktioniert DosCommand?

Ein Thema von Delphi Star · begonnen am 27. Okt 2004 · letzter Beitrag vom 25. Nov 2024
Antwort Antwort
Kas Ob.

Registriert seit: 3. Sep 2023
389 Beiträge
 
#1

AW: Wie funktioniert DosCommand?

  Alt 25. Nov 2024, 11:55
Windows 10 doesn't have a DOS kernel anymore. How can DOS commands be executed?
By virtualizing or more accurately emulating.

Or does this code pass it on to the Windows Console? And thus allow access to the Windows command prompt or Powershell?
As above, see, (real) DOS kernel is something impossible and even if it is possible it will compromise the OS security rendering Windows OS unusable, in past era DOS kernel only ran in real mode or protected mode, meaning it has access to low level hardware interrupt, this can't be allowed in modern OS, all application and services should be in virtual mode context, so the solution is create an emulator to emulate most of the functionality, which is not different at all except for..

The source code tells me that DOS must mean the operating system console, Windows Console or PowerShell, since normal DOS can't multitask. But DOSCommand can, according to the source code.
To clear this confusion and extend the answer for the above question, lets answer what is the difference between GUI and console application, the answer is nothing ! except
console application had special flags in the EXE to make the OS automatically create the pipes for the emulation host app while GUI application doesn't have this. (by pipes i mean the stdinput and stdoutput..)

For fun application try to use WriteLn in GUI application

play with such code and see how closing the console will terminate the GUI app !
Delphi-Quellcode:
procedure TForm10.Button1Click(Sender: TObject);
begin
  AllocConsole;
end;

procedure TForm10.Button2Click(Sender: TObject);
begin
  Writeln('Testing console output from GUI application');
end;
To read more about consoles https://learn.microsoft.com/en-us/wi...nsole/consoles

And again to assert, there is no real DOS command in windows, only allowed emulated behavior (input/output).
Kas
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 23:25 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz