1  Interesting QA from various newsgroups
unsorted, uncommented, simply copied from NG - mails (without written permission of the authors)

last updated: Sat. Mar-28-1998

Subject: LPT1 and LPT2 in 1 program
   Date: Thu, 5 Feb 1998 21:43:14 -0600
   From: "Peter Trout" <ukpt@hal-pc.org>
     To: "Ing. Franz Glaser" <office@meg-glaser.biz>

Hi Franz,

Thanks for your valuable help.  I took your suggestion and it worked
perfectly on the machine with the software and two printers installed.
Much appreciated.
I now have to discover how to get a second machine accessing the host to
perform the same function.  The networked machine chokes with error '160
Device Write Fault' trying to write to LPT2.  I'm fiddling with Win95
hoping to discover the secret.
Thanks again
> From: Ing. Franz Glaser <office@meg-glaser.biz>
> To: pmt <ukpt@hal-pc.org>
> Subject: Re: LPT1 and LPT2
> Date: Friday, January 30, 1998 7:55 PM
> pmt schrieb:
> > I have a TP Dos ap. that needs to write one report to LPT1 and another
> > to LPT2.  Is there a way to switch these with code?
> > TIA
> > Peter
> I would try to open 2 textfiles:
> LPT1, LPT2  : Text;
> Assign(LPT1,'LPT1'); Rewrite(LPT1);
> Assign(LPT2,'LPT2'); Rewrite(LPT2);
> Writeln(LPT1,anything);
> Writeln(LPT2,anythingelse);
> Close(LPT1); Close(LPT2);
> Do not invoke the PRINTER in USES.
> This should help.
> Kindest Regards, Franz Glaser

Subject: Re: How to get rid of idiots
   Date: Mon, 09 Mar 1998 19:45:05 +0100
   From: Remco de Korte <remcodek@xs4all.nl>
 Organization: Soft Machine / R.S.I. / Onwijs Producties
 Newsgroups:   comp.lang.pascal.misc, comp.lang.pascal.borland


Ing. Franz Glaser wrote:
> Remco de Korte wrote:
> > I think I'll need that.
> > Some time ago someone posted a message in a Dutch newsgroup with a piece
> > of Javascript in it. My browser (Communicator) crashed right away on
> > that, but it took me some time to find out what caused it.
> > I forgot to delete the message and now find that it has become the first
> > in that particular newsgroup of the messages that aren't outdated yet,
> > so these last few days again Communicator crashed upon trying to read
> > the newsgroups. Something like a timebomb. The problem is, people do
> > these things out of ignorance not out of malevolence.
> > Remco de Korte
> I have exactly the same problem. In addition I work on my sons PC so I
> cannot modify the Communicator without getting troubles with my son.
> I found out that the Java troubles come from Windows NT which makes
> silly filename + dirname case translations and that the Communicator has
> troubles with dirnames having blank spaces when it searches the
> Franz Glaser, Austria
Yep, well, tell that to the fools distributing this crappy code.
Thanks for the info, anyway.

  Subject: Big memory chunks ?
     Date: Wed, 11 Mar 1998 20:09:30 +0100
     From: Tobias Gustafsson <tobias.gustafsson@mbox2.swipnet.se>
       To: "Ing. Franz Glaser" <office@meg-glaser.biz>

Ing. Franz Glaser wrote:

> > How does one allocate chunks of memory bigger than 64k where
> GetMem()
> > fails ?
> Impossible on 16-bit operating systems. How shall it be addressed
> using
> 16 bit offset???

Yeah, ofcourse.. I am currently writing a small racing-game with
scrolling screens, and I need a big tracks to be loaded into memory.
Naturally I must divide them into smaller 64k chunks instead ? The
conventional memory will not be enough though. Guess I will have to use
XMS, any tips/hints ?

Thanks, Tobias.

   Subject: help with Capslock
      Date: Thu, 12 Mar 1998 18:39:31 -0500
      From: Vorro <Vorro@vabch.com>
 Organization: 7th Spiral Industies, Inc.
        To: "Ing. Franz Glaser" <office@meg-glaser.biz>

thank you for the speedy reply! i really appreciate it.
well, the code you sent compiled fine. the only problem is that it is
turning numlock on. (i made a mistake suggesting $20, Franz Glaser! see below)
thank you very much.
Zack Adgie

Ing. Franz Glaser wrote:
> Vorro schrieb:
> >
> > how can i make sure that caps lock is always turned on? I'm running
> > turbo pascal 3.01 . I know, it's old as crap, but it's for a school
> > project, and thats what the school uses. any reply via email would be
> > greatly appreciated. thank you very much.
> > Zack Adgie
> At $0040:$0017 is a byte, where you can set the $40 bit as often as you
> want. (I hope it is $40, try it please).
> Var ActionKeys : Byte absolute $0040:$0017;
> Procedure SetCaps;
> Begin
>   ActionKeys := ActionKeys or $40;  {this is corrected}
> End;
> TP 3 is so long ago, I am not sure if Byte works and absolute etc.
> Probably you have to make a pointer, and Integer would work too.
> Franz Glaser, Austria

   Subject: Drawing bitmaps to Memory device context's
      Date: Tue, 17 Mar 1998 07:24:20 -0600
      From: "Earl F. Glynn" <EarlGlynn@WorldNet.att.net>
 Organization: AT&T WorldNet Services
 Newsgroups: borland.public.delphi.graphics

The Nuker wrote in message <6eli1r$agk$1@dalen.get2net.dk>...
>Does anyone know how to draw a Bitmap to a memory device context?
>(as it can be done with 'Draw' on a TCanvas)


Last week I reposted a routine BltTBitmapAsDIB that Joe Hecht from
Borland posted some months ago.  Just do a Deja New search
for "BltTBitmapASDIB."

efg's Computer Lab:  http://infomaster.net/external/efg
Earl F. Glynn                 E-Mail:  EarlGlynn@att.net
MedTech Research Corporation, Lenexa, KS  USA

Subject: The weekly FAQ item about the Pascal newsgroups' reorganization
      Date: 18 Mar 1998 05:14:02 +0200
      From: ts@uwasa.fi (Timo Salmi)
 Organization: University of Vaasa, Finland
 Newsgroups: comp.lang.pascal.ansi-iso, comp.lang.pascal.borland, comp.lang.pascal.mac, comp.lang.pascal.misc,comp.lang.pascal.delphi.advocacy, comp.lang.pascal.delphi.components.misc, comp.lang.pascal.delphi.components.usage, comp.lang.pascal.delphi.components.writing, comp.lang.pascal.delphi.databases, comp.lang.pascal.delphi.misc
 Followup-To: comp.lang.pascal.misc

 comp.lang.pascal.ansi-iso Pascal according to ANSI and ISO standards.
 comp.lang.pascal.borland  Borland's Pascal incl. Turbo Pascal (not Delphi!)
 comp.lang.pascal.mac      Macintosh based Pascals.             ^^^^^^^^^^^
 comp.lang.pascal.misc     Pascal in general and ungrouped Pascals.

 comp.lang.pascal.delphi.advocacy Contentious issues related to Delphi.
 comp.lang.pascal.delphi.announce Delphi related announcements. (Moderated)
 comp.lang.pascal.delphi.components.misc General component issues.
 comp.lang.pascal.delphi.components.usage Using pre-written components.
 comp.lang.pascal.delphi.components.writing Writing Delphi components.
 comp.lang.pascal.delphi.databases Database aspects of Borland Delphi.
 comp.lang.pascal.delphi.misc General issues with Borland Delphi.
 comp.sources.delphi Delphi and ObjectPascal source code. (Moderated)

OLD:  Please cease using!
 comp.lang.pascal                     Discussion about Pascal.
 comp.lang.pascal.delphi.components   Writing components in Borland Delphi.

Dear Fellow Pascal Users,

Please let me try to help by repeating the central information about the Pascal newsgroups' organization. This information is an edited rendition from our

 132960 Dec 13 1997 ftp://garbo.uwasa.fi/pc/link/tsfaqp.zip
 tsfaqp.zip Common Turbo Pascal Questions and Timo's answers

I think it will be advisable that I post this information automatically once a week to all the pascal newsgroups to help to keep us organized.

76. *****

 Q: What are the current Pascal newsgroups on the Usenet news?

 A: The following new Pascal discussion newsgroups were created June 12, 1995 to replace the old comp.lang.pascal. The new Delphi newsgroups were first created around July 10, 1995. Further Delphi newsgroups were added in April 1996.

A special note about Delphi postings. Please use the delphi newsgroups for the Delphi related postings. In particular, the newsgroup comp.lang.pascal.borland is _NOT_ for Delphi related

A second special note. Please avoid crossposting between the newsgroups. In particular do not crosspost between the old and the new newsgroups. It slows the transition to the new system. (This automatic posting breaches the general non-crossposting tenet only because it is relevant information about the arrangements of all the newsgroups involved.)

 comp.lang.pascal.ansi-iso Pascal according to ANSI and ISO standards.
 comp.lang.pascal.borland  Borland's Pascal incl. Turbo Pascal (not Delphi!)
 comp.lang.pascal.mac      Macintosh based Pascals.
 comp.lang.pascal.misc     Pascal in general and ungrouped Pascals.

 comp.lang.pascal.delphi.advocacy Contentious issues related to Delphi.
 comp.lang.pascal.delphi.announce Delphi related announcements. (Moderated)
 comp.lang.pascal.delphi.components.misc General component issues.
 comp.lang.pascal.delphi.components.usage Using pre-written components.
 comp.lang.pascal.delphi.components.writing Writing Delphi components.
 comp.lang.pascal.delphi.databases Database aspects of Borland Delphi.
 comp.lang.pascal.delphi.misc General issues with Borland Delphi.
 comp.sources.delphi Delphi and ObjectPascal source code. (Moderated)

There also are the following newsgroups of interest, which are not as widely circulated on Usenet so you may need to connect to the news host forums.borland.com for them
For other, less circulated, often local Pascal newsgroups see
  grep pascal ~/.newsrc

RELATED of potential interest:
comp.os.msdos.programmer.turbovision Borland's text application libraries

OLD:  Please cease using!
 comp.lang.pascal                     Discussion about Pascal.
 comp.lang.pascal.delphi.components   Writing components in Borland Delphi.

Please duly observe the good netiquette in the Pascal newsgroups. For example, please note that, while posting source code snippets of reasonable length is welcome, you should not post binaries or binary attachments (uuencoded, mimed, base64:d, etc) to these newsgroups. If you have such material to show or share please make it available at an FTP or WWW location and post only the pointer.

For more information about the Pascal newsgroups please see

 52703 Jun 14 1995 ftp://garbo.uwasa.fi/pc/doc-net/pasgroup.zip
 pasgroup.zip Information about the comp.lang.pascal.* newsgroups

If your site is not getting the new Pascal newsgroups, please contact your own site's newsmaster about the situation.

   All the best, Timo

Prof. Timo Salmi   Co-moderator of news:comp.archives.msdos.announce
Moderating at ftp:// & http://garbo.uwasa.fi/ archives
Department of Accounting and Business Finance  ; University of Vaasa
mailto:ts@uwasa.fi <http://www.uwasa.fi/~ts/>  ; FIN-65101,  Finland

Spam foiling in effect.  My email filter autoresponder will return a
required email password to users not yet in the privileges database.

   Subject: Batch program
      Date: 20 Mar 1998 09:53:47 GMT
      From: laa12@no-spam-keele.ac.uk (The African Chief)

In article <3511870F.2DBE@sterling.med.utoronto.ca>
Elisabeth Tillier <tillier@sterling.med.utoronto.ca> wrote:

> Hi,
>       I am new to programming in windows. I'd like to run several
> programs sequentially, like a batchfile in DOS. I've tried using a
> series of WinExec functions but the program does not wait for the
> previous one to terminate before the next one starts (which is a
> necessity in my case). Can anyone help?

Try this WinExecWait function;

{///////////// a PeekMessage() loop /////////}
procedure Pause;
  Msg: TMsg;
   While PeekMessage (Msg, 0, 0, 0, pm_Remove) do
       if Msg.Message = wm_Quit then

    if not IsDialogMessage (0, Msg) then
    with Msg do
         TranslateMessage (Msg);
         DispatchMessage (Msg);
      end{With Msg do};
   end {While PeekMessage};
End {Pause};
Function WinExecWait (PName: PChar; ShowCmd : Integer) : THandle;
  InstanceID : THandle;
    InstanceID := WinExec (PName, ShowCmd); {call WinExec() }
    WinExecWait := InstanceID;              {return InstanceID }
    if InstanceID < 33 then Exit;           {some error }
        Pause;   {keep waiting }
    Until GetModuleUsage (InstanceID) = 0; {until this instance ends }
End { WinExecWait() };

Best regards, The Chief
Dr. Abimbola A. Olowofoyeku (The African Chief)
Email: laa12@keele.ac.uk
Homepage: http://ourworld.compuserve.com/homepages/African_Chief/
Author of: Chief's Installer Pro 4.20 for Win16 and Win32:

   Subject: types of sorts
      Date: Fri, 20 Mar 1998 23:20:44 GMT
      From: clifpenn@airmail.net (Clif Penn)
 Newsgroups: comp.lang.pascal.borland

xmtatx@aol.com (XmtatX) wrote:

>Can anybody tell me some kinds of sorts other then the bubble sort and what
>they do.  Anything will be a help. thanx

This will be a view from 50,000' of some popular sorts.
Hopefully, the names will be accurate enough for you to find additional details if needed. Except where designated otherwise, "list" is used in the generic sense and does not mean a linked list.

BUBBLE SORT (also called exchange selection sort, propagation sort) Propagating from the top or bottom of the list, adjacent elements are swapped if out of order. This continues until no elements are swapped. This is one of the slowest methods but, when your list is short, it is fast enough.

INSERTION SORT (roughly twice as fast as Bubble sort)When linked lists are used, this is a popular method. Sorting is done like sorting a hand of playing cards, picking up one at a time and placing it where it is ranked.

EXCHANGE SORT (n! comparisons)
Suppose you are sorting a list in alphabetic order. You start with the first item and traverse the list to find the smallest. If the smallest is not the first item, swap items. Now you start with the second item and find the next smallest, etc. Easily remembered and implemented with two loops, one nested.

SHELL SORT  (Due to Donald Lewis Shell, circa 1959)
Because of its age, this method has gone through so many changes while still keeping the same name, its history is confusing. In general you start by comparing the first in the list to one a fixed distance down the list. If these two are out of order, swap. Move both comparison points down one position...and so on to the bottom of the list. If any swaps were performed, start at the top with the same separation distance and traverse the list again. Keep doing this until no swaps are made.

Shrink the distance between the comparison points in some algorithmic way and do it all over again. The very last comparison run has the exact look of a single Bubble sort run BUT the distance to move the out of order elements is short.

Originally, the Shell sort used separations of either 8-4-2-1 or  7-5-3-1. For long lists this does not move the out of order items far enough. Most implementations today start by comparing the first item with the item half way down the list. When no swaps are made in a pass, the comparison point's separation is halved and so on.

There are other modifications that make this sort almost as fast as the Quicksort and FASTER than the Quicksort on partially ordered lists.

QUICKSORT (Due to C. A. R. Hoare, circa 1962) The most popular implementation uses a method which keeps calling itself (recursion). This places it in the advanced section of most textbooks. However, because of its speed in sorting truly randomly ordered lists, it should be in anyone's sorting vocabulary. This is a "divide and conquer" technique. The "key" (pun intended) to this method is to be able to locate a sorting key for each pass.

Given a sorting key value, the first pass places values higher than  the key on one side of the key and those lower or equal to the key on  the other. The sublist higher than the key gets a new key and does the same as does the sublist below the key. Finally when all these smaller and smaller pieces are sorted, they are reassembled in a complete sorted list. Worst case for this sort is a mostly sorted list. Another limitation may be encountered--you run out of stack space due to the recursion.

Assume we want the largest on top. First the data are arranged in a type of binary tree called a heap. Each element of the tree has a maximum of two smaller or equal valued descendants which are arranged in a predetermined way, depending on their values. The order of the values on the tree allows the rapid placement of new values. It also allows the tree to be traversed rapidly to "pluck" the leaves into a sorted list.

Clif  <clifpenn@airmail.net>   Mar 20, 1998

Subject: Problems with Protected Mode Programs
Date: 26 Mar 1998 16:37:40 GMT
From: "Chris Franzen" <franzen@hq.vobis.de>
Organization: VOBIS AG
Newsgroups: comp.lang.pascal.misc

Since the crashes do not occur if you are debugging with TD, it might be
helpful to know that TD initializes the data segment (I believe) and the
stack segment (guaranteed) with zero byte values so all global and local
variables are init´d to zero, and that does not happen if you have no
debugger running. Thus, in stand-alone sessions, your app my choke because
of a dangling pointer reference, or other uninit´d variables consequences.


Eneko Prins <foureyes@caiw.nl> schrieb im Beitrag

> I got the folowing problem:
> If I try to startup any program from within a Protected Mode Program I
> get serious system crashes. This can vary from system hang-ups, blue
> Worst of all...when I try to debug in the turbo debugger the crash
> does not occure.
> I know the problem is very very vague. But if someone can give me any
> hints or tips or anything I would greatly apriciate it. I'm deperate,
> any help is very welcome. Please send anything by mail.
> Greets,
> Eneko Prins ING-Group Holland.
> Mail to: Foureyes@caiw.nl

      Subject: Re: TP 7.0 bit image format
         Date: Thu, 26 Mar 1998 00:49:30 GMT
         From: mikeday@nospam.backwater.com (Michael Day (TeamB))
 Organization: Another Netscape Collabra Server User
   Newsgroups: borland.public.turbopascal

On Tue, 24 Mar 1998 23:09:37 -0600, "Steve Cagle" <sbcagle@earthlink.net>

>Does anyone know the exact format of the bit image used by GetImage and

The format changes depending on the driver. There is no standard definition
for the format of the image. Anyone that creates a driver is free to use
whatever format they wish.

What is consistant is that the first word is the Width in pixels, the second
word is the height in pixels. The following words are the packed image data,
followed by a garbage word at the end of the image.

For monochrome, generally the data is packed one bit per pixel left to right.
It may or may not contain extra pixels in the X direction to fill out a byte
at the end.

For EGAVGA, it depends on the version of the driver and whether it is a 3rd
party driver or not. The older drivers used packed nibbles to represent the
pixels, some of the later versions use four rows of X data to contain the scan
line for each color plane. Repeating for the number of Y scan lines saved.

For 256 color drivers, usually data is saved one byte per pixel left to right,
top to bottom.

- Mike

   Subject:  Fast Text Searching
      Date:  Tue, 24 Mar 1998 00:56:09 -0500
      From:  Scott Earnest <setech@_ix.netcom.com>
 Newsgroups: comp.lang.pascal.borland

Stephen Chrzanowski wrote:

> Hello all..  Yet another programming task I've assigned myself, and I've
> run into a few stumbling blocks.  I need a logic refresher...
> I'm writing a program to search out files of a particular file mask, and
> then read that file and search for URLs.  I've got the searching for the
> files down pat, no prob there, but, I'm having a few problems searching
> through the files...
> I'm using BLOCKWRITE to load in 64k worth of the file (65000 chars to be

I'll assume that's a typo and is meant to be blockread().

> precice) and I'm having problems trying to track down those URLs that
> are split between the blocks read...  I had ONE procedure down, but it
> was slower than molasis on a cold winters day (It took it a minute on a
> 486dx-33 to search through a 1meg file byte by byte)  I'm looking for
> short cuts in the progy to speed seaching through files.  I'll send ya
> the code if you want to help.  Just reply to the email.

Sounds like what you need is my unit which adapts Boyer-Moore to file
searching.  It's pretty quick.  It's on my code page, but a quick link to it


BTW, when doing large block transfers, it's best to use values which are
multiples of 1024 based on 2^n:  1024, 2048, 4096, 8192, 16384, and 32768 are
the best numbers to use.  When you get away from these file sizes, you get I/O
fragmentation which can cause sectors to be re-read and re-written -- may not
make a difference with small files, but with large files, it will create an
unneeded bottleneck.

> Thanks in advance!

Scott Earnest            | SPAM protection in effect. Remove  |
setech@_ix.netcom.com    | "_" as needed for true addresses.  |
earnests@_homenet.lm.com |    UIN:1136443  EFnet:pale_blue    |
sinykal@_cyberspace.org  | URL: http://www.netcom.com/~setech |

   Subject: How to access floppy bootsector
      Date: Wed, 25 Mar 1998 23:00:15 -0500
      From: Scott Earnest <setech@_ix.netcom.com>
Newsgroups: borland.public.turbopascal

> Philippe Seewer wrote:
> > Hello
> >
> > Does anyone know how to acces the bootsector (Sector 0) of a floppy drive (HD
> > 1.44MB)? I need to change the serial Number of a disc for copyright protection
> > for one of my programs.
> >
> > Thanks
> > Ph. Seewer

> Register                                    Value
> AH                                            02h
> AL                                            amount of sectors
> CL                                            sectorno.    (1-n)
> CH                                            tarckno.    (0- n-1)
> DL                                            driveno. (0 for A:)
> DH                                            headno (0-1)
> BX                                            block offset
> ES                                            block segment

This is a bit misleading.  CL contains the sector number in the lower 6 bits,
but the upper 2 bits may be used for extra cylinder bits (on hard drives).
Also, drive numbers don't have direct correlation to the sequential ordering
used by DOS calls.  Removable media drives (particularly floppies) will be
numbered 00h, 01h, 02h, etc.  Fixed drives will be numbered 80h, 81h, 82h,

> [snip!]

Frankly, a better idea is to avoid direct I/O via int 13h (especially because
it can cause problems under Win95) and use int 21h, AH=69h (get/set disk
serial number).

>From Ralf Brown's Interrupt List:

        AH = 69h
        AL = subfunction
            00h get serial number
            01h set serial number
        BL = drive (0=default, 1=A, 2=B, etc)
        BH = info level (00h only for DOS; OS/2 allows other levels)
        DS:DX -> disk info (see #1455)
Return: CF set on error
            AX = error code (see #1366 at AH=59h/BX=0000h)
        CF clear if successful
            AX destroyed
            (AL = 00h) buffer filled with appropriate values from extended BPB
            (AL = 01h) extended BPB on disk set to values from buffer

Table 1455
Format of disk info:
Offset  Size    Description
 00h    WORD    0000h (info level)
 02h    DWORD   disk serial number (binary)
 06h 11 BYTEs   volume label or "NO NAME    " if none present
 11h  8 BYTEs   (AL=00h only) filesystem type (see #1456)

Scott Earnest

   Subject: Converting ico to bmp (any API?)
      Date: Mar 1998 05:26:54 -0800
      From: Reid Roman <rkroman@pacbell.net>
   Reply-To: or, reidr@autobytel.com
 Organization:Auto-By-Tel (http://www.autobytel.com)
 Newsgroups: comp.lang.pascal.delphi.misc

Craig Roberts wrote:
> Does anyone know if there is an API call to convert an icon to a bitmap?
> I know the image editor can do it just by copy and paste from the icon
> to the bitmap but I want to do it on many icons.
> Any help would be appreciated...
> Craig -- Craig@inetw.net

I got this from these forums at an earlier date ..

procedure Convert(S: String);
  Picture1 : TPicture;
  Bitmap1 : TBitmap;
  Icon1 : TIcon;
  Icon1 := TIcon.Create;
  SetLength(S, Length(S)-3);
  Form1.Label1.Caption:=S; Form1.Update;
  Picture1 := TPicture.Create;
  Picture1.Icon := Icon1;
  Bitmap1 := TBitmap.Create;
  with Bitmap1 do
    width := Icon1.Width;
    Height := Icon1.Height;
    Canvas.Rectangle(0, 0, Width+1, Height+1);
    Canvas.Draw(0, 0, Picture1.Icon);

Hope that helps..

. Reid Roman                              .. Delphi Programmer / Analyst             .
. Auto-By-Tel (http://www.autobytel.com)  .

   Subject: Zooming in & out. (Delphi)
      Date: Thu, 26 Mar 1998 20:21:59 +0100
      From: Rene Tschaggelar <tschaggelar@access.ch>
 Organization: Ing.Büro R.Tschaggelar
 Newsgroups: borland.public.delphi.graphics

I have an even simpler approach :



Lazikas wrote:
> Hello to all.
> I would like to know if there is an easy way to zoom in & out a Bitmap.
> To do so, i have changed the Graphics.pas unit from Delphi by adding
> into Bitmap Class some variables and in TBitmap.Draw() routine some code
> to make StretchBlt function fit my needs. This code works fine BUT i
> cannot use compiled units provided by third parties since they have
> compiled their units with different version of graphics. I would
> appreciate if someone would tell me something not so low-level...
> Thanks in advanced,
> Lazikas o Pontios.

   Subject: detecting SCSI-devices
      Date: 27 Mar 1998 10:00:08 GMT
      From: pierre@datarescue.com (Pierre Vandevenne)
 Organization: DataRescue - sprl -
 Newsgroups: comp.lang.pascal.borland

In <6ffd6f$sdi@news.euro.net>, zephod@concepts.nl (Zephod Beeblebrox) writes:
>Anyone out there knows (and wishes to share that knowledge) how one can detect
>SCSI (harddisks) hardware?

Depends on the controller actually. Of course, a good bet is Adaptec and ASPI

A very good reference

The SCSI Bus and the IDE Interface, Protocols, Applications and Programming by F. Schmidt
ISBN 0-201-42284-0

It includes useful pascal source.

Best Regards
Pierre Vandevenne, MD - http://www.datarescue.com/ida.htm
IDA Pro 3.7 adds multi pass analysis, stack variables, symbolic constants,
unicode, ELF support, color highlighting,  C++ name demangling to compiler
library recognition - now with Delphi and Pascal FLIRT support

   Subject: short filename to long filename conversion
      Date: Fri, 27 Mar 1998 15:55:15 +0100
      From: "Jan Oonk" <jan@codim.nl>
 Organization: NLnet
 Newsgroups: comp.lang.pascal.delphi.misc

A year ago I asked the very same question. Did you try to search www.dejanews.com? okokok here's the solution..have fun with it:

function MakeLongPath(ShortPath:String):String;
var PIDL:PItemIDList;
    szPath: Array[0..MAX_PATH] of Char;
    olePath: Array[0..MAX_PATH] of WideChar;
    chEaten,dwAttributes: Longint;
    Buffer:Array[0..Max_Path] of Char;
 Result:=ShortPath; //If not succeed then return ShortPath
 If CoGetMalloc(MEMCTX_TASK,OLEManager)=S_OK then begin
  If SHGetDesktopFolder(PDeskTopFolder)=NOERROR then begin
   if MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, szPath, -1,
olePath,MAX_PATH)<>0 then begin
K then begin
     If SHGetPathFromIDList(PIDL,Buffer) then Result:=Buffer;

Hope that helps.............
Greetings Jan Oonk

   Subject: Shell sort
      Date: 27 Mar 1998 22:41:13 GMT
      From: Horst.kraemer@berlin.snafu.de (Horst Kraemer)
 Newsgroups: comp.lang.pascal.borland

On 27 Mar 1998 19:34:05 GMT, xmtatx@aol.com (XmtatX) wrote:

>  What is the algerithm for the shell sort.  I have gotton a couple things off the internet but it just has made me realy confussed.  i aprechate any help.

The following procedure will sort an array 'a' of integer from 0 to size-1 (size elements) using the shellsort algorithm.

procedure shellsort(size:word);
  temp, gap, i, j : integer;

  gap:=1;while (gap<size) do gap:=gap shl 1 + 1;

  while (gap>1) do begin
    gap:=gap shr 1;
    for i:=0 to size-gap-1 do begin
      while (j>=0) and (a[j]>a[j+gap]) do begin



   Subject: TDW problems...
      Date: Sat, 28 Mar 1998 11:57:21 +0000
      From: Jeremy Collins <jem@jcollins.demon.co.uk>
 Organization:Marshgate Consulting Ltd.
 Newsgroups: alt.comp.lang.borland-delphi, alt.comp.borland-delphi, alt.lang.delphi, borland.public.delphi.winapi, comp.lang.pascal.delphi.misc

DELABRE Ludovic <ldelabre@hol.fr> writes

>I'm under Windows 95, and I'm using Delphi 1.0 and Delphi 2.0. I want to use Turbo Debugger for Windows 3.1 for dissamble one of my program... But It doesn't work under Win95... So ... Does anyone know if there's a patch or something like that ... Or what program can I use for dissamble under Win95 ????

I don't know if this is useful, but D2 has a "disassembly view" built in, but hidden. (D3 has it too).

I don't have D2 installed anymore, but from memory you have to do the following:

Run RegEdit and locate the Delphi 2 key (\Software\Borland\Delphi\2.0).

Add a new string key called "EnableCPU" and set the value to "1" (one).

Restart Delphi, and I you should find a new commmand on the View menu.

Jeremy Collins

  tpqa    index
  tpqa_2   continue

will be continued. Send me hints to your e-mails if you wish them to be included here...  meg-glaser@eunet.at

Get your own FREE HOMEPAGE