Board index » cppbuilder » DOS application title

DOS application title


2006-06-06 11:02:46 PM
cppbuilder19
How to get in DOS application running under Windows XP its title?
Vladimir Grigoriev
 
 

Re:DOS application title

Vladimir Grigoriev wrote:
Quote
How to get in DOS application running under Windows XP its title?
If it is not actually a DOS application, but instead a Win32 Console
application (large difference), use GetApplicationTitle().
 

Re:DOS application title

Bob
It is indeed DOS appliction. So I only can use DOS services.
Vladimir Grigoriev
"Bob Gonder" < XXXX@XXXXX.COM >wrote in message
Quote
Vladimir Grigoriev wrote:

>How to get in DOS application running under Windows XP its title?

If it is not actually a DOS application, but instead a Win32 Console
application (large difference), use GetApplicationTitle().



 

{smallsort}

Re:DOS application title

So it is a 16 bit application?
If it's 32 bit then it's a Win32 Console app
HTH Pete
"Vladimir Grigoriev" < XXXX@XXXXX.COM >wrote in message
Quote
Bob
It is indeed DOS appliction. So I only can use DOS services.
Vladimir Grigoriev

"Bob Gonder" < XXXX@XXXXX.COM >wrote in message
news: XXXX@XXXXX.COM ...
>Vladimir Grigoriev wrote:
>
>>How to get in DOS application running under Windows XP its title?
>
>If it is not actually a DOS application, but instead a Win32 Console
>application (large difference), use GetApplicationTitle().
 

Re:DOS application title

Yes it is 16-bit DOS application.
I has been thinking about Get Application Title service but it does not work
on XP.
Get Application Title
Copies the application title to the specified buffer.
mov ah, 16h ; Windows multiplex function
mov al, 8Eh ; VM Title
mov di, seg AppTitle ; see below
mov es, di
mov di, offset AppTitle
mov cx, Size ; see below
mov dx, 2 ; Get Application Title
int 2Fh
cmp ax, 1
je success
Vladimir Grigoriev
"Pete Fraser" < XXXX@XXXXX.COM >wrote in
message news: XXXX@XXXXX.COM ...
Quote
So it is a 16 bit application?
If it's 32 bit then it's a Win32 Console app
HTH Pete

"Vladimir Grigoriev" < XXXX@XXXXX.COM >wrote in message
news: XXXX@XXXXX.COM ...
>Bob
>It is indeed DOS appliction. So I only can use DOS services.
>Vladimir Grigoriev
>
>"Bob Gonder" < XXXX@XXXXX.COM >wrote in message
>news: XXXX@XXXXX.COM ...
>>Vladimir Grigoriev wrote:
>>
>>>How to get in DOS application running under Windows XP its title?
>>
>>If it is not actually a DOS application, but instead a Win32 Console
>>application (large difference), use GetApplicationTitle().


 

Re:DOS application title

That is a Windows 95 function. The results of both what you report and what
I tried imply that XP does not support it.
I tried both the assembly code you posted and the following C code in large
model using TC 2 under XP Pro.
----------------------
#include <stdio.h>
#include <dos.h>
char app_title[2048];
int main()
{
int result;
_ES = FP_SEG(app_title);
_DI = FP_OFF(app_title);
_CX = sizeof(app_title);
_DX = 2;
_AX = 0x168E;
geninterrupt(0x2F);
result = _AX;
printf("%X\n\"%s\"\n", result, app_title);
return 0;
}
----------------------
If it succeeds, AX should return with the value 1or 0 for
success or failure.
When the above code is run it shows this:
""
168E
This implies that the interrupt was not executed - that the DOS
virtual machine only did a return.
----------------------
. Ed
Quote
Vladimir Grigoriev wrote in message
news:44869ba3$ XXXX@XXXXX.COM ...

Yes it is 16-bit DOS application.
I has been thinking about Get Application Title service but
it does not work on XP.

Get Application Title
Copies the application title to the specified buffer.
mov ah, 16h ; Windows multiplex function
mov al, 8Eh ; VM Title
mov di, seg AppTitle ; see below
mov es, di
mov di, offset AppTitle
mov cx, Size ; see below
mov dx, 2 ; Get Application Title
int 2Fh
cmp ax, 1
je success
 

Re:DOS application title

You are right Ed and on this reason I have asked my question!
Vladimir Grigoriev
"Ed Mulroy" < XXXX@XXXXX.COM >wrote in message
Quote
That is a Windows 95 function. The results of both what you report and
what
I tried imply that XP does not support it.

I tried both the assembly code you posted and the following C code in
large
model using TC 2 under XP Pro.

----------------------
#include <stdio.h>
#include <dos.h>

char app_title[2048];

int main()
{
int result;

_ES = FP_SEG(app_title);
_DI = FP_OFF(app_title);
_CX = sizeof(app_title);
_DX = 2;
_AX = 0x168E;
geninterrupt(0x2F);
result = _AX;
printf("%X\n\"%s\"\n", result, app_title);
return 0;
}
----------------------
If it succeeds, AX should return with the value 1or 0 for
success or failure.
When the above code is run it shows this:
""
168E
This implies that the interrupt was not executed - that the DOS
virtual machine only did a return.
----------------------

. Ed

>Vladimir Grigoriev wrote in message
>news:44869ba3$ XXXX@XXXXX.COM ...
>
>Yes it is 16-bit DOS application.
>I has been thinking about Get Application Title service but
>it does not work on XP.
>
>Get Application Title
>Copies the application title to the specified buffer.
>mov ah, 16h ; Windows multiplex function
>mov al, 8Eh ; VM Title
>mov di, seg AppTitle ; see below
>mov es, di
>mov di, offset AppTitle
>mov cx, Size ; see below
>mov dx, 2 ; Get Application Title
>int 2Fh
>cmp ax, 1
>je success


 

Re:DOS application title

Vladimir Grigoriev wrote:
Quote
You are right Ed and on this reason I have asked my question!
And now you have your answer.
DOS is Dead!
Long Live Win64!
Or, put another way...
Live by the extension, die by the extension.
We've discussed the merits of using those DOS extentions before.
Nothing has changed in those conclusions.
Microsoft has claimed many times that they are no longer supporting
DOS. You have proved it.
 

Re:DOS application title

use the API function FindWindow();
"Vladimir Grigoriev" < XXXX@XXXXX.COM >wrote in message
Quote
How to get in DOS application running under Windows XP its title?

Vladimir Grigoriev