www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/01/15/00:32:20

From: "Steve Patton" <leaphe AT pemail DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: Rhide Win95 Virtual Machine Temporary Fix
Date: Wed, 14 Jan 1998 22:25:47 -0700
Organization: AT&T WorldNet Services
Lines: 55
Message-ID: <69k6lm$r59@bgtnsc02.worldnet.att.net>
NNTP-Posting-Host: 12.67.33.181
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Hello, I've noticed that when I run Rhide, and I'm debugging the program,
and my program freezes, or Rhide quits to DOS (for no apparent reason), the
name for the window is left at Rhide v1.4.  I saw some people talking about
it on here and they were saying that you could fix it via the Windows SET
TITLE interrupt call, however this does not work because as soon as your
program quits (any program for that matter), it sets it to NULL, but I found
that Rhide v1.4 is the Virtual Machine Title.  I'm sure many of you have
already fixed it, but for what it's worth, and those who haven't, here's
some short C source for a fix you can call from the prompt.  Just compile
this and place it in the path.  Name it whatever the heck you want.  Once
you run it, it will replace the Window Machine Title to the contents in
Message (change to your suiting).


*********** SNIP HERE************
#include <stdio.h>
#include <stdlib.h>
#include <dpmi.h>
#include <dos.h>

char message[] = "MS-DOS Command Prompt";
// cannot be more than 29 characters(29+nul)
void main ()
 {
  int sel, seg;
  __dpmi_regs r;
  printf ( "Restoring Virtual Machine Title to %s", message );
  delay ( 100 ); // to prevent bug from happening

  seg = __dpmi_allocate_dos_memory(2, &sel);

  _dosmemputb( message, strlen(message)+1, (seg*16) );
  r.x.ax = 0x168E;
  r.x.dx = 0x0001;
  r.x.es = seg;
  r.x.di = 0;

  __dpmi_int ( 0x2F, &r );

  if ( !r.x.ax )
    printf ( "\r\n  Could not change Virtual Machine Title\r\n" );
   else
    printf ( "\r\n  Virtual Machine Title Change Successful!\r\n" );

  __dpmi_free_dos_memory( sel);
  exit ( 0 );
 }

************END SNIP*************

--
-Steve
http://home.att.net/~pattonl


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019