diff --git a/BORLAND/BC45/ADDONHLP/BCDOS.HLP b/BORLAND/BC45/ADDONHLP/BCDOS.HLP new file mode 100644 index 00000000..c331b66d Binary files /dev/null and b/BORLAND/BC45/ADDONHLP/BCDOS.HLP differ diff --git a/BORLAND/BC45/ADDONHLP/BCDOS.HLX b/BORLAND/BC45/ADDONHLP/BCDOS.HLX new file mode 100644 index 00000000..c9a3de4c Binary files /dev/null and b/BORLAND/BC45/ADDONHLP/BCDOS.HLX differ diff --git a/BORLAND/BC45/BGI/ATT.BGI b/BORLAND/BC45/BGI/ATT.BGI new file mode 100644 index 00000000..a9108a74 Binary files /dev/null and b/BORLAND/BC45/BGI/ATT.BGI differ diff --git a/BORLAND/BC45/BGI/BGIDEMO.C b/BORLAND/BC45/BGI/BGIDEMO.C new file mode 100644 index 00000000..99cd014b --- /dev/null +++ b/BORLAND/BC45/BGI/BGIDEMO.C @@ -0,0 +1,1403 @@ +/* + GRAPHICS DEMO FOR Borland C++ + + Copyright (c) 1987, 1993 Borland International. All rights reserved. + + From the command line, use: + + bcc bgidemo graphics.lib + +*/ + +#ifdef __TINY__ +#error BGIDEMO will not run in the tiny model. +#endif + +#include +#include +#include +#include +#include +#include + +#include + +#define ESC 0x1b /* Define the escape key */ +#define TRUE 1 /* Define some handy constants */ +#define FALSE 0 /* Define some handy constants */ +#define PI 3.14159 /* Define a value for PI */ +#define ON 1 /* Define some handy constants */ +#define OFF 0 /* Define some handy constants */ + +#define NFONTS 11 + +char *Fonts[NFONTS] = { + "DefaultFont", "TriplexFont", "SmallFont", + "SansSerifFont", "GothicFont", "ScriptFont", "SimplexFont", "TriplexScriptFont", + "ComplexFont", "EuropeanFont", "BoldFont" +}; + +char *LineStyles[] = { + "SolidLn", "DottedLn", "CenterLn", "DashedLn", "UserBitLn" +}; + +char *FillStyles[] = { + "EmptyFill", "SolidFill", "LineFill", "LtSlashFill", + "SlashFill", "BkSlashFill", "LtBkSlashFill", "HatchFill", + "XHatchFill", "InterleaveFill", "WideDotFill", "CloseDotFill" +}; + +char *TextDirect[] = { + "HorizDir", "VertDir" +}; + +char *HorizJust[] = { + "LeftText", "CenterText", "RightText" +}; + +char *VertJust[] = { + "BottomText", "CenterText", "TopText" +}; + +struct PTS { + int x, y; +}; /* Structure to hold vertex points */ + +int GraphDriver; /* The Graphics device driver */ +int GraphMode; /* The Graphics mode value */ +double AspectRatio; /* Aspect ratio of a pixel on the screen*/ +int MaxX, MaxY; /* The maximum resolution of the screen */ +int MaxColors; /* The maximum # of colors available */ +int ErrorCode; /* Reports any graphics errors */ +struct palettetype palette; /* Used to read palette info */ + +/* */ +/* Function prototypes */ +/* */ + +void Initialize(void); +void ReportStatus(void); +void TextDump(void); +void Bar3DDemo(void); +void RandomBars(void); +void TextDemo(void); +void ColorDemo(void); +void ArcDemo(void); +void CircleDemo(void); +void PieDemo(void); +void BarDemo(void); +void LineRelDemo(void); +void PutPixelDemo(void); +void PutImageDemo(void); +void LineToDemo(void); +void LineStyleDemo(void); +void CRTModeDemo(void); +void UserLineStyleDemo(void); +void FillStyleDemo(void); +void FillPatternDemo(void); +void PaletteDemo(void); +void PolyDemo(void); +void SayGoodbye(void); +void Pause(void); +void MainWindow(char *header); +void StatusLine(char *msg); +void DrawBorder(void); +void changetextstyle(int font, int direction, int charsize); +int gprintf(int *xloc, int *yloc, char *fmt, ... ); + +/* */ +/* Begin main function */ +/* */ + +int main() +{ + + Initialize(); /* Set system into Graphics mode */ + ReportStatus(); /* Report results of the initialization */ + + ColorDemo(); /* Begin actual demonstration */ + if( GraphDriver==EGA || GraphDriver==EGALO || GraphDriver==VGA ) + PaletteDemo(); + PutPixelDemo(); + PutImageDemo(); + Bar3DDemo(); + BarDemo(); + RandomBars(); + ArcDemo(); + CircleDemo(); + PieDemo(); + LineRelDemo(); + LineToDemo(); + LineStyleDemo(); + UserLineStyleDemo(); + TextDump(); + TextDemo(); + CRTModeDemo(); + FillStyleDemo(); + FillPatternDemo(); + PolyDemo(); + SayGoodbye(); /* Give user the closing screen */ + + closegraph(); /* Return the system to text mode */ + return(0); +} + +/* */ +/* INITIALIZE: Initializes the graphics system and reports */ +/* any errors which occured. */ +/* */ + +void Initialize(void) +{ + int xasp, yasp; /* Used to read the aspect ratio*/ + + GraphDriver = DETECT; /* Request auto-detection */ + initgraph( &GraphDriver, &GraphMode, "" ); + ErrorCode = graphresult(); /* Read result of initialization*/ + if( ErrorCode != grOk ){ /* Error occured during init */ + printf(" Graphics System Error: %s\n", grapherrormsg( ErrorCode ) ); + exit( 1 ); + } + + getpalette( &palette ); /* Read the palette from board */ + MaxColors = getmaxcolor() + 1; /* Read maximum number of colors*/ + + MaxX = getmaxx(); + MaxY = getmaxy(); /* Read size of screen */ + + getaspectratio( &xasp, &yasp ); /* read the hardware aspect */ + AspectRatio = (double)xasp / (double)yasp; /* Get correction factor */ + +} + +/* */ +/* REPORTSTATUS: Report the current configuration of the system */ +/* after the auto-detect initialization. */ +/* */ + +void ReportStatus(void) +{ + struct viewporttype viewinfo; /* Params for inquiry procedures*/ + struct linesettingstype lineinfo; + struct fillsettingstype fillinfo; + struct textsettingstype textinfo; + struct palettetype palette; + + char *driver, *mode; /* Strings for driver and mode */ + int x, y; + + getviewsettings( &viewinfo ); + getlinesettings( &lineinfo ); + getfillsettings( &fillinfo ); + gettextsettings( &textinfo ); + getpalette( &palette ); + + x = 10; + y = 4; + + MainWindow( "Status report after InitGraph" ); + settextjustify( LEFT_TEXT, TOP_TEXT ); + + driver = getdrivername(); + mode = getmodename(GraphMode); /* get current setting */ + + gprintf( &x, &y, "Graphics device : %-20s (%d)", driver, GraphDriver ); + gprintf( &x, &y, "Graphics mode : %-20s (%d)", mode, GraphMode ); + gprintf( &x, &y, "Screen resolution : ( 0, 0, %d, %d )", getmaxx(), getmaxy() ); + + gprintf( &x, &y, "Current view port : ( %d, %d, %d, %d )", + viewinfo.left, viewinfo.top, viewinfo.right, viewinfo.bottom ); + gprintf( &x, &y, "Clipping : %s", viewinfo.clip ? "ON" : "OFF" ); + + gprintf( &x, &y, "Current position : ( %d, %d )", getx(), gety() ); + gprintf( &x, &y, "Colors available : %d", MaxColors ); + gprintf( &x, &y, "Current color : %d", getcolor() ); + + gprintf( &x, &y, "Line style : %s", LineStyles[ lineinfo.linestyle ] ); + gprintf( &x, &y, "Line thickness : %d", lineinfo.thickness ); + + gprintf( &x, &y, "Current fill style : %s", FillStyles[ fillinfo.pattern ] ); + gprintf( &x, &y, "Current fill color : %d", fillinfo.color ); + + gprintf( &x, &y, "Current font : %s", Fonts[ textinfo.font ] ); + gprintf( &x, &y, "Text direction : %s", TextDirect[ textinfo.direction ] ); + gprintf( &x, &y, "Character size : %d", textinfo.charsize ); + gprintf( &x, &y, "Horizontal justify : %s", HorizJust[ textinfo.horiz ] ); + gprintf( &x, &y, "Vertical justify : %s", VertJust[ textinfo.vert ] ); + + Pause(); /* Pause for user to read screen*/ + +} + +/* */ +/* TEXTDUMP: Display the all the characters in each of the */ +/* available fonts. */ +/* */ + +void TextDump() +{ + static int CGASizes[] = { + 1, 3, 7, 3, 3, 2, 2, 2, 2, 2, 2 }; + static int NormSizes[] = { + 1, 4, 7, 4, 4, 2, 2, 2, 2, 2, 2 }; + + char buffer[80]; + int font, ch, wwidth, lwidth, size; + struct viewporttype vp; + + for( font=0 ; font wwidth ) + moveto( 2, gety() + textheight("H") + 3 ); + ++ch; /* Goto the next character */ + } + } + else{ + + size = (MaxY < 200) ? CGASizes[font] : NormSizes[font]; + changetextstyle( font, HORIZ_DIR, size ); + + ch = '!'; /* Begin at 1st printable */ + while( ch < 256 ){ /* For each printable character */ + buffer[0] = (char)ch; /* Put character into a string */ + outtext( buffer ); /* send string to screen */ + if( (lwidth+getx()) > wwidth ) /* Are we still in window? */ + moveto( 2, gety()+textheight("H")+3 ); + ++ch; /* Goto the next character */ + } + + } + + Pause(); /* Pause until user acks */ + + } /* End of FONT loop */ + +} + +/* */ +/* BAR3DDEMO: Display a 3-D bar chart on the screen. */ +/* */ + +void Bar3DDemo(void) +{ + static int barheight[] = { + 1, 3, 5, 4, 3, 2, 1, 5, 4, 2, 3 }; + struct viewporttype vp; + int xstep, ystep; + int i, j, h, color, bheight; + char buffer[10]; + + MainWindow( "Bar 3-D / Rectangle Demonstration" ); + + h = 3 * textheight( "H" ); + getviewsettings( &vp ); + settextjustify( CENTER_TEXT, TOP_TEXT ); + changetextstyle( TRIPLEX_FONT, HORIZ_DIR, 4 ); + outtextxy( MaxX/2, 6, "These are 3-D Bars" ); + changetextstyle( DEFAULT_FONT, HORIZ_DIR, 1 ); + setviewport( vp.left+50, vp.top+40, vp.right-50, vp.bottom-10, 1 ); + getviewsettings( &vp ); + + line( h, h, h, vp.bottom-vp.top-h ); + line( h, (vp.bottom-vp.top)-h, (vp.right-vp.left)-h, (vp.bottom-vp.top)-h ); + xstep = ((vp.right-vp.left) - (2*h)) / 10; + ystep = ((vp.bottom-vp.top) - (2*h)) / 5; + j = (vp.bottom-vp.top) - h; + settextjustify( CENTER_TEXT, CENTER_TEXT ); + + for( i=0 ; i<6 ; ++i ){ + line( h/2, j, h, j ); + itoa( i, buffer, 10 ); + outtextxy( 0, j, buffer ); + j -= ystep; + } + + j = h; + settextjustify( CENTER_TEXT, TOP_TEXT ); + + for( i=0 ; i<11 ; ++i ){ + color = random( MaxColors ); + setfillstyle( i+1, color ); + line( j, (vp.bottom-vp.top)-h, j, (vp.bottom-vp.top-3)-(h/2) ); + itoa( i, buffer, 10 ); + outtextxy( j, (vp.bottom-vp.top)-(h/2), buffer ); + if( i != 10 ){ + bheight = (vp.bottom-vp.top) - h - 1; + bar3d( j, (vp.bottom-vp.top-h)-(barheight[i]*ystep), j+xstep, bheight, 15, 1 ); + } + j += xstep; + } + + Pause(); /* Pause for user's response */ + +} + +/* */ +/* RANDOMBARS: Display random bars */ +/* */ + +void RandomBars(void) +{ + int color; + + MainWindow( "Random Bars" ); + StatusLine( "Esc aborts or press a key..." ); /* Put msg at bottom of screen */ + while( !kbhit() ){ /* Until user enters a key... */ + color = random( MaxColors-1 )+1; + setcolor( color ); + setfillstyle( random(11)+1, color ); + bar3d( random( getmaxx() ), random( getmaxy() ), + random( getmaxx() ), random( getmaxy() ), 0, OFF); + } + + Pause(); /* Pause for user's response */ + +} + + +/* */ +/* TEXTDEMO: Show each font in several sizes to the user. */ +/* */ + +void TextDemo(void) +{ + int charsize[] = { + 1, 3, 7, 3, 4, 2, 2, 2, 2, 2, 2 }; + int font, size; + int h, x, y, i; + struct viewporttype vp; + char buffer[80]; + + for( font=0 ; font vp.right) + x = vp.right-vp.left-width + 1; + else + if (x < 0) + x = 0; + if (vp.top + y + height - 1 > vp.bottom) + y = vp.bottom-vp.top-height + 1; + else + if (y < 0) + y = 0; + } + free( Saucer ); + Pause(); +} + + +/* */ +/* LINETODEMO: Display a pattern using moveto and lineto commands. */ +/* */ + +#define MAXPTS 15 + +void LineToDemo(void) +{ + struct viewporttype vp; + struct PTS points[MAXPTS]; + int i, j, h, w, xcenter, ycenter; + int radius, angle, step; + double rads; + + MainWindow( "MoveTo / LineTo Demonstration" ); + + getviewsettings( &vp ); + h = vp.bottom - vp.top; + w = vp.right - vp.left; + + xcenter = w / 2; /* Determine the center of circle */ + ycenter = h / 2; + radius = (h - 30) / (AspectRatio * 2); + step = 360 / MAXPTS; /* Determine # of increments */ + + angle = 0; /* Begin at zero degrees */ + for( i=0 ; i> i); /* Clear the Ith bit in word */ + + setlinestyle( USERBIT_LINE, style, NORM_WIDTH ); + line( x, y, x, h-y ); /* Draw the new line pattern */ + + x += 5; /* Move the X location of line */ + i = ++i % 16; /* Advance to next bit pattern */ + + if( style == 0xffff ){ /* Are all bits set? */ + flag = FALSE; /* begin removing bits */ + i = 0; /* Start with whole pattern */ + } + else{ /* Bits not all set... */ + if( style == 0 ) /* Are all bits clear? */ + flag = TRUE; /* begin setting bits */ + } + } + + settextjustify( LEFT_TEXT, TOP_TEXT ); + + Pause(); /* Wait for user's response */ + +} + +/* */ +/* FILLSTYLEDEMO: Display the standard fill patterns available. */ +/* */ + +void FillStyleDemo(void) +{ + int h, w, style; + int i, j, x, y; + struct viewporttype vp; + char buffer[40]; + + MainWindow( "Pre-defined Fill Styles" ); + + getviewsettings( &vp ); + w = 2 * ((vp.right + 1) / 13); + h = 2 * ((vp.bottom - 10) / 10); + + x = w / 2; + y = h / 2; /* Leave 1/2 blk margin */ + style = 0; + + for( j=0 ; j<3 ; ++j ){ /* Three rows of boxes */ + for( i=0 ; i<4 ; ++i ){ /* Four column of boxes */ + setfillstyle(style, MaxColors-1); /* Set the fill style and WHITE */ + bar( x, y, x+w, y+h ); /* Draw the actual box */ + rectangle( x, y, x+w, y+h ); /* Outline the box */ + itoa( style, buffer, 10 ); /* Convert style 3 to ASCII */ + outtextxy( x+(w / 2), y+h+4, buffer ); + ++style; /* Go on to next style # */ + x += (w / 2) * 3; /* Go to next column */ + } /* End of coulmn loop */ + x = w / 2; /* Put base back to 1st column */ + y += (h / 2) * 3; /* Advance to next row */ + } /* End of Row loop */ + + settextjustify( LEFT_TEXT, TOP_TEXT ); + + Pause(); /* Wait for user's response */ + +} + +/* */ +/* FILLPATTERNDEMO: Demonstrate how to use the user definable */ +/* fill patterns. */ +/* */ + +void FillPatternDemo(void) +{ + int style; + int h, w; + int x, y, i, j; + char buffer[40]; + struct viewporttype vp; + static char patterns[][8] = { + { 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55 }, + { 0x33, 0x33, 0xCC, 0xCC, 0x33, 0x33, 0xCC, 0xCC }, + { 0xF0, 0xF0, 0xF0, 0xF0, 0x0F, 0x0F, 0x0F, 0x0F }, + { 0x00, 0x10, 0x28, 0x44, 0x28, 0x10, 0x00, 0x00 }, + { 0x00, 0x70, 0x20, 0x27, 0x24, 0x24, 0x07, 0x00 }, + { 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00 }, + { 0x00, 0x00, 0x3C, 0x3C, 0x3C, 0x3C, 0x00, 0x00 }, + { 0x00, 0x7E, 0x7E, 0x7E, 0x7E, 0x7E, 0x7E, 0x00 }, + { 0x00, 0x00, 0x22, 0x08, 0x00, 0x22, 0x1C, 0x00 }, + { 0xFF, 0x7E, 0x3C, 0x18, 0x18, 0x3C, 0x7E, 0xFF }, + { 0x00, 0x10, 0x10, 0x7C, 0x10, 0x10, 0x00, 0x00 }, + { 0x00, 0x42, 0x24, 0x18, 0x18, 0x24, 0x42, 0x00 } + }; + + MainWindow( "User Defined Fill Styles" ); + + getviewsettings( &vp ); + w = 2 * ((vp.right + 1) / 13); + h = 2 * ((vp.bottom - 10) / 10); + + x = w / 2; + y = h / 2; /* Leave 1/2 blk margin */ + style = 0; + + for( j=0 ; j<3 ; ++j ){ /* Three rows of boxes */ + for( i=0 ; i<4 ; ++i ){ /* Four column of boxes */ + setfillpattern( &patterns[style][0], MaxColors-1 ); + bar( x, y, x+w, y+h ); /* Draw the actual box */ + rectangle( x, y, x+w, y+h ); /* Outline the box */ + itoa( style, buffer, 10 ); /* Convert style 3 to ASCII */ + outtextxy( x+(w / 2), y+h+4, buffer ); + ++style; /* Go on to next style # */ + x += (w / 2) * 3; /* Go to next column */ + } /* End of coulmn loop */ + x = w / 2; /* Put base back to 1st column */ + y += (h / 2) * 3; /* Advance to next row */ + } /* End of Row loop */ + + settextjustify( LEFT_TEXT, TOP_TEXT ); + + Pause(); /* Wait for user's response */ + +} + +/* */ +/* POLYDEMO: Display a random pattern of polygons on the screen */ +/* until the user says enough. */ +/* */ + +void PaletteDemo(void) +{ + int i, j, x, y, color; + struct viewporttype vp; + int height, width; + + MainWindow( "Palette Demonstration" ); + StatusLine( "Press any key to continue, ESC to Abort" ); + + getviewsettings( &vp ); + width = (vp.right - vp.left) / 15; /* get width of the box */ + height = (vp.bottom - vp.top) / 10; /* Get the height of the box */ + + x = y = 0; /* Start in upper corner */ + color = 1; /* Begin at 1st color */ + + for( j=0 ; j<10 ; ++j ){ /* For 10 rows of boxes */ + for( i=0 ; i<15 ; ++i ){ /* For 15 columns of boxes */ + setfillstyle( SOLID_FILL, color++ ); /* Set the color of box */ + bar( x, y, x+width, y+height ); /* Draw the box */ + x += width + 1; /* Advance to next col */ + color = 1 + (color % (MaxColors - 2)); /* Set new color */ + } /* End of COLUMN loop */ + x = 0; /* Goto 1st column */ + y += height + 1; /* Goto next row */ + } /* End of ROW loop */ + + while( !kbhit() ){ /* Until user enters a key... */ + setpalette( 1+random(MaxColors - 2), random( 65 ) ); + } + + setallpalette( &palette ); + + Pause(); /* Wait for user's response */ + +} + +/* */ +/* POLYDEMO: Display a random pattern of polygons on the screen */ +/* until the user says enough. */ +/* */ + +#define MaxPts 6 /* Maximum # of pts in polygon */ + +void PolyDemo(void) +{ + struct PTS poly[ MaxPts ]; /* Space to hold datapoints */ + int color; /* Current drawing color */ + int i; + + MainWindow( "DrawPoly / FillPoly Demonstration" ); + StatusLine( "ESC Aborts - Press a Key to stop" ); + + while( !kbhit() ){ /* Repeat until a key is hit */ + + color = 1 + random( MaxColors-1 ); /* Get a random color # (no blk)*/ + setfillstyle( random(10), color ); /* Set a random line style */ + setcolor( color ); /* Set the desired color */ + + for( i=0 ; i<(MaxPts-1) ; i++ ){ /* Determine a random polygon */ + poly[i].x = random( MaxX ); /* Set the x coord of point */ + poly[i].y = random( MaxY ); /* Set the y coord of point */ + } + + poly[i].x = poly[0].x; /* last point = first point */ + poly[i].y = poly[1].y; + + fillpoly( MaxPts, (int far *)poly ); /* Draw the actual polygon */ + } /* End of WHILE not KBHIT */ + + Pause(); /* Wait for user's response */ + +} + + +/* */ +/* SAYGOODBYE: Give a closing screen to the user before leaving. */ +/* */ + +void SayGoodbye(void) +{ + struct viewporttype viewinfo; /* Structure to read viewport */ + int h, w; + + MainWindow( "== Finale ==" ); + + getviewsettings( &viewinfo ); /* Read viewport settings */ + changetextstyle( TRIPLEX_FONT, HORIZ_DIR, 4 ); + settextjustify( CENTER_TEXT, CENTER_TEXT ); + + h = viewinfo.bottom - viewinfo.top; + w = viewinfo.right - viewinfo.left; + outtextxy( w/2, h/2, "That's all, folks!" ); + + StatusLine( "Press any key to EXIT" ); + getch(); + + cleardevice(); /* Clear the graphics screen */ + +} + +/* */ +/* PAUSE: Pause until the user enters a keystroke. If the */ +/* key is an ESC, then exit program, else simply return. */ +/* */ + +void Pause(void) +{ + static char msg[] = "Esc aborts or press a key..."; + int c; + + StatusLine( msg ); /* Put msg at bottom of screen */ + + c = getch(); /* Read a character from kbd */ + + if( ESC == c ){ /* Does user wish to leave? */ + closegraph(); /* Change to text mode */ + exit( 1 ); /* Return to OS */ + } + + if( 0 == c ){ /* Did use hit a non-ASCII key? */ + c = getch(); /* Read scan code for keyboard */ + } + + cleardevice(); /* Clear the screen */ + +} + +/* */ +/* MAINWINDOW: Establish the main window for the demo and set */ +/* a viewport for the demo code. */ +/* */ + +void MainWindow( char *header ) +{ + int height; + + cleardevice(); /* Clear graphics screen */ + setcolor( MaxColors - 1 ); /* Set current color to white */ + setviewport( 0, 0, MaxX, MaxY, 1 ); /* Open port to full screen */ + + height = textheight( "H" ); /* Get basic text height */ + + changetextstyle( DEFAULT_FONT, HORIZ_DIR, 1 ); + settextjustify( CENTER_TEXT, TOP_TEXT ); + outtextxy( MaxX/2, 2, header ); + setviewport( 0, height+4, MaxX, MaxY-(height+4), 1 ); + DrawBorder(); + setviewport( 1, height+5, MaxX-1, MaxY-(height+5), 1 ); + +} + +/* */ +/* STATUSLINE: Display a status line at the bottom of the screen. */ +/* */ + +void StatusLine( char *msg ) +{ + int height; + + setviewport( 0, 0, MaxX, MaxY, 1 ); /* Open port to full screen */ + setcolor( MaxColors - 1 ); /* Set current color to white */ + + changetextstyle( DEFAULT_FONT, HORIZ_DIR, 1 ); + settextjustify( CENTER_TEXT, TOP_TEXT ); + setlinestyle( SOLID_LINE, 0, NORM_WIDTH ); + setfillstyle( EMPTY_FILL, 0 ); + + height = textheight( "H" ); /* Detemine current height */ + bar( 0, MaxY-(height+4), MaxX, MaxY ); + rectangle( 0, MaxY-(height+4), MaxX, MaxY ); + outtextxy( MaxX/2, MaxY-(height+2), msg ); + setviewport( 1, height+5, MaxX-1, MaxY-(height+5), 1 ); + +} + +/* */ +/* DRAWBORDER: Draw a solid single line around the current */ +/* viewport. */ +/* */ + +void DrawBorder(void) +{ + struct viewporttype vp; + + setcolor( MaxColors - 1 ); /* Set current color to white */ + + setlinestyle( SOLID_LINE, 0, NORM_WIDTH ); + + getviewsettings( &vp ); + rectangle( 0, 0, vp.right-vp.left, vp.bottom-vp.top ); + +} + +/* */ +/* CHANGETEXTSTYLE: similar to settextstyle, but checks for */ +/* errors that might occur whil loading the font file. */ +/* */ + +void changetextstyle(int font, int direction, int charsize) +{ + int ErrorCode; + + graphresult(); /* clear error code */ + settextstyle(font, direction, charsize); + ErrorCode = graphresult(); /* check result */ + if( ErrorCode != grOk ){ /* if error occured */ + closegraph(); + printf(" Graphics System Error: %s\n", grapherrormsg( ErrorCode ) ); + exit( 1 ); + } +} + +/* */ +/* GPRINTF: Used like PRINTF except the output is sent to the */ +/* screen in graphics mode at the specified co-ordinate. */ +/* */ + +int gprintf( int *xloc, int *yloc, char *fmt, ... ) +{ + va_list argptr; /* Argument list pointer */ + char str[140]; /* Buffer to build sting into */ + int cnt; /* Result of SPRINTF for return */ + + va_start( argptr, fmt ); /* Initialize va_ functions */ + + cnt = vsprintf( str, fmt, argptr ); /* prints string to buffer */ + outtextxy( *xloc, *yloc, str ); /* Send string in graphics mode */ + *yloc += textheight( "H" ) + 2; /* Advance to next line */ + + va_end( argptr ); /* Close va_ functions */ + + return( cnt ); /* Return the conversion count */ + +} diff --git a/BORLAND/BC45/BGI/BGIDEMO.IDE b/BORLAND/BC45/BGI/BGIDEMO.IDE new file mode 100644 index 00000000..c4af0fc6 Binary files /dev/null and b/BORLAND/BC45/BGI/BGIDEMO.IDE differ diff --git a/BORLAND/BC45/BGI/BGIOBJ.EXE b/BORLAND/BC45/BGI/BGIOBJ.EXE new file mode 100644 index 00000000..da77ec83 Binary files /dev/null and b/BORLAND/BC45/BGI/BGIOBJ.EXE differ diff --git a/BORLAND/BC45/BGI/BOLD.CHR b/BORLAND/BC45/BGI/BOLD.CHR new file mode 100644 index 00000000..8af2bc28 Binary files /dev/null and b/BORLAND/BC45/BGI/BOLD.CHR differ diff --git a/BORLAND/BC45/BGI/CGA.BGI b/BORLAND/BC45/BGI/CGA.BGI new file mode 100644 index 00000000..143c73bf Binary files /dev/null and b/BORLAND/BC45/BGI/CGA.BGI differ diff --git a/BORLAND/BC45/BGI/EGAVGA.BGI b/BORLAND/BC45/BGI/EGAVGA.BGI new file mode 100644 index 00000000..80016316 Binary files /dev/null and b/BORLAND/BC45/BGI/EGAVGA.BGI differ diff --git a/BORLAND/BC45/BGI/EURO.CHR b/BORLAND/BC45/BGI/EURO.CHR new file mode 100644 index 00000000..bb1f9ec5 Binary files /dev/null and b/BORLAND/BC45/BGI/EURO.CHR differ diff --git a/BORLAND/BC45/BGI/GOTH.CHR b/BORLAND/BC45/BGI/GOTH.CHR new file mode 100644 index 00000000..75f9a7ed Binary files /dev/null and b/BORLAND/BC45/BGI/GOTH.CHR differ diff --git a/BORLAND/BC45/BGI/HERC.BGI b/BORLAND/BC45/BGI/HERC.BGI new file mode 100644 index 00000000..c11db640 Binary files /dev/null and b/BORLAND/BC45/BGI/HERC.BGI differ diff --git a/BORLAND/BC45/BGI/IBM8514.BGI b/BORLAND/BC45/BGI/IBM8514.BGI new file mode 100644 index 00000000..5e0933e5 Binary files /dev/null and b/BORLAND/BC45/BGI/IBM8514.BGI differ diff --git a/BORLAND/BC45/BGI/LCOM.CHR b/BORLAND/BC45/BGI/LCOM.CHR new file mode 100644 index 00000000..09167630 Binary files /dev/null and b/BORLAND/BC45/BGI/LCOM.CHR differ diff --git a/BORLAND/BC45/BGI/LITT.CHR b/BORLAND/BC45/BGI/LITT.CHR new file mode 100644 index 00000000..08c30672 Binary files /dev/null and b/BORLAND/BC45/BGI/LITT.CHR differ diff --git a/BORLAND/BC45/BGI/PC3270.BGI b/BORLAND/BC45/BGI/PC3270.BGI new file mode 100644 index 00000000..faf87d8a Binary files /dev/null and b/BORLAND/BC45/BGI/PC3270.BGI differ diff --git a/BORLAND/BC45/BGI/SANS.CHR b/BORLAND/BC45/BGI/SANS.CHR new file mode 100644 index 00000000..c38bc694 Binary files /dev/null and b/BORLAND/BC45/BGI/SANS.CHR differ diff --git a/BORLAND/BC45/BGI/SCRI.CHR b/BORLAND/BC45/BGI/SCRI.CHR new file mode 100644 index 00000000..92fb8a92 Binary files /dev/null and b/BORLAND/BC45/BGI/SCRI.CHR differ diff --git a/BORLAND/BC45/BGI/SIMP.CHR b/BORLAND/BC45/BGI/SIMP.CHR new file mode 100644 index 00000000..00ee8d7c Binary files /dev/null and b/BORLAND/BC45/BGI/SIMP.CHR differ diff --git a/BORLAND/BC45/BGI/TRIP.CHR b/BORLAND/BC45/BGI/TRIP.CHR new file mode 100644 index 00000000..d1f79f8d Binary files /dev/null and b/BORLAND/BC45/BGI/TRIP.CHR differ diff --git a/BORLAND/BC45/BGI/TSCR.CHR b/BORLAND/BC45/BGI/TSCR.CHR new file mode 100644 index 00000000..31900c96 Binary files /dev/null and b/BORLAND/BC45/BGI/TSCR.CHR differ diff --git a/BORLAND/BC45/BIN/32RTM.EXE b/BORLAND/BC45/BIN/32RTM.EXE new file mode 100644 index 00000000..33326133 Binary files /dev/null and b/BORLAND/BC45/BIN/32RTM.EXE differ diff --git a/BORLAND/BC45/BIN/AUTOGEN.EXE b/BORLAND/BC45/BIN/AUTOGEN.EXE new file mode 100644 index 00000000..3bde9854 Binary files /dev/null and b/BORLAND/BC45/BIN/AUTOGEN.EXE differ diff --git a/BORLAND/BC45/BIN/B32TOOLS.PIF b/BORLAND/BC45/BIN/B32TOOLS.PIF new file mode 100644 index 00000000..8e36813d Binary files /dev/null and b/BORLAND/BC45/BIN/B32TOOLS.PIF differ diff --git a/BORLAND/BC45/BIN/BC450RTL.DLL b/BORLAND/BC45/BIN/BC450RTL.DLL new file mode 100644 index 00000000..fa7b639e Binary files /dev/null and b/BORLAND/BC45/BIN/BC450RTL.DLL differ diff --git a/BORLAND/BC45/BIN/BC45BOOK.DLL b/BORLAND/BC45/BIN/BC45BOOK.DLL new file mode 100644 index 00000000..1076304c Binary files /dev/null and b/BORLAND/BC45/BIN/BC45BOOK.DLL differ diff --git a/BORLAND/BC45/BIN/BCC.EXE b/BORLAND/BC45/BIN/BCC.EXE new file mode 100644 index 00000000..953c8ff3 Binary files /dev/null and b/BORLAND/BC45/BIN/BCC.EXE differ diff --git a/BORLAND/BC45/BIN/BCC32.CFG b/BORLAND/BC45/BIN/BCC32.CFG new file mode 100644 index 00000000..693408f1 --- /dev/null +++ b/BORLAND/BC45/BIN/BCC32.CFG @@ -0,0 +1,2 @@ +-ID:\BC45\INCLUDE +-LD:\BC45\LIB diff --git a/BORLAND/BC45/BIN/BCC32.EXE b/BORLAND/BC45/BIN/BCC32.EXE new file mode 100644 index 00000000..5407e22f Binary files /dev/null and b/BORLAND/BC45/BIN/BCC32.EXE differ diff --git a/BORLAND/BC45/BIN/BCC32A.EXE b/BORLAND/BC45/BIN/BCC32A.EXE new file mode 100644 index 00000000..f7599012 Binary files /dev/null and b/BORLAND/BC45/BIN/BCC32A.EXE differ diff --git a/BORLAND/BC45/BIN/BCROOT.INC b/BORLAND/BC45/BIN/BCROOT.INC new file mode 100644 index 00000000..625575ae --- /dev/null +++ b/BORLAND/BC45/BIN/BCROOT.INC @@ -0,0 +1 @@ +BCROOT=D:\BC45 diff --git a/BORLAND/BC45/BIN/BCW.EXE b/BORLAND/BC45/BIN/BCW.EXE new file mode 100644 index 00000000..7ba97d9d Binary files /dev/null and b/BORLAND/BC45/BIN/BCW.EXE differ diff --git a/BORLAND/BC45/BIN/BCW.HLP b/BORLAND/BC45/BIN/BCW.HLP new file mode 100644 index 00000000..f697e2bd Binary files /dev/null and b/BORLAND/BC45/BIN/BCW.HLP differ diff --git a/BORLAND/BC45/BIN/BCW.HLX b/BORLAND/BC45/BIN/BCW.HLX new file mode 100644 index 00000000..90b5d6cc Binary files /dev/null and b/BORLAND/BC45/BIN/BCW.HLX differ diff --git a/BORLAND/BC45/BIN/BCWDBK16.DLL b/BORLAND/BC45/BIN/BCWDBK16.DLL new file mode 100644 index 00000000..f7172ed7 Binary files /dev/null and b/BORLAND/BC45/BIN/BCWDBK16.DLL differ diff --git a/BORLAND/BC45/BIN/BCWDBV16.DLL b/BORLAND/BC45/BIN/BCWDBV16.DLL new file mode 100644 index 00000000..a7a21e6d Binary files /dev/null and b/BORLAND/BC45/BIN/BCWDBV16.DLL differ diff --git a/BORLAND/BC45/BIN/BCWIMPRT.DLL b/BORLAND/BC45/BIN/BCWIMPRT.DLL new file mode 100644 index 00000000..aa08355a Binary files /dev/null and b/BORLAND/BC45/BIN/BCWIMPRT.DLL differ diff --git a/BORLAND/BC45/BIN/BCWOBJ.DLL b/BORLAND/BC45/BIN/BCWOBJ.DLL new file mode 100644 index 00000000..d3f8d534 Binary files /dev/null and b/BORLAND/BC45/BIN/BCWOBJ.DLL differ diff --git a/BORLAND/BC45/BIN/BCWPAGES.DLL b/BORLAND/BC45/BIN/BCWPAGES.DLL new file mode 100644 index 00000000..ec14e607 Binary files /dev/null and b/BORLAND/BC45/BIN/BCWPAGES.DLL differ diff --git a/BORLAND/BC45/BIN/BCWPRJ.DLL b/BORLAND/BC45/BIN/BCWPRJ.DLL new file mode 100644 index 00000000..f5f93110 Binary files /dev/null and b/BORLAND/BC45/BIN/BCWPRJ.DLL differ diff --git a/BORLAND/BC45/BIN/BCWRES.DLL b/BORLAND/BC45/BIN/BCWRES.DLL new file mode 100644 index 00000000..a6159532 Binary files /dev/null and b/BORLAND/BC45/BIN/BCWRES.DLL differ diff --git a/BORLAND/BC45/BIN/BCWS16.DLL b/BORLAND/BC45/BIN/BCWS16.DLL new file mode 100644 index 00000000..3ffc04cf Binary files /dev/null and b/BORLAND/BC45/BIN/BCWS16.DLL differ diff --git a/BORLAND/BC45/BIN/BCWS32.EXE b/BORLAND/BC45/BIN/BCWS32.EXE new file mode 100644 index 00000000..1acd2670 Binary files /dev/null and b/BORLAND/BC45/BIN/BCWS32.EXE differ diff --git a/BORLAND/BC45/BIN/BCWS32A.EXE b/BORLAND/BC45/BIN/BCWS32A.EXE new file mode 100644 index 00000000..4622a828 Binary files /dev/null and b/BORLAND/BC45/BIN/BCWS32A.EXE differ diff --git a/BORLAND/BC45/BIN/BCWTXCL.DLL b/BORLAND/BC45/BIN/BCWTXCL.DLL new file mode 100644 index 00000000..200b0d05 Binary files /dev/null and b/BORLAND/BC45/BIN/BCWTXCL.DLL differ diff --git a/BORLAND/BC45/BIN/BCWTXSRV.DLL b/BORLAND/BC45/BIN/BCWTXSRV.DLL new file mode 100644 index 00000000..d3828cce Binary files /dev/null and b/BORLAND/BC45/BIN/BCWTXSRV.DLL differ diff --git a/BORLAND/BC45/BIN/BDS45DF.DLL b/BORLAND/BC45/BIN/BDS45DF.DLL new file mode 100644 index 00000000..c7c83c9c Binary files /dev/null and b/BORLAND/BC45/BIN/BDS45DF.DLL differ diff --git a/BORLAND/BC45/BIN/BIDS45.DLL b/BORLAND/BC45/BIN/BIDS45.DLL new file mode 100644 index 00000000..89329576 Binary files /dev/null and b/BORLAND/BC45/BIN/BIDS45.DLL differ diff --git a/BORLAND/BC45/BIN/BIDS45D.DLL b/BORLAND/BC45/BIN/BIDS45D.DLL new file mode 100644 index 00000000..15cfbc85 Binary files /dev/null and b/BORLAND/BC45/BIN/BIDS45D.DLL differ diff --git a/BORLAND/BC45/BIN/BIDS45F.DLL b/BORLAND/BC45/BIN/BIDS45F.DLL new file mode 100644 index 00000000..5d8925c6 Binary files /dev/null and b/BORLAND/BC45/BIN/BIDS45F.DLL differ diff --git a/BORLAND/BC45/BIN/BORHELP.DLL b/BORLAND/BC45/BIN/BORHELP.DLL new file mode 100644 index 00000000..ad5c0322 Binary files /dev/null and b/BORLAND/BC45/BIN/BORHELP.DLL differ diff --git a/BORLAND/BC45/BIN/BORL2MSG.DLL b/BORLAND/BC45/BIN/BORL2MSG.DLL new file mode 100644 index 00000000..d9dee9c7 Binary files /dev/null and b/BORLAND/BC45/BIN/BORL2MSG.DLL differ diff --git a/BORLAND/BC45/BIN/BRC.EXE b/BORLAND/BC45/BIN/BRC.EXE new file mode 100644 index 00000000..180955fd Binary files /dev/null and b/BORLAND/BC45/BIN/BRC.EXE differ diff --git a/BORLAND/BC45/BIN/BRC32.EXE b/BORLAND/BC45/BIN/BRC32.EXE new file mode 100644 index 00000000..575c4f5f Binary files /dev/null and b/BORLAND/BC45/BIN/BRC32.EXE differ diff --git a/BORLAND/BC45/BIN/BRCC.EXE b/BORLAND/BC45/BIN/BRCC.EXE new file mode 100644 index 00000000..0014ad1b Binary files /dev/null and b/BORLAND/BC45/BIN/BRCC.EXE differ diff --git a/BORLAND/BC45/BIN/BRCC32.EXE b/BORLAND/BC45/BIN/BRCC32.EXE new file mode 100644 index 00000000..c9dac640 Binary files /dev/null and b/BORLAND/BC45/BIN/BRCC32.EXE differ diff --git a/BORLAND/BC45/BIN/BRCWIN.DLL b/BORLAND/BC45/BIN/BRCWIN.DLL new file mode 100644 index 00000000..d41112af Binary files /dev/null and b/BORLAND/BC45/BIN/BRCWIN.DLL differ diff --git a/BORLAND/BC45/BIN/BRIEF.CKB b/BORLAND/BC45/BIN/BRIEF.CKB new file mode 100644 index 00000000..da32c95c Binary files /dev/null and b/BORLAND/BC45/BIN/BRIEF.CKB differ diff --git a/BORLAND/BC45/BIN/BUILDSYM.EXE b/BORLAND/BC45/BIN/BUILDSYM.EXE new file mode 100644 index 00000000..9939dcc5 Binary files /dev/null and b/BORLAND/BC45/BIN/BUILDSYM.EXE differ diff --git a/BORLAND/BC45/BIN/BUILTINS.MAK b/BORLAND/BC45/BIN/BUILTINS.MAK new file mode 100644 index 00000000..01c7c598 --- /dev/null +++ b/BORLAND/BC45/BIN/BUILTINS.MAK @@ -0,0 +1,41 @@ + +# +# Borland C++ - (C) Copyright 1993 by Borland International +# + +# default is to target 16BIT +# pass -DWIN32 to make to target 32BIT + +!if !$d(WIN32) +CC = bcc +RC = brcc +AS = tasm +!else +CC = bcc32 +RC = brcc32 +AS = tasm32 +!endif + +.asm.obj: + $(AS) $(AFLAGS) $&.asm + +.c.exe: + $(CC) $(CFLAGS) $&.c + +.c.obj: + $(CC) $(CFLAGS) /c $&.c + +.cpp.exe: + $(CC) $(CFLAGS) $&.cpp + +.cpp.obj: + $(CC) $(CPPFLAGS) /c $&.cpp + +.rc.res: + $(RC) $(RFLAGS) /r $& + +.SUFFIXES: .exe .obj .asm .c .res .rc + +!if !$d(BCEXAMPLEDIR) +BCEXAMPLEDIR = $(MAKEDIR)\..\EXAMPLES +!endif diff --git a/BORLAND/BC45/BIN/BWCC.HLP b/BORLAND/BC45/BIN/BWCC.HLP new file mode 100644 index 00000000..4ed87560 Binary files /dev/null and b/BORLAND/BC45/BIN/BWCC.HLP differ diff --git a/BORLAND/BC45/BIN/BWCC.HLX b/BORLAND/BC45/BIN/BWCC.HLX new file mode 100644 index 00000000..ca1fab4c Binary files /dev/null and b/BORLAND/BC45/BIN/BWCC.HLX differ diff --git a/BORLAND/BC45/BIN/C.TOK b/BORLAND/BC45/BIN/C.TOK new file mode 100644 index 00000000..7872b2cb --- /dev/null +++ b/BORLAND/BC45/BIN/C.TOK @@ -0,0 +1,101 @@ +[Reserved Word] +__asm +__cdecl +__cs +__ds +__es +__except +__export +__far +__fastcall +__fastthis +__finally +__huge +__import +__interrupt +__loadds +__near +__pascal +__rtti +__saveregs +__seg +__slowthis +__ss +__try +_asm +_cdecl +_cs +_ds +_es +_export +_far +_fastcall +_huge +_import +_interrupt +_loadds +_near +_pascal +_saveregs +_seg +_ss +asm +auto +break +case +catch +cdecl +char +class +const +const_cast +continue +default +delete +do +double +dynamic_cast +else +enum +extern +far +float +for +friend +goto +huge +if +inline +int +interrupt +long +near +new +operator +pascal +private +protected +public +register +reinterpret_cast +return +short +signed +sizeof +static +static_cast +struct +switch +template +this +throw +try +typedef +typeid +union +unsigned +virtual +void +volatile +wchar_t +while diff --git a/BORLAND/BC45/BIN/C32.TOK b/BORLAND/BC45/BIN/C32.TOK new file mode 100644 index 00000000..6d399b17 --- /dev/null +++ b/BORLAND/BC45/BIN/C32.TOK @@ -0,0 +1,80 @@ +[Reserved Word] +__asm +__cdecl +__export +__far16 +__fastcall +__fortran +__import +__pascal +__rtti +__stdcall +_asm +_cdecl +__except +_export +_far16 +_fastcall +__finally +_fortran +_import +_pascal +_stdcall +__thread +__try +asm +auto +break +case +catch +cdecl +char +class +const +const_cast +continue +default +delete +do +double +dynamic_cast +else +enum +extern +float +for +friend +goto +if +inline +int +long +new +operator +pascal +private +protected +public +register +reinterpret_cast +return +short +signed +sizeof +static +static_cast +struct +switch +template +this +throw +try +typedef +typeid +union +unsigned +virtual +void +volatile +wchar_t +while diff --git a/BORLAND/BC45/BIN/CAPDOS.EXE b/BORLAND/BC45/BIN/CAPDOS.EXE new file mode 100644 index 00000000..d9e59cda Binary files /dev/null and b/BORLAND/BC45/BIN/CAPDOS.EXE differ diff --git a/BORLAND/BC45/BIN/CAPDOS.PIF b/BORLAND/BC45/BIN/CAPDOS.PIF new file mode 100644 index 00000000..ae8ba9a1 Binary files /dev/null and b/BORLAND/BC45/BIN/CAPDOS.PIF differ diff --git a/BORLAND/BC45/BIN/CLASSIC.CKB b/BORLAND/BC45/BIN/CLASSIC.CKB new file mode 100644 index 00000000..a3de541d Binary files /dev/null and b/BORLAND/BC45/BIN/CLASSIC.CKB differ diff --git a/BORLAND/BC45/BIN/CLASSLIB.HLP b/BORLAND/BC45/BIN/CLASSLIB.HLP new file mode 100644 index 00000000..1a95f594 Binary files /dev/null and b/BORLAND/BC45/BIN/CLASSLIB.HLP differ diff --git a/BORLAND/BC45/BIN/CLASSLIB.HLX b/BORLAND/BC45/BIN/CLASSLIB.HLX new file mode 100644 index 00000000..561f361a Binary files /dev/null and b/BORLAND/BC45/BIN/CLASSLIB.HLX differ diff --git a/BORLAND/BC45/BIN/CM.DLL b/BORLAND/BC45/BIN/CM.DLL new file mode 100644 index 00000000..64a9c7d1 Binary files /dev/null and b/BORLAND/BC45/BIN/CM.DLL differ diff --git a/BORLAND/BC45/BIN/CMCORE.DLL b/BORLAND/BC45/BIN/CMCORE.DLL new file mode 100644 index 00000000..41332cb8 Binary files /dev/null and b/BORLAND/BC45/BIN/CMCORE.DLL differ diff --git a/BORLAND/BC45/BIN/CODEGEN.DLL b/BORLAND/BC45/BIN/CODEGEN.DLL new file mode 100644 index 00000000..578d0b6b Binary files /dev/null and b/BORLAND/BC45/BIN/CODEGEN.DLL differ diff --git a/BORLAND/BC45/BIN/COMPRESS.EXE b/BORLAND/BC45/BIN/COMPRESS.EXE new file mode 100644 index 00000000..645fa0d1 Binary files /dev/null and b/BORLAND/BC45/BIN/COMPRESS.EXE differ diff --git a/BORLAND/BC45/BIN/CPP.EXE b/BORLAND/BC45/BIN/CPP.EXE new file mode 100644 index 00000000..0774541f Binary files /dev/null and b/BORLAND/BC45/BIN/CPP.EXE differ diff --git a/BORLAND/BC45/BIN/CPP32.EXE b/BORLAND/BC45/BIN/CPP32.EXE new file mode 100644 index 00000000..b1771c0d Binary files /dev/null and b/BORLAND/BC45/BIN/CPP32.EXE differ diff --git a/BORLAND/BC45/BIN/CTL3D.HLP b/BORLAND/BC45/BIN/CTL3D.HLP new file mode 100644 index 00000000..cbd7f559 Binary files /dev/null and b/BORLAND/BC45/BIN/CTL3D.HLP differ diff --git a/BORLAND/BC45/BIN/CW3215.DLL b/BORLAND/BC45/BIN/CW3215.DLL new file mode 100644 index 00000000..77bc5ecf Binary files /dev/null and b/BORLAND/BC45/BIN/CW3215.DLL differ diff --git a/BORLAND/BC45/BIN/CW3215MT.DLL b/BORLAND/BC45/BIN/CW3215MT.DLL new file mode 100644 index 00000000..5e92beb4 Binary files /dev/null and b/BORLAND/BC45/BIN/CW3215MT.DLL differ diff --git a/BORLAND/BC45/BIN/CWH.HLP b/BORLAND/BC45/BIN/CWH.HLP new file mode 100644 index 00000000..65a2750f Binary files /dev/null and b/BORLAND/BC45/BIN/CWH.HLP differ diff --git a/BORLAND/BC45/BIN/CWH.HLX b/BORLAND/BC45/BIN/CWH.HLX new file mode 100644 index 00000000..bb2f347a Binary files /dev/null and b/BORLAND/BC45/BIN/CWH.HLX differ diff --git a/BORLAND/BC45/BIN/DFA.EXE b/BORLAND/BC45/BIN/DFA.EXE new file mode 100644 index 00000000..ff33a162 Binary files /dev/null and b/BORLAND/BC45/BIN/DFA.EXE differ diff --git a/BORLAND/BC45/BIN/DIB.DRV b/BORLAND/BC45/BIN/DIB.DRV new file mode 100644 index 00000000..965cdcac Binary files /dev/null and b/BORLAND/BC45/BIN/DIB.DRV differ diff --git a/BORLAND/BC45/BIN/DLLRUN.EXE b/BORLAND/BC45/BIN/DLLRUN.EXE new file mode 100644 index 00000000..0186a9a6 Binary files /dev/null and b/BORLAND/BC45/BIN/DLLRUN.EXE differ diff --git a/BORLAND/BC45/BIN/DPMI16BI.OVL b/BORLAND/BC45/BIN/DPMI16BI.OVL new file mode 100644 index 00000000..52150cfa Binary files /dev/null and b/BORLAND/BC45/BIN/DPMI16BI.OVL differ diff --git a/BORLAND/BC45/BIN/DPMI32VM.OVL b/BORLAND/BC45/BIN/DPMI32VM.OVL new file mode 100644 index 00000000..3abff025 Binary files /dev/null and b/BORLAND/BC45/BIN/DPMI32VM.OVL differ diff --git a/BORLAND/BC45/BIN/DUAL8514.DLL b/BORLAND/BC45/BIN/DUAL8514.DLL new file mode 100644 index 00000000..732c1340 Binary files /dev/null and b/BORLAND/BC45/BIN/DUAL8514.DLL differ diff --git a/BORLAND/BC45/BIN/EPSILON.CKB b/BORLAND/BC45/BIN/EPSILON.CKB new file mode 100644 index 00000000..a1d1d1fa Binary files /dev/null and b/BORLAND/BC45/BIN/EPSILON.CKB differ diff --git a/BORLAND/BC45/BIN/EXEMAP.EXE b/BORLAND/BC45/BIN/EXEMAP.EXE new file mode 100644 index 00000000..3248f561 Binary files /dev/null and b/BORLAND/BC45/BIN/EXEMAP.EXE differ diff --git a/BORLAND/BC45/BIN/FCONVERT.EXE b/BORLAND/BC45/BIN/FCONVERT.EXE new file mode 100644 index 00000000..c74ae273 Binary files /dev/null and b/BORLAND/BC45/BIN/FCONVERT.EXE differ diff --git a/BORLAND/BC45/BIN/GREP.COM b/BORLAND/BC45/BIN/GREP.COM new file mode 100644 index 00000000..607d1b29 Binary files /dev/null and b/BORLAND/BC45/BIN/GREP.COM differ diff --git a/BORLAND/BC45/BIN/GREP2MSG.DLL b/BORLAND/BC45/BIN/GREP2MSG.DLL new file mode 100644 index 00000000..6d508d9a Binary files /dev/null and b/BORLAND/BC45/BIN/GREP2MSG.DLL differ diff --git a/BORLAND/BC45/BIN/GUIDGEN.EXE b/BORLAND/BC45/BIN/GUIDGEN.EXE new file mode 100644 index 00000000..8422e7aa Binary files /dev/null and b/BORLAND/BC45/BIN/GUIDGEN.EXE differ diff --git a/BORLAND/BC45/BIN/HC.BAT b/BORLAND/BC45/BIN/HC.BAT new file mode 100644 index 00000000..d6239abe --- /dev/null +++ b/BORLAND/BC45/BIN/HC.BAT @@ -0,0 +1,4 @@ +@echo off +if NOT "%1" == "-n" hc31 %1 %2 +if "%1" == "-n" hc31 %2 %3 +@echo on diff --git a/BORLAND/BC45/BIN/HC31.ERR b/BORLAND/BC45/BIN/HC31.ERR new file mode 100644 index 00000000..61ca16bb --- /dev/null +++ b/BORLAND/BC45/BIN/HC31.ERR @@ -0,0 +1,237 @@ +/*************************************** +* +* File problems +* +***************************************/ +1019 "Project file extension cannot be .HLP or .PH." +1030 "File name exceeds limit of 259 characters." +1079 "Out of file handles." + +1100 "Cannot open file '%s': permission denied." + +1150 "Cannot overwrite file '%s'." +1170 "File '%s' is a directory." + +1190 "Cannot use reserved MS-DOS file name '%s'." + +1230 "File '%s' not found." + +1292 "File '%s' is not a valid bitmap." + +1319 "Disk full." + +1513 "Bitmap name '%s' duplicated." + +1536 "Not enough memory to compress bitmap '%s'." + +1000 "UNKNOWN ERROR\n\t\tContact Microsoft Product Support Services" + + +/*************************************** +* +* General HPJ problems +* +***************************************/ +2010 "Include statements nested more than 5 deep." + +/* Syntax */ +2030 "Comment starting at line %d of file '%s' unclosed at end of file." +2050 "Invalid #include syntax." +2091 "Bracket missing from section heading [%s]." +2111 "Section heading missing." +2131 "Invalid OPTIONS syntax: 'option=value' expected." +2141 "Invalid ALIAS syntax: 'context=context' expected." +2151 "Incomplete line in [%s] section." +2171 "Unrecognized text." +2191 "Section heading [%s] unrecognized." +2214 "Line in .HPJ file exceeds length limit of 2047 characters." + +/* general section problems */ +2273 "[OPTIONS] should precede [FILES] and [BITMAPS] for all options to take effect." +2291 "Section [%s] previously defined." +2305 "No valid files in [FILES] section." + +/* Alias/Map problems */ +2322 "Context string '%s' cannot be used as alias string." +2331 "Context number already used in [MAP] section." +2341 "Invalid or missing context string." +2351 "Invalid context identification number." +2362 "Context string '%s' already assigned an alias." +2372 "Alias string '%s' already assigned." + +/* Window section problems */ + +2391 "Limit of 6 window definitions exceeded." +2401 "Window maximization state must be 0 or 1." +2411 "Invalid syntax in window color." +2421 "Invalid window position." +2431 "Missing quote in window caption." +2441 "Window name '%s' is too long." +2451 "Window position value out of range 0..1023." +2461 "Window name missing." +2471 "Invalid syntax in [WINDOWS] section." +2481 "Secondary window position required." +2491 "Duplicate window name '%s'." +2501 "Window caption '%s' exceeds limit of 50 characters." + +/*************************************** +* +* OPTIONS section problems +* +***************************************/ +2511 "Unrecognized option '%s' in [OPTIONS] section." +2532 "Option '%s' previously defined." + +/* root */ +2550 "Invalid path '%s' in %s option." +2570 "Path in %s option exceeds %d characters." + +/* Font range */ +2591 "Invalid MAPFONTSIZE option." +2612 "Maximum of 5 font ranges exceeded." +2632 "Current font range overlaps previously defined range." + +/* Force font */ +2651 "Font name exceeds limit of 20 characters." +2672 "Unrecognized font name '%s' in FORCEFONT option." + +/* Multikey */ +2691 "Invalid MULTIKEY option." +2711 "Maximum of 5 keyword tables exceeded." +2732 "Character already used." +2752 "Characters 'K' and 'k' cannot be used." + +/* other */ +2771 "REPORT option must be 'ON' or 'OFF'." + +2811 "OLDKEYPHRASE option must be 'ON' or 'OFF'." +2832 "COMPRESS option must be 'OFF', 'MEDIUM', or 'HIGH'." +2842 "OPTCDROM option must be 'TRUE' or 'FALSE'." +2852 "Invalid TITLE option." +2872 "Invalid LANGUAGE option." +2893 "WARNING option must be 1, 2, or 3." +2911 "Invalid icon file '%s'." +2932 "Copyright string exceeds limit of 50 characters." + + +2000 "UNKNOWN ERROR\n\t\tContact Microsoft Product Support Services" + +/*************************************** +* +* Build tag/expression problems +* +***************************************/ +3011 "Maximum of 32 build tags exceeded." +3031 "Build tag length exceeds 32 characters." +3051 "Build tag '%s' contains invalid characters." +3076 "[BUILDTAGS] section missing." +3096 "Build expression too complex." +3116 "Invalid build expression." +3133 "Duplicate build tag in [BUILDTAGS] section." + +3152 "Build tag '%s' not defined in [BUILDTAGS] section." +3178 "Build expression missing from project file." + + +/*************************************** +* +* Macro errors +* +***************************************/ + +3511 "Macro '%s' exceeds limit of 254 characters." +3532 "Undefined function in macro '%s'." +3552 "Undefined variable in macro '%s'." +3571 "Wrong number of parameters to function in macro '%s'." +3591 "Syntax error in macro '%s'." +3611 "Function parameter type mismatch in macro '%s'." +3631 "Bad macro prototype." +3652 "Empty macro string." +3672 "Macro '%s' nested too deeply." + +3000 "UNKNOWN ERROR\n\t\tContact Microsoft Product Support Services" + + +/*************************************** +* +* Context string problems +* +***************************************/ +4011 "Context string '%s' already used." +4031 "Invalid context string '%s'." +4056 "Unresolved context string specified in CONTENTS option." +4072 "Context string exceeds limit of 255 characters." +4098 "Context string(s) in [MAP] section not defined in any topic." +4113 "Unresolved jump or popup '%s'." +4131 "Hash conflict between '%s' and '%s'." +4151 "Invalid secondary window name '%s'." +4171 "Cannot use secondary window with popup." +4196 "Jumps and lookups not verified." + +/*************************************** +* +* Footnote problems +* +***************************************/ +4211 "Footnote text exceeds limit of 1023 characters." + +/* browse */ +4251 "Browse sequence not in first paragraph." +4272 "Empty browse sequence string." +4292 "Missing sequence number." +4312 "Browse sequence already defined." + +/* title */ +4331 "Title not in first paragraph." +4352 "Empty title string." +4372 "Title defined more than once." +4393 "Title exceeds limit of 128 characters." + +/* keyword */ +4412 "Keyword string exceeds limit of 255 characters." +4433 "Empty keyword string." +4452 "Keyword(s) defined without title." + +/* build */ +4471 "Build tag footnote not at beginning of topic." +4492 "Build tag exceeds limit of 32 characters." + +/* entry macro */ +4551 "Entry macro not in first paragraph." + + +/*************************************** +* +* RTF problems +* +***************************************/ +4616 "File '%s' is not a valid RTF topic file." +4639 "Error in file '%s' at byte offset 0x%lX." +4649 "File '%s' contains more than 32767 topics." +4652 "Table formatting too complex." +4662 "Side by side paragraphs not supported." +4671 "Table contains more than 32 columns." +4680 "Font %d in file '%s' not in RTF font table." +4692 "Unrecognized graphic format." +4733 "Hidden page break." +4753 "Hidden paragraph." +4763 "Hidden carriage return." +4774 "Paragraph exceeds limit of 64K." +4792 "Non-scrolling region defined after scrolling region." +4813 "Non-scrolling region crosses page boundary." + +4000 "UNKNOWN ERROR\n\t\tContact Microsoft Product Support Services" + +/*************************************** +* +* Miscellaneous +* +***************************************/ +5035 "File '%s' not created." +5059 "Not enough memory to build help file." +5075 "Help Compiler corrupted. Please reinstall HC.EXE." +5098 "Using old key-phrase table." +5115 "Write failed." +5139 "Aborted by user." + +5000 "UNKNOWN ERROR\n\t\tContact Microsoft Product Support Services" diff --git a/BORLAND/BC45/BIN/HC31.EXE b/BORLAND/BC45/BIN/HC31.EXE new file mode 100644 index 00000000..c77ef7b6 Binary files /dev/null and b/BORLAND/BC45/BIN/HC31.EXE differ diff --git a/BORLAND/BC45/BIN/HC312MSG.DLL b/BORLAND/BC45/BIN/HC312MSG.DLL new file mode 100644 index 00000000..21eaeb8b Binary files /dev/null and b/BORLAND/BC45/BIN/HC312MSG.DLL differ diff --git a/BORLAND/BC45/BIN/HELP.ICO b/BORLAND/BC45/BIN/HELP.ICO new file mode 100644 index 00000000..ba1ae7de Binary files /dev/null and b/BORLAND/BC45/BIN/HELP.ICO differ diff --git a/BORLAND/BC45/BIN/HELPCFG.HLP b/BORLAND/BC45/BIN/HELPCFG.HLP new file mode 100644 index 00000000..6d377367 Binary files /dev/null and b/BORLAND/BC45/BIN/HELPCFG.HLP differ diff --git a/BORLAND/BC45/BIN/HELPEX.HLP b/BORLAND/BC45/BIN/HELPEX.HLP new file mode 100644 index 00000000..259e7e17 Binary files /dev/null and b/BORLAND/BC45/BIN/HELPEX.HLP differ diff --git a/BORLAND/BC45/BIN/HELPREF.HLP b/BORLAND/BC45/BIN/HELPREF.HLP new file mode 100644 index 00000000..7faf655d Binary files /dev/null and b/BORLAND/BC45/BIN/HELPREF.HLP differ diff --git a/BORLAND/BC45/BIN/HELPREF.HLX b/BORLAND/BC45/BIN/HELPREF.HLX new file mode 100644 index 00000000..819eaba0 Binary files /dev/null and b/BORLAND/BC45/BIN/HELPREF.HLX differ diff --git a/BORLAND/BC45/BIN/HELPXDLL.DLL b/BORLAND/BC45/BIN/HELPXDLL.DLL new file mode 100644 index 00000000..624cc324 Binary files /dev/null and b/BORLAND/BC45/BIN/HELPXDLL.DLL differ diff --git a/BORLAND/BC45/BIN/IDEBID.DLL b/BORLAND/BC45/BIN/IDEBID.DLL new file mode 100644 index 00000000..84a30e5d Binary files /dev/null and b/BORLAND/BC45/BIN/IDEBID.DLL differ diff --git a/BORLAND/BC45/BIN/IDECRTL.DLL b/BORLAND/BC45/BIN/IDECRTL.DLL new file mode 100644 index 00000000..a518af4a Binary files /dev/null and b/BORLAND/BC45/BIN/IDECRTL.DLL differ diff --git a/BORLAND/BC45/BIN/IDEEDIT.DLL b/BORLAND/BC45/BIN/IDEEDIT.DLL new file mode 100644 index 00000000..f729549b Binary files /dev/null and b/BORLAND/BC45/BIN/IDEEDIT.DLL differ diff --git a/BORLAND/BC45/BIN/IDEKBD.DLL b/BORLAND/BC45/BIN/IDEKBD.DLL new file mode 100644 index 00000000..df744c37 Binary files /dev/null and b/BORLAND/BC45/BIN/IDEKBD.DLL differ diff --git a/BORLAND/BC45/BIN/IDEOWL.DLL b/BORLAND/BC45/BIN/IDEOWL.DLL new file mode 100644 index 00000000..9e105f53 Binary files /dev/null and b/BORLAND/BC45/BIN/IDEOWL.DLL differ diff --git a/BORLAND/BC45/BIN/IDEPANE.DLL b/BORLAND/BC45/BIN/IDEPANE.DLL new file mode 100644 index 00000000..6bf00b51 Binary files /dev/null and b/BORLAND/BC45/BIN/IDEPANE.DLL differ diff --git a/BORLAND/BC45/BIN/IDEWIN.DLL b/BORLAND/BC45/BIN/IDEWIN.DLL new file mode 100644 index 00000000..2545be20 Binary files /dev/null and b/BORLAND/BC45/BIN/IDEWIN.DLL differ diff --git a/BORLAND/BC45/BIN/IMPDEF.EXE b/BORLAND/BC45/BIN/IMPDEF.EXE new file mode 100644 index 00000000..0c9d2dbd Binary files /dev/null and b/BORLAND/BC45/BIN/IMPDEF.EXE differ diff --git a/BORLAND/BC45/BIN/IMPL2MSG.DLL b/BORLAND/BC45/BIN/IMPL2MSG.DLL new file mode 100644 index 00000000..83539e7a Binary files /dev/null and b/BORLAND/BC45/BIN/IMPL2MSG.DLL differ diff --git a/BORLAND/BC45/BIN/IMPLIB.DLL b/BORLAND/BC45/BIN/IMPLIB.DLL new file mode 100644 index 00000000..9ced6721 Binary files /dev/null and b/BORLAND/BC45/BIN/IMPLIB.DLL differ diff --git a/BORLAND/BC45/BIN/IMPLIB.EXE b/BORLAND/BC45/BIN/IMPLIB.EXE new file mode 100644 index 00000000..3e93205d Binary files /dev/null and b/BORLAND/BC45/BIN/IMPLIB.EXE differ diff --git a/BORLAND/BC45/BIN/INTERNAL.CKB b/BORLAND/BC45/BIN/INTERNAL.CKB new file mode 100644 index 00000000..402d6a10 Binary files /dev/null and b/BORLAND/BC45/BIN/INTERNAL.CKB differ diff --git a/BORLAND/BC45/BIN/JITIME.EXE b/BORLAND/BC45/BIN/JITIME.EXE new file mode 100644 index 00000000..909b329c Binary files /dev/null and b/BORLAND/BC45/BIN/JITIME.EXE differ diff --git a/BORLAND/BC45/BIN/KEYMAPR.EXE b/BORLAND/BC45/BIN/KEYMAPR.EXE new file mode 100644 index 00000000..26908b6b Binary files /dev/null and b/BORLAND/BC45/BIN/KEYMAPR.EXE differ diff --git a/BORLAND/BC45/BIN/LOADBWCC.EXE b/BORLAND/BC45/BIN/LOADBWCC.EXE new file mode 100644 index 00000000..3724d606 Binary files /dev/null and b/BORLAND/BC45/BIN/LOADBWCC.EXE differ diff --git a/BORLAND/BC45/BIN/LOCALE.BLL b/BORLAND/BC45/BIN/LOCALE.BLL new file mode 100644 index 00000000..4205dd0d Binary files /dev/null and b/BORLAND/BC45/BIN/LOCALE.BLL differ diff --git a/BORLAND/BC45/BIN/MACROGEN.EXE b/BORLAND/BC45/BIN/MACROGEN.EXE new file mode 100644 index 00000000..5e2df591 Binary files /dev/null and b/BORLAND/BC45/BIN/MACROGEN.EXE differ diff --git a/BORLAND/BC45/BIN/MAKE.EXE b/BORLAND/BC45/BIN/MAKE.EXE new file mode 100644 index 00000000..281a2ddc Binary files /dev/null and b/BORLAND/BC45/BIN/MAKE.EXE differ diff --git a/BORLAND/BC45/BIN/MAKER.EXE b/BORLAND/BC45/BIN/MAKER.EXE new file mode 100644 index 00000000..58e166dd Binary files /dev/null and b/BORLAND/BC45/BIN/MAKER.EXE differ diff --git a/BORLAND/BC45/BIN/MAKESWAP.EXE b/BORLAND/BC45/BIN/MAKESWAP.EXE new file mode 100644 index 00000000..a3ef4c54 Binary files /dev/null and b/BORLAND/BC45/BIN/MAKESWAP.EXE differ diff --git a/BORLAND/BC45/BIN/MARKMIDI.EXE b/BORLAND/BC45/BIN/MARKMIDI.EXE new file mode 100644 index 00000000..2a6e4e7c Binary files /dev/null and b/BORLAND/BC45/BIN/MARKMIDI.EXE differ diff --git a/BORLAND/BC45/BIN/MARS.DLL b/BORLAND/BC45/BIN/MARS.DLL new file mode 100644 index 00000000..7547695b Binary files /dev/null and b/BORLAND/BC45/BIN/MARS.DLL differ diff --git a/BORLAND/BC45/BIN/MARS.MOB b/BORLAND/BC45/BIN/MARS.MOB new file mode 100644 index 00000000..b1db4bdd Binary files /dev/null and b/BORLAND/BC45/BIN/MARS.MOB differ diff --git a/BORLAND/BC45/BIN/MC.EXE b/BORLAND/BC45/BIN/MC.EXE new file mode 100644 index 00000000..8d3192da Binary files /dev/null and b/BORLAND/BC45/BIN/MC.EXE differ diff --git a/BORLAND/BC45/BIN/MC.HLP b/BORLAND/BC45/BIN/MC.HLP new file mode 100644 index 00000000..9335832a Binary files /dev/null and b/BORLAND/BC45/BIN/MC.HLP differ diff --git a/BORLAND/BC45/BIN/MCISTRWH.HLP b/BORLAND/BC45/BIN/MCISTRWH.HLP new file mode 100644 index 00000000..10fe71c0 Binary files /dev/null and b/BORLAND/BC45/BIN/MCISTRWH.HLP differ diff --git a/BORLAND/BC45/BIN/MIDL.EXE b/BORLAND/BC45/BIN/MIDL.EXE new file mode 100644 index 00000000..f997fef7 Binary files /dev/null and b/BORLAND/BC45/BIN/MIDL.EXE differ diff --git a/BORLAND/BC45/BIN/MRBC.EXE b/BORLAND/BC45/BIN/MRBC.EXE new file mode 100644 index 00000000..2eeda05a Binary files /dev/null and b/BORLAND/BC45/BIN/MRBC.EXE differ diff --git a/BORLAND/BC45/BIN/MSMOUSE.DRV b/BORLAND/BC45/BIN/MSMOUSE.DRV new file mode 100644 index 00000000..05003ab2 Binary files /dev/null and b/BORLAND/BC45/BIN/MSMOUSE.DRV differ diff --git a/BORLAND/BC45/BIN/OBJXREF.EXE b/BORLAND/BC45/BIN/OBJXREF.EXE new file mode 100644 index 00000000..0629e9c8 Binary files /dev/null and b/BORLAND/BC45/BIN/OBJXREF.EXE differ diff --git a/BORLAND/BC45/BIN/OCF.HLP b/BORLAND/BC45/BIN/OCF.HLP new file mode 100644 index 00000000..8f64a376 Binary files /dev/null and b/BORLAND/BC45/BIN/OCF.HLP differ diff --git a/BORLAND/BC45/BIN/OCF.HLX b/BORLAND/BC45/BIN/OCF.HLX new file mode 100644 index 00000000..c8d79a14 Binary files /dev/null and b/BORLAND/BC45/BIN/OCF.HLX differ diff --git a/BORLAND/BC45/BIN/OHELPCFG.EXE b/BORLAND/BC45/BIN/OHELPCFG.EXE new file mode 100644 index 00000000..035a26b7 Binary files /dev/null and b/BORLAND/BC45/BIN/OHELPCFG.EXE differ diff --git a/BORLAND/BC45/BIN/OLE.HLP b/BORLAND/BC45/BIN/OLE.HLP new file mode 100644 index 00000000..dfbe2119 Binary files /dev/null and b/BORLAND/BC45/BIN/OLE.HLP differ diff --git a/BORLAND/BC45/BIN/OLE.HLX b/BORLAND/BC45/BIN/OLE.HLX new file mode 100644 index 00000000..23aa7697 Binary files /dev/null and b/BORLAND/BC45/BIN/OLE.HLX differ diff --git a/BORLAND/BC45/BIN/OLE_ERR.DLL b/BORLAND/BC45/BIN/OLE_ERR.DLL new file mode 100644 index 00000000..c5a973d7 Binary files /dev/null and b/BORLAND/BC45/BIN/OLE_ERR.DLL differ diff --git a/BORLAND/BC45/BIN/OLE_ERRF.DLL b/BORLAND/BC45/BIN/OLE_ERRF.DLL new file mode 100644 index 00000000..63bf25c5 Binary files /dev/null and b/BORLAND/BC45/BIN/OLE_ERRF.DLL differ diff --git a/BORLAND/BC45/BIN/OPENGL.HLP b/BORLAND/BC45/BIN/OPENGL.HLP new file mode 100644 index 00000000..58cee144 Binary files /dev/null and b/BORLAND/BC45/BIN/OPENGL.HLP differ diff --git a/BORLAND/BC45/BIN/OPENGL.HLX b/BORLAND/BC45/BIN/OPENGL.HLX new file mode 100644 index 00000000..d37ffe6f Binary files /dev/null and b/BORLAND/BC45/BIN/OPENGL.HLX differ diff --git a/BORLAND/BC45/BIN/OPENHELP.EXE b/BORLAND/BC45/BIN/OPENHELP.EXE new file mode 100644 index 00000000..0621f057 Binary files /dev/null and b/BORLAND/BC45/BIN/OPENHELP.EXE differ diff --git a/BORLAND/BC45/BIN/OPENHELP.HLP b/BORLAND/BC45/BIN/OPENHELP.HLP new file mode 100644 index 00000000..2edb820a Binary files /dev/null and b/BORLAND/BC45/BIN/OPENHELP.HLP differ diff --git a/BORLAND/BC45/BIN/OPENHELP.HLX b/BORLAND/BC45/BIN/OPENHELP.HLX new file mode 100644 index 00000000..4de34c95 Binary files /dev/null and b/BORLAND/BC45/BIN/OPENHELP.HLX differ diff --git a/BORLAND/BC45/BIN/OWL.HLP b/BORLAND/BC45/BIN/OWL.HLP new file mode 100644 index 00000000..298389be Binary files /dev/null and b/BORLAND/BC45/BIN/OWL.HLP differ diff --git a/BORLAND/BC45/BIN/OWL.HLX b/BORLAND/BC45/BIN/OWL.HLX new file mode 100644 index 00000000..1c294d65 Binary files /dev/null and b/BORLAND/BC45/BIN/OWL.HLX differ diff --git a/BORLAND/BC45/BIN/OWL252.DLL b/BORLAND/BC45/BIN/OWL252.DLL new file mode 100644 index 00000000..6cf319d5 Binary files /dev/null and b/BORLAND/BC45/BIN/OWL252.DLL differ diff --git a/BORLAND/BC45/BIN/OWL252.TDS b/BORLAND/BC45/BIN/OWL252.TDS new file mode 100644 index 00000000..6d8f30d5 Binary files /dev/null and b/BORLAND/BC45/BIN/OWL252.TDS differ diff --git a/BORLAND/BC45/BIN/OWL252D.DLL b/BORLAND/BC45/BIN/OWL252D.DLL new file mode 100644 index 00000000..6ddeff13 Binary files /dev/null and b/BORLAND/BC45/BIN/OWL252D.DLL differ diff --git a/BORLAND/BC45/BIN/OWL252DF.DLL b/BORLAND/BC45/BIN/OWL252DF.DLL new file mode 100644 index 00000000..893ab742 Binary files /dev/null and b/BORLAND/BC45/BIN/OWL252DF.DLL differ diff --git a/BORLAND/BC45/BIN/OWL252F.DLL b/BORLAND/BC45/BIN/OWL252F.DLL new file mode 100644 index 00000000..08cbad29 Binary files /dev/null and b/BORLAND/BC45/BIN/OWL252F.DLL differ diff --git a/BORLAND/BC45/BIN/OWL252F.TDS b/BORLAND/BC45/BIN/OWL252F.TDS new file mode 100644 index 00000000..d76d9adf Binary files /dev/null and b/BORLAND/BC45/BIN/OWL252F.TDS differ diff --git a/BORLAND/BC45/BIN/OWLCVT.EXE b/BORLAND/BC45/BIN/OWLCVT.EXE new file mode 100644 index 00000000..29275c7d Binary files /dev/null and b/BORLAND/BC45/BIN/OWLCVT.EXE differ diff --git a/BORLAND/BC45/BIN/PENAPIWH.HLP b/BORLAND/BC45/BIN/PENAPIWH.HLP new file mode 100644 index 00000000..46a53a2a Binary files /dev/null and b/BORLAND/BC45/BIN/PENAPIWH.HLP differ diff --git a/BORLAND/BC45/BIN/PENWIN.DLL b/BORLAND/BC45/BIN/PENWIN.DLL new file mode 100644 index 00000000..274f7f6b Binary files /dev/null and b/BORLAND/BC45/BIN/PENWIN.DLL differ diff --git a/BORLAND/BC45/BIN/PENWIN.INI b/BORLAND/BC45/BIN/PENWIN.INI new file mode 100644 index 00000000..66d4c3a0 --- /dev/null +++ b/BORLAND/BC45/BIN/PENWIN.INI @@ -0,0 +1,22 @@ +[Current] +User=User 1 +InkWidth=1 +InkColor=0 +SelectTimeout=250 + +[sysges] +C!=xx,0,{Ctrl}{Ins} +P!=xx,0,{Shift}{Ins} +X!=xx,0,{Shift}{Del} +U!=xx,0,{Alt}{Bs} + +[*User 1] +TryDictionary=100 +ErrorLevel=25 +EndRecognition=8000 +TimeOut=1000 +WriteDirection=103 +MenuDropAlignment=0 +Preferences=0 +IntlPreferences=0 + diff --git a/BORLAND/BC45/BIN/PORT.DLL b/BORLAND/BC45/BIN/PORT.DLL new file mode 100644 index 00000000..74db85c4 Binary files /dev/null and b/BORLAND/BC45/BIN/PORT.DLL differ diff --git a/BORLAND/BC45/BIN/PORT.INI b/BORLAND/BC45/BIN/PORT.INI new file mode 100644 index 00000000..c5b8e02f --- /dev/null +++ b/BORLAND/BC45/BIN/PORT.INI @@ -0,0 +1,182 @@ +[PORTTOOL] + WinHelp=c:\mstools\bin\api32wh.hlp + +[Porttool data file format] +Supply the help file name and path above for access to winhelp +from within the environment. + +The format for the lines below is: +SearchKeyWord=HelpSearchString;Porting Issue;Suggested fix; + +Optional configurations: +SearchKeyWord=HelpSearchString;Porting Issue; +SearchKeyWord=HelpSearchString; +SearchKeyWord=HelpSearchString; ;Suggested fix; +SearchKeyWord=; ;Porting Issue;Suggested fix; +SearchKeyWord=; ;Porting Issue; +SearchKeyWord=; ; ;Suggested fix; + +Also, trailing semicolons are optional. + + +[APIS] + AccessResource=AccessResource;No Win32 API equivalent;Not necessary, just remove; + AddFontResource=AddFontResource;Must use string, not handle, for filename;; + AllocDStoCSAlias=AllocDStoCSAlias;No Win32 API equivalent;; + AllocResource=AllocResource;No Win32 API equivalent (resource API in progress);; + AllocSelector=AllocSelector;No Win32 API equivalent;; + ChangeSelector=ChangeSelector;No Win32 API equivalent;; + CloseComm=CloseComm;Replaced by CloseHandle;; + CloseSound=CloseSound;Replaced by multimedia sound support;; + CountVoiceNotes=CountVoiceNotes;Replaced by multimedia sound support;; + DefineHandleTable=DefineHandleTable;This function is now obsolete;; + DeviceCapabilities=DeviceCapabilities;Replaced by portable DeviceCapabilitiesEx;; + DeviceMode=DeviceMode;Replaced by portable DeviceModeEx;; + DlgDirSelect=DlgDirSelect;Replaced by portable DlgDirSelectEx;; + DlgDirSelectComboBox=DlgDirSelectComboBox;Replaced by portable DlgDirSelectComboBoxEx;; + DOS3Call=DOS3Call;Replaced by named, portable Win32 API;; + ExtDeviceMode=ExtDeviceMode;Replaced by portable ExtDeviceModeEx;; + FlushComm=FlushComm;Replaced by PurgeComm;; + FreeSelector=FreeSelector;No Win32 API equivalent;; + GetAspectRatioFilter=GetAspectRatioFilter;Replaced by portable GetAspectRatioFilterEx;; + GetBitmapDimension=GetBitmapDimension;Replaced by portable GetBitmapDimensionEx;; + GetBrushOrg=GetBrushOrg;Replaced by portable GetBrushOrgEx;; + GetClassWord=GetClassWord;Use GetClassLong for values that grow to 32-bits on Win32;; + GetCodeHandle=GetCodeHandle;No Win32 API equivalent;; + GetCodeInfo=GetCodeInfo;No Win32 API equivalent;; + GetCommError=GetCommError;Replaced by ClearCommError;; + GetCurrentPDB=GetCurrentPDB;No Win32 API equivalent;; + GetCurrentPosition=GetCurrentPosition;Replaced by portable GetCurrentPositionEx;; + GetEnvironment=GetEnvironment;No Win32 API equivalent;; + GetFreeSpace=GetFreeSpace;Replaced by GlobalMemoryStatus function;; + GetFreeSystemResources=GlobalMemoryStatus;Replaced by GlobalMemoryStatus function;; + GetInstanceData=GetInstanceData;No equivalent;use alternative supported IPC mechanism.; + GetKBCodePage=GetKBCodePage;No Win32 API equivalent;; + GetMetaFileBits=GetMetaFileBits;Replaced by portable GetMetaFileBitsEx;; + GetModuleUsage=GetModuleUsage;Always returns 1 on Win32;; + GetTempDrive=GetTempDrive;Implements Win16 functionality on Win32;; + GetTextExtent=GetTextExtent;Replaced by portable GetTextExtentPoint;; + GetTextExtentEx=GetTextExtentEx;Replaced by portable GetTextExtentExPoint;; + GetThresholdEvent=GetThresholdEvent;Replaced by multimedia sound support;; + GetThresholdStatus=GetThresholdStatus;Replaced by multimedia sound support;; + GetViewportExt=GetViewportExt;Replaced by portable GetViewportExtEx;; + GetViewportOrg=GetViewportOrg;Replaced by portable GetViewportOrgEx;; + GetWindowExt=GetWindowExt;Replaced by portable GetWindowExtEx;; + GetWindowOrg=GetWindowOrg;Replaced by portable GetWindowOrgEx;; + GetWindowWord=GetWindowWord;Use GetWindowLong for values that grow to 32-bits on Win32;; + GlobalCompact=GlobalCompact;This function is now obsolete;; + GlobalDosAlloc=GlobalDosAlloc;No Win32 API equivalent;; + GlobalDosFree=GlobalDosFree;No Win32 API equivalent;; + GlobalFix=GlobalFix;This function is now obsolete;; + GlobalLRUNewest=GlobalLRUNewest;This function is now obsolete;; + GlobalLRUNOldest=GlobalLRUNOldest;This function is now obsolete;; + GlobalNotify=GlobalNotify;This function is now obsolete;; + GlobalPageLock=GlobalPageLock;No Win32 API equivalent;; + GlobalPageUnlock=GlobalPageUnlock;No Win32 API equivalent;; + GlobalUnfix=GlobalUnfix;This function is now obsolete;; + GlobalUnwire=GlobalUnwire;This function is now obsolete;; + GlobalWire=GlobalWire;This function is now obsolete;; + LocalCompact=LocalCompact;This function is now obsolete;; + LocalInit=LocalInit;This function is now obsolete;; + LocalShrink=LocalShrink;This function is now obsolete;; + LockSegment=LockSegment;This function is now obsolete;; + LimitEMSPages=LimitEMSPages;No Win32 API equivalent;; + LocalNotify=LocalNotify;No Win32 Equivalent;; + MoveTo=MoveTo;Replaced by portable MoveToEx;; + NetBIOSCall=NetBIOSCall;Replaced by named, portable Win32 API;; + OffsetViewportOrg=OffsetViewportOrg;Replaced by portable OffsetViewportOrgEx;; + OffsetWindowOrg=OffsetWindowOrg;Replaced by portable OffsetWindowOrgEx;; + OpenComm=OpenComm;Replaced by OpenFile;; + OpenSound=OpenSound;Replaced by multimedia sound support;; + ProfClear=ProfClear;See tech. ref. for Win32 API profiling support;; + ProfFinish=ProfFinish;See tech. ref. for Win32 API profiling support;; + ProfFlush=ProfFlush;See tech. ref. for Win32 API profiling support;; + ProfInsChk=ProfInsChk;See tech. ref. for Win32 API profiling support;; + ProfSampRate=ProfSampRate;See tech. ref. for Win32 API profiling support;; + ProfSetup=ProfSetup;See tech. ref. for Win32 API profiling support;; + ProfStart=ProfStart;See tech. ref. for Win32 API profiling support;; + ProfStop=ProfStop;See tech. ref. for Win32 API profiling support;; + ReadComm=ReadComm;Replaced by ReadFile;; + RemoveFontResource=RemoveFontResource;Must use string, not handle, for filename;; + ScaleViewportExt=ScaleViewportExt;Replaced by portable ScaleViewportExtEx;; + ScaleWindowExt=ScaleWindowExt;Replaced by portable ScaleWindowExtEx;; + SetBitmapDimension=SetBitmapDimension;Replaced by portable SetBitmapDimensionEx;; + SetClassWord=SetClassWord;Use SetClassLong for values that grow to 32-bits on Win32;; + SetCommEventMask=;Replaced by SetCommMask;; + SetEnvironment=SetEnvironment;No Win32 API equivalent;; + SetMetaFileBits=SetMetaFileBits;Replaced by portable SetMetaFileBitsEx;; + SetResourceHandler=SetResourceHandler;No Win32 API equivalent (resource API in progress);; + SetSoundNoise=SetSoundNoise;Replaced by multimedia sound support;; + SetSwapAreaSize=SetSwapAreaSize;This function is now obsolete;; + SetViewportExt=SetViewportExt;Replaced by portable SetViewportExtEx;; + SetViewportOrg=SetViewportOrg;Replaced by portable SetViewportOrgEx;; + SetVoiceAccent=SetVoiceAccent;Replaced by multimedia sound support;; + SetVoiceEnvelope=SetVoiceEnvelope;Replaced by multimedia sound support;; + SetVoiceNote=SetVoiceNote;Replaced by multimedia sound support;; + SetVoiceQueueSize=SetVoiceQueueSize;Replaced by multimedia sound support;; + SetVoiceSound=SetVoiceSound;Replaced by multimedia sound support;; + SetVoiceThreshold=SetVoiceThreshold;Replaced by multimedia sound support;; + SetWindowExt=SetWindowExt;Replaced by portable SetWindowExtEx;; + SetWindowOrg=SetWindowOrg;Replaced by portable SetWindowOrgEx;; + SetWindowWord=SetWindowWord;Use SetWindowLong for values that grow to 32-bits on Win32;; + StartSound=StartSound;Replaced by multimedia sound support;; + StopSound=StopSound;Replaced by multimedia sound support;; + SwitchStackBack=SwitchStackBack;No Win32 API equivalent;; + SwitchStackTo=SwitchStackTo;No Win32 API equivalent;; + SyncAllVoices=SyncAllVoices;Replaced by multimedia sound support;; + UngetCommChar=UngetCommChar;No Win32 equivalent;; + UnlockSegment=UnlockSegment;This function is now obsolete;; + ValidateCodeSegments=ValidateCodeSegments;No Win32 API equivalent;; + ValidateFreeSpaces=ValidateFreeSpaces;No Win32 API equivalent;; + WaitSoundState=WaitSoundState;Replaced by multimedia sound support;; + WndProc=WindowProc;All WndProc's should be defined in a portable manner;WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LONG lParam); + WriteComm=WriteComm;Replaced by WriteFile;; + +[MESSAGES] + EM_GETSEL=EM_GETSEL;wParam/lParam repacking, refer to tech. ref. for details;; + EM_LINESCROLL=EM_LINESCROLL;wParam/lParam repacking, refer to tech. ref. for details;; + EM_SETSEL=EM_SETSEL;wParam/lParam repacking, refer to tech. ref. for details;; + WM_ACTIVATE=WM_ACTIVATE;wParam/lParam repacking, refer to tech. ref. for details;; + WM_CHANGECBCHAIN=WM_CHANGECBCHAIN;wParam/lParam repacking, refer to tech. ref. for details;; + WM_CHARTOITEM=WM_CHARTOITEM;wParam/lParam repacking, refer to tech. ref. for details;; + WM_COMMAND=WM_COMMAND;wParam/lParam repacking, refer to tech. ref. for details;; + WM_CTLCOLOR=WM_CTLCOLOR;wParam/lParam repacking, refer to tech. ref. for details;; + WM_DDE_ACK=WM_DDE_ACK;wParam/lParam repacking, refer to tech. ref. for details;; + WM_DDE_ADVISE=WM_DDE_ADVISE;wParam/lParam repacking, refer to tech. ref. for details;; + WM_DDE_DATA=WM_DDE_DATA;wParam/lParam repacking, refer to tech. ref. for details;; + WM_DDE_EXECUTE=WM_DDE_EXECUTE;wParam/lParam repacking, refer to tech. ref. for details;; + WM_DDE_POKE=WM_DDE_POKE;wParam/lParam repacking, refer to tech. ref. for details;; + WM_HSCROLL=WM_HSCROLL;wParam/lParam repacking, refer to tech. ref. for details;; + WM_MDIACTIVATE=WM_MDIACTIVATE;wParam/lParam repacking, refer to tech. ref. for details;; + WM_MDISETMENU=WM_MDISETMENU;wParam/lParam repacking, refer to tech. ref. for details;; + WM_MENUCHAR=WM_MENUCHAR;wParam/lParam repacking, refer to tech. ref. for details;; + WM_MENUSELECT=WM_MENUSELECT;wParam/lParam repacking, refer to tech. ref. for details;; + WM_PARENTNOTIFY=WM_PARENTNOTIFY;wParam/lParam repacking, refer to tech. ref. for details;; + WM_VKEYTOITEM=WM_VKEYTOITEM;wParam/lParam repacking, refer to tech. ref. for details;; + WM_VSCROLL=WM_VSCROLL;wParam/lParam repacking, refer to tech. ref. for details;; + +[STRUCTURES] + DCB=DCB;Changes to bitfields and additional structure members;; + +[TYPES] + (WORD)=WORD;Check if incorrect cast of 32-bit value;Replace 16-bit data types with 32-bit types where possible; + +[CONSTANTS] + GCW_HCURSOR=GetClassLong;Replaced by GCL_HCURSOR;; + GCW_HBRBACKGROUND=GetClassLong;Replaced by GCL_HBRBACKGROUND;; + GCW_HICON=GetClassLong;Replaced by GCL_HICON;; + GWW_HINSTANCE=GetWindowLong;Replaced by GWL_HINSTANCE;; + GWW_HWNDPARENT=GetWindowLong;Replaced by GWL_HWNDPARENT;; + GWW_ID=GetWindowLong;Replaced by GWL_ID;; + GWW_USERDATA=GetWindowLong;Replaced by GWL_USERDATA;; + READ=_lopen;Replaced by OF_READ;; + WRITE=_lopen;Replaced by OF_WRITE;; + READ_WRITE=_lopen;Replaced by OF_READ_WRITE;; + +[MACROS] + HIWORD=HIWORD;Check if HIWORD target is 16- or 32-bit;; + LOWORD=LOWORD;Check if LOWORD target is 16- or 32-bit;; + MAKEPOINT=MAKEPOINT;Replaced by LONG2POINT;; + +[CUSTOM] + FAR=far;Win32 is non-segmented, thus FAR == NEAR == nothing!;; diff --git a/BORLAND/BC45/BIN/PORTTOOL.EXE b/BORLAND/BC45/BIN/PORTTOOL.EXE new file mode 100644 index 00000000..62a4b665 Binary files /dev/null and b/BORLAND/BC45/BIN/PORTTOOL.EXE differ diff --git a/BORLAND/BC45/BIN/PSTAT.EXE b/BORLAND/BC45/BIN/PSTAT.EXE new file mode 100644 index 00000000..66ea0b84 Binary files /dev/null and b/BORLAND/BC45/BIN/PSTAT.EXE differ diff --git a/BORLAND/BC45/BIN/PTUI.DLL b/BORLAND/BC45/BIN/PTUI.DLL new file mode 100644 index 00000000..93251be2 Binary files /dev/null and b/BORLAND/BC45/BIN/PTUI.DLL differ diff --git a/BORLAND/BC45/BIN/PVIEW.EXE b/BORLAND/BC45/BIN/PVIEW.EXE new file mode 100644 index 00000000..00ae1c4d Binary files /dev/null and b/BORLAND/BC45/BIN/PVIEW.EXE differ diff --git a/BORLAND/BC45/BIN/RC.EXE b/BORLAND/BC45/BIN/RC.EXE new file mode 100644 index 00000000..70ef3c90 Binary files /dev/null and b/BORLAND/BC45/BIN/RC.EXE differ diff --git a/BORLAND/BC45/BIN/RC2MSG.DLL b/BORLAND/BC45/BIN/RC2MSG.DLL new file mode 100644 index 00000000..dc3946fb Binary files /dev/null and b/BORLAND/BC45/BIN/RC2MSG.DLL differ diff --git a/BORLAND/BC45/BIN/RCDLL.DLL b/BORLAND/BC45/BIN/RCDLL.DLL new file mode 100644 index 00000000..d908f55f Binary files /dev/null and b/BORLAND/BC45/BIN/RCDLL.DLL differ diff --git a/BORLAND/BC45/BIN/RCPP.EXE b/BORLAND/BC45/BIN/RCPP.EXE new file mode 100644 index 00000000..947a74d8 Binary files /dev/null and b/BORLAND/BC45/BIN/RCPP.EXE differ diff --git a/BORLAND/BC45/BIN/REGIST32.EXE b/BORLAND/BC45/BIN/REGIST32.EXE new file mode 100644 index 00000000..3499112c Binary files /dev/null and b/BORLAND/BC45/BIN/REGIST32.EXE differ diff --git a/BORLAND/BC45/BIN/REGISTER.EXE b/BORLAND/BC45/BIN/REGISTER.EXE new file mode 100644 index 00000000..74a36273 Binary files /dev/null and b/BORLAND/BC45/BIN/REGISTER.EXE differ diff --git a/BORLAND/BC45/BIN/REGLOAD.EXE b/BORLAND/BC45/BIN/REGLOAD.EXE new file mode 100644 index 00000000..60c5f097 Binary files /dev/null and b/BORLAND/BC45/BIN/REGLOAD.EXE differ diff --git a/BORLAND/BC45/BIN/RLINK.EXE b/BORLAND/BC45/BIN/RLINK.EXE new file mode 100644 index 00000000..c7131ee3 Binary files /dev/null and b/BORLAND/BC45/BIN/RLINK.EXE differ diff --git a/BORLAND/BC45/BIN/RLINK32.DLL b/BORLAND/BC45/BIN/RLINK32.DLL new file mode 100644 index 00000000..ddb3dea0 Binary files /dev/null and b/BORLAND/BC45/BIN/RLINK32.DLL differ diff --git a/BORLAND/BC45/BIN/RPC.HLP b/BORLAND/BC45/BIN/RPC.HLP new file mode 100644 index 00000000..7b4f0822 Binary files /dev/null and b/BORLAND/BC45/BIN/RPC.HLP differ diff --git a/BORLAND/BC45/BIN/RPC.HLX b/BORLAND/BC45/BIN/RPC.HLX new file mode 100644 index 00000000..8fe053c9 Binary files /dev/null and b/BORLAND/BC45/BIN/RPC.HLX differ diff --git a/BORLAND/BC45/BIN/RSL.HLP b/BORLAND/BC45/BIN/RSL.HLP new file mode 100644 index 00000000..4ea11887 Binary files /dev/null and b/BORLAND/BC45/BIN/RSL.HLP differ diff --git a/BORLAND/BC45/BIN/RSL.HLX b/BORLAND/BC45/BIN/RSL.HLX new file mode 100644 index 00000000..e5b08fbf Binary files /dev/null and b/BORLAND/BC45/BIN/RSL.HLX differ diff --git a/BORLAND/BC45/BIN/RTM.EXE b/BORLAND/BC45/BIN/RTM.EXE new file mode 100644 index 00000000..c60688af Binary files /dev/null and b/BORLAND/BC45/BIN/RTM.EXE differ diff --git a/BORLAND/BC45/BIN/SHED.EXE b/BORLAND/BC45/BIN/SHED.EXE new file mode 100644 index 00000000..8727cb63 Binary files /dev/null and b/BORLAND/BC45/BIN/SHED.EXE differ diff --git a/BORLAND/BC45/BIN/SHED.HLP b/BORLAND/BC45/BIN/SHED.HLP new file mode 100644 index 00000000..21ecfdfa Binary files /dev/null and b/BORLAND/BC45/BIN/SHED.HLP differ diff --git a/BORLAND/BC45/BIN/SOC.HLP b/BORLAND/BC45/BIN/SOC.HLP new file mode 100644 index 00000000..700d1723 Binary files /dev/null and b/BORLAND/BC45/BIN/SOC.HLP differ diff --git a/BORLAND/BC45/BIN/SOC.HLX b/BORLAND/BC45/BIN/SOC.HLX new file mode 100644 index 00000000..6412b109 Binary files /dev/null and b/BORLAND/BC45/BIN/SOC.HLX differ diff --git a/BORLAND/BC45/BIN/STB.DLL b/BORLAND/BC45/BIN/STB.DLL new file mode 100644 index 00000000..dd0fe50f Binary files /dev/null and b/BORLAND/BC45/BIN/STB.DLL differ diff --git a/BORLAND/BC45/BIN/STRESS.DLL b/BORLAND/BC45/BIN/STRESS.DLL new file mode 100644 index 00000000..e28e5e09 Binary files /dev/null and b/BORLAND/BC45/BIN/STRESS.DLL differ diff --git a/BORLAND/BC45/BIN/SVGA.DLL b/BORLAND/BC45/BIN/SVGA.DLL new file mode 100644 index 00000000..cba493ae Binary files /dev/null and b/BORLAND/BC45/BIN/SVGA.DLL differ diff --git a/BORLAND/BC45/BIN/TASM2MSG.DLL b/BORLAND/BC45/BIN/TASM2MSG.DLL new file mode 100644 index 00000000..28a94574 Binary files /dev/null and b/BORLAND/BC45/BIN/TASM2MSG.DLL differ diff --git a/BORLAND/BC45/BIN/TBROWSER.DLL b/BORLAND/BC45/BIN/TBROWSER.DLL new file mode 100644 index 00000000..e73f108f Binary files /dev/null and b/BORLAND/BC45/BIN/TBROWSER.DLL differ diff --git a/BORLAND/BC45/BIN/TD.EXE b/BORLAND/BC45/BIN/TD.EXE new file mode 100644 index 00000000..1226f236 Binary files /dev/null and b/BORLAND/BC45/BIN/TD.EXE differ diff --git a/BORLAND/BC45/BIN/TD.PIF b/BORLAND/BC45/BIN/TD.PIF new file mode 100644 index 00000000..bcc8f8f6 Binary files /dev/null and b/BORLAND/BC45/BIN/TD.PIF differ diff --git a/BORLAND/BC45/BIN/TD32.EXE b/BORLAND/BC45/BIN/TD32.EXE new file mode 100644 index 00000000..bd4119ef Binary files /dev/null and b/BORLAND/BC45/BIN/TD32.EXE differ diff --git a/BORLAND/BC45/BIN/TD32.ICO b/BORLAND/BC45/BIN/TD32.ICO new file mode 100644 index 00000000..86362bff Binary files /dev/null and b/BORLAND/BC45/BIN/TD32.ICO differ diff --git a/BORLAND/BC45/BIN/TD32HELP.TDH b/BORLAND/BC45/BIN/TD32HELP.TDH new file mode 100644 index 00000000..cd3b296e Binary files /dev/null and b/BORLAND/BC45/BIN/TD32HELP.TDH differ diff --git a/BORLAND/BC45/BIN/TD32INST.EXE b/BORLAND/BC45/BIN/TD32INST.EXE new file mode 100644 index 00000000..0298c417 Binary files /dev/null and b/BORLAND/BC45/BIN/TD32INST.EXE differ diff --git a/BORLAND/BC45/BIN/TD32INST.ICO b/BORLAND/BC45/BIN/TD32INST.ICO new file mode 100644 index 00000000..96245720 Binary files /dev/null and b/BORLAND/BC45/BIN/TD32INST.ICO differ diff --git a/BORLAND/BC45/BIN/TDDEBUG.386 b/BORLAND/BC45/BIN/TDDEBUG.386 new file mode 100644 index 00000000..1d993855 Binary files /dev/null and b/BORLAND/BC45/BIN/TDDEBUG.386 differ diff --git a/BORLAND/BC45/BIN/TDDOS.ICO b/BORLAND/BC45/BIN/TDDOS.ICO new file mode 100644 index 00000000..220521ec Binary files /dev/null and b/BORLAND/BC45/BIN/TDDOS.ICO differ diff --git a/BORLAND/BC45/BIN/TDHELP.TDH b/BORLAND/BC45/BIN/TDHELP.TDH new file mode 100644 index 00000000..7d167219 Binary files /dev/null and b/BORLAND/BC45/BIN/TDHELP.TDH differ diff --git a/BORLAND/BC45/BIN/TDINST.EXE b/BORLAND/BC45/BIN/TDINST.EXE new file mode 100644 index 00000000..aeefe541 Binary files /dev/null and b/BORLAND/BC45/BIN/TDINST.EXE differ diff --git a/BORLAND/BC45/BIN/TDKBDW16.DLL b/BORLAND/BC45/BIN/TDKBDW16.DLL new file mode 100644 index 00000000..61ff5645 Binary files /dev/null and b/BORLAND/BC45/BIN/TDKBDW16.DLL differ diff --git a/BORLAND/BC45/BIN/TDKBDW32.DLL b/BORLAND/BC45/BIN/TDKBDW32.DLL new file mode 100644 index 00000000..610f67c4 Binary files /dev/null and b/BORLAND/BC45/BIN/TDKBDW32.DLL differ diff --git a/BORLAND/BC45/BIN/TDMEM.EXE b/BORLAND/BC45/BIN/TDMEM.EXE new file mode 100644 index 00000000..08b4e41b Binary files /dev/null and b/BORLAND/BC45/BIN/TDMEM.EXE differ diff --git a/BORLAND/BC45/BIN/TDOSINST.ICO b/BORLAND/BC45/BIN/TDOSINST.ICO new file mode 100644 index 00000000..7981c1b7 Binary files /dev/null and b/BORLAND/BC45/BIN/TDOSINST.ICO differ diff --git a/BORLAND/BC45/BIN/TDREMOTE.EXE b/BORLAND/BC45/BIN/TDREMOTE.EXE new file mode 100644 index 00000000..ffef78a3 Binary files /dev/null and b/BORLAND/BC45/BIN/TDREMOTE.EXE differ diff --git a/BORLAND/BC45/BIN/TDRF.EXE b/BORLAND/BC45/BIN/TDRF.EXE new file mode 100644 index 00000000..d96a9c37 Binary files /dev/null and b/BORLAND/BC45/BIN/TDRF.EXE differ diff --git a/BORLAND/BC45/BIN/TDSTRIP.EXE b/BORLAND/BC45/BIN/TDSTRIP.EXE new file mode 100644 index 00000000..15da30d3 Binary files /dev/null and b/BORLAND/BC45/BIN/TDSTRIP.EXE differ diff --git a/BORLAND/BC45/BIN/TDSTRP32.EXE b/BORLAND/BC45/BIN/TDSTRP32.EXE new file mode 100644 index 00000000..196ec4cb Binary files /dev/null and b/BORLAND/BC45/BIN/TDSTRP32.EXE differ diff --git a/BORLAND/BC45/BIN/TDUMP.EXE b/BORLAND/BC45/BIN/TDUMP.EXE new file mode 100644 index 00000000..34872d6e Binary files /dev/null and b/BORLAND/BC45/BIN/TDUMP.EXE differ diff --git a/BORLAND/BC45/BIN/TDVIDW16.DLL b/BORLAND/BC45/BIN/TDVIDW16.DLL new file mode 100644 index 00000000..f4311d5a Binary files /dev/null and b/BORLAND/BC45/BIN/TDVIDW16.DLL differ diff --git a/BORLAND/BC45/BIN/TDVIDW32.DLL b/BORLAND/BC45/BIN/TDVIDW32.DLL new file mode 100644 index 00000000..5f13409d Binary files /dev/null and b/BORLAND/BC45/BIN/TDVIDW32.DLL differ diff --git a/BORLAND/BC45/BIN/TDW.CKB b/BORLAND/BC45/BIN/TDW.CKB new file mode 100644 index 00000000..a1361af6 Binary files /dev/null and b/BORLAND/BC45/BIN/TDW.CKB differ diff --git a/BORLAND/BC45/BIN/TDW.EXE b/BORLAND/BC45/BIN/TDW.EXE new file mode 100644 index 00000000..b7ac0fe5 Binary files /dev/null and b/BORLAND/BC45/BIN/TDW.EXE differ diff --git a/BORLAND/BC45/BIN/TDWGUI.DLL b/BORLAND/BC45/BIN/TDWGUI.DLL new file mode 100644 index 00000000..fc5a5846 Binary files /dev/null and b/BORLAND/BC45/BIN/TDWGUI.DLL differ diff --git a/BORLAND/BC45/BIN/TDWHELP.TDH b/BORLAND/BC45/BIN/TDWHELP.TDH new file mode 100644 index 00000000..e9648543 Binary files /dev/null and b/BORLAND/BC45/BIN/TDWHELP.TDH differ diff --git a/BORLAND/BC45/BIN/TDWINI.EXE b/BORLAND/BC45/BIN/TDWINI.EXE new file mode 100644 index 00000000..28cc5b30 Binary files /dev/null and b/BORLAND/BC45/BIN/TDWINI.EXE differ diff --git a/BORLAND/BC45/BIN/TDWINI.HLP b/BORLAND/BC45/BIN/TDWINI.HLP new file mode 100644 index 00000000..1984fa96 Binary files /dev/null and b/BORLAND/BC45/BIN/TDWINI.HLP differ diff --git a/BORLAND/BC45/BIN/TDWINST.EXE b/BORLAND/BC45/BIN/TDWINST.EXE new file mode 100644 index 00000000..e8778829 Binary files /dev/null and b/BORLAND/BC45/BIN/TDWINST.EXE differ diff --git a/BORLAND/BC45/BIN/TDWINST.ICO b/BORLAND/BC45/BIN/TDWINST.ICO new file mode 100644 index 00000000..4e5c7deb Binary files /dev/null and b/BORLAND/BC45/BIN/TDWINST.ICO differ diff --git a/BORLAND/BC45/BIN/TDWINTH.DLL b/BORLAND/BC45/BIN/TDWINTH.DLL new file mode 100644 index 00000000..16788617 Binary files /dev/null and b/BORLAND/BC45/BIN/TDWINTH.DLL differ diff --git a/BORLAND/BC45/BIN/TFHELP.TFH b/BORLAND/BC45/BIN/TFHELP.TFH new file mode 100644 index 00000000..f1cebbc3 Binary files /dev/null and b/BORLAND/BC45/BIN/TFHELP.TFH differ diff --git a/BORLAND/BC45/BIN/TFINST.EXE b/BORLAND/BC45/BIN/TFINST.EXE new file mode 100644 index 00000000..25032263 Binary files /dev/null and b/BORLAND/BC45/BIN/TFINST.EXE differ diff --git a/BORLAND/BC45/BIN/TFREMOTE.EXE b/BORLAND/BC45/BIN/TFREMOTE.EXE new file mode 100644 index 00000000..2fc40ad2 Binary files /dev/null and b/BORLAND/BC45/BIN/TFREMOTE.EXE differ diff --git a/BORLAND/BC45/BIN/TFWHELP.TFH b/BORLAND/BC45/BIN/TFWHELP.TFH new file mode 100644 index 00000000..51da8936 Binary files /dev/null and b/BORLAND/BC45/BIN/TFWHELP.TFH differ diff --git a/BORLAND/BC45/BIN/TLIB.EXE b/BORLAND/BC45/BIN/TLIB.EXE new file mode 100644 index 00000000..b6d2cf93 Binary files /dev/null and b/BORLAND/BC45/BIN/TLIB.EXE differ diff --git a/BORLAND/BC45/BIN/TLINK.CFG b/BORLAND/BC45/BIN/TLINK.CFG new file mode 100644 index 00000000..7445bb70 --- /dev/null +++ b/BORLAND/BC45/BIN/TLINK.CFG @@ -0,0 +1 @@ +-LD:\BC45\LIB diff --git a/BORLAND/BC45/BIN/TLINK.EXE b/BORLAND/BC45/BIN/TLINK.EXE new file mode 100644 index 00000000..bef4a501 Binary files /dev/null and b/BORLAND/BC45/BIN/TLINK.EXE differ diff --git a/BORLAND/BC45/BIN/TLINK32.CFG b/BORLAND/BC45/BIN/TLINK32.CFG new file mode 100644 index 00000000..7445bb70 --- /dev/null +++ b/BORLAND/BC45/BIN/TLINK32.CFG @@ -0,0 +1 @@ +-LD:\BC45\LIB diff --git a/BORLAND/BC45/BIN/TLINK32.EXE b/BORLAND/BC45/BIN/TLINK32.EXE new file mode 100644 index 00000000..591ef488 Binary files /dev/null and b/BORLAND/BC45/BIN/TLINK32.EXE differ diff --git a/BORLAND/BC45/BIN/TMAPSYM.EXE b/BORLAND/BC45/BIN/TMAPSYM.EXE new file mode 100644 index 00000000..f7e4dd96 Binary files /dev/null and b/BORLAND/BC45/BIN/TMAPSYM.EXE differ diff --git a/BORLAND/BC45/BIN/TOUCH.COM b/BORLAND/BC45/BIN/TOUCH.COM new file mode 100644 index 00000000..83b34d86 Binary files /dev/null and b/BORLAND/BC45/BIN/TOUCH.COM differ diff --git a/BORLAND/BC45/BIN/TPROF.EXE b/BORLAND/BC45/BIN/TPROF.EXE new file mode 100644 index 00000000..8e3bacad Binary files /dev/null and b/BORLAND/BC45/BIN/TPROF.EXE differ diff --git a/BORLAND/BC45/BIN/TPROF.ICO b/BORLAND/BC45/BIN/TPROF.ICO new file mode 100644 index 00000000..ec85c0f9 Binary files /dev/null and b/BORLAND/BC45/BIN/TPROF.ICO differ diff --git a/BORLAND/BC45/BIN/TPROFW.EXE b/BORLAND/BC45/BIN/TPROFW.EXE new file mode 100644 index 00000000..c606f745 Binary files /dev/null and b/BORLAND/BC45/BIN/TPROFW.EXE differ diff --git a/BORLAND/BC45/BIN/TRIGRAPH.EXE b/BORLAND/BC45/BIN/TRIGRAPH.EXE new file mode 100644 index 00000000..eba3ffed Binary files /dev/null and b/BORLAND/BC45/BIN/TRIGRAPH.EXE differ diff --git a/BORLAND/BC45/BIN/TURBOC.CFG b/BORLAND/BC45/BIN/TURBOC.CFG new file mode 100644 index 00000000..693408f1 --- /dev/null +++ b/BORLAND/BC45/BIN/TURBOC.CFG @@ -0,0 +1,2 @@ +-ID:\BC45\INCLUDE +-LD:\BC45\LIB diff --git a/BORLAND/BC45/BIN/VBT300.HLP b/BORLAND/BC45/BIN/VBT300.HLP new file mode 100644 index 00000000..9512ccf2 Binary files /dev/null and b/BORLAND/BC45/BIN/VBT300.HLP differ diff --git a/BORLAND/BC45/BIN/VBXGEN.EXE b/BORLAND/BC45/BIN/VBXGEN.EXE new file mode 100644 index 00000000..e9fc24f2 Binary files /dev/null and b/BORLAND/BC45/BIN/VBXGEN.EXE differ diff --git a/BORLAND/BC45/BIN/VFW.HLP b/BORLAND/BC45/BIN/VFW.HLP new file mode 100644 index 00000000..c47dd184 Binary files /dev/null and b/BORLAND/BC45/BIN/VFW.HLP differ diff --git a/BORLAND/BC45/BIN/VFW.HLX b/BORLAND/BC45/BIN/VFW.HLX new file mode 100644 index 00000000..cb58a142 Binary files /dev/null and b/BORLAND/BC45/BIN/VFW.HLX differ diff --git a/BORLAND/BC45/BIN/VGAP.DRV b/BORLAND/BC45/BIN/VGAP.DRV new file mode 100644 index 00000000..dc3c4ddb Binary files /dev/null and b/BORLAND/BC45/BIN/VGAP.DRV differ diff --git a/BORLAND/BC45/BIN/WIN31MWH.HLP b/BORLAND/BC45/BIN/WIN31MWH.HLP new file mode 100644 index 00000000..3f0ed650 Binary files /dev/null and b/BORLAND/BC45/BIN/WIN31MWH.HLP differ diff --git a/BORLAND/BC45/BIN/WIN31WH.HLP b/BORLAND/BC45/BIN/WIN31WH.HLP new file mode 100644 index 00000000..30ae6256 Binary files /dev/null and b/BORLAND/BC45/BIN/WIN31WH.HLP differ diff --git a/BORLAND/BC45/BIN/WIN31WH.HLX b/BORLAND/BC45/BIN/WIN31WH.HLX new file mode 100644 index 00000000..a3c8335a Binary files /dev/null and b/BORLAND/BC45/BIN/WIN31WH.HLX differ diff --git a/BORLAND/BC45/BIN/WIN32.HLP b/BORLAND/BC45/BIN/WIN32.HLP new file mode 100644 index 00000000..5e0c9b4b Binary files /dev/null and b/BORLAND/BC45/BIN/WIN32.HLP differ diff --git a/BORLAND/BC45/BIN/WIN32.HLX b/BORLAND/BC45/BIN/WIN32.HLX new file mode 100644 index 00000000..bec5a0a7 Binary files /dev/null and b/BORLAND/BC45/BIN/WIN32.HLX differ diff --git a/BORLAND/BC45/BIN/WIN32S.HLP b/BORLAND/BC45/BIN/WIN32S.HLP new file mode 100644 index 00000000..293de06d Binary files /dev/null and b/BORLAND/BC45/BIN/WIN32S.HLP differ diff --git a/BORLAND/BC45/BIN/WINDPMI.386 b/BORLAND/BC45/BIN/WINDPMI.386 new file mode 100644 index 00000000..ae74362e Binary files /dev/null and b/BORLAND/BC45/BIN/WINDPMI.386 differ diff --git a/BORLAND/BC45/BIN/WINRUN.386 b/BORLAND/BC45/BIN/WINRUN.386 new file mode 100644 index 00000000..10724510 Binary files /dev/null and b/BORLAND/BC45/BIN/WINRUN.386 differ diff --git a/BORLAND/BC45/BIN/WINRUN.EXE b/BORLAND/BC45/BIN/WINRUN.EXE new file mode 100644 index 00000000..f7482e6f Binary files /dev/null and b/BORLAND/BC45/BIN/WINRUN.EXE differ diff --git a/BORLAND/BC45/BIN/WINSIGHT.EXE b/BORLAND/BC45/BIN/WINSIGHT.EXE new file mode 100644 index 00000000..8ef4883a Binary files /dev/null and b/BORLAND/BC45/BIN/WINSIGHT.EXE differ diff --git a/BORLAND/BC45/BIN/WINSIGHT.HLP b/BORLAND/BC45/BIN/WINSIGHT.HLP new file mode 100644 index 00000000..a25ae7a2 Binary files /dev/null and b/BORLAND/BC45/BIN/WINSIGHT.HLP differ diff --git a/BORLAND/BC45/BIN/WINSIGHT.HLX b/BORLAND/BC45/BIN/WINSIGHT.HLX new file mode 100644 index 00000000..6b5c94ed Binary files /dev/null and b/BORLAND/BC45/BIN/WINSIGHT.HLX differ diff --git a/BORLAND/BC45/BIN/WINSPCTR.EXE b/BORLAND/BC45/BIN/WINSPCTR.EXE new file mode 100644 index 00000000..cd001e8c Binary files /dev/null and b/BORLAND/BC45/BIN/WINSPCTR.EXE differ diff --git a/BORLAND/BC45/BIN/WINSPCTR.HLP b/BORLAND/BC45/BIN/WINSPCTR.HLP new file mode 100644 index 00000000..557614c5 Binary files /dev/null and b/BORLAND/BC45/BIN/WINSPCTR.HLP differ diff --git a/BORLAND/BC45/BIN/WINSPCTR.HLX b/BORLAND/BC45/BIN/WINSPCTR.HLX new file mode 100644 index 00000000..a7d8787b Binary files /dev/null and b/BORLAND/BC45/BIN/WINSPCTR.HLX differ diff --git a/BORLAND/BC45/BIN/WINSTUB.EXE b/BORLAND/BC45/BIN/WINSTUB.EXE new file mode 100644 index 00000000..e4607563 Binary files /dev/null and b/BORLAND/BC45/BIN/WINSTUB.EXE differ diff --git a/BORLAND/BC45/BIN/WORKED1.DLL b/BORLAND/BC45/BIN/WORKED1.DLL new file mode 100644 index 00000000..699845e5 Binary files /dev/null and b/BORLAND/BC45/BIN/WORKED1.DLL differ diff --git a/BORLAND/BC45/BIN/WORKED2.DLL b/BORLAND/BC45/BIN/WORKED2.DLL new file mode 100644 index 00000000..189f0a6c Binary files /dev/null and b/BORLAND/BC45/BIN/WORKED2.DLL differ diff --git a/BORLAND/BC45/BIN/WORKED3.DLL b/BORLAND/BC45/BIN/WORKED3.DLL new file mode 100644 index 00000000..9ada6baa Binary files /dev/null and b/BORLAND/BC45/BIN/WORKED3.DLL differ diff --git a/BORLAND/BC45/BIN/WORKED4.DLL b/BORLAND/BC45/BIN/WORKED4.DLL new file mode 100644 index 00000000..836af546 Binary files /dev/null and b/BORLAND/BC45/BIN/WORKED4.DLL differ diff --git a/BORLAND/BC45/BIN/WORKED5.DLL b/BORLAND/BC45/BIN/WORKED5.DLL new file mode 100644 index 00000000..c9cc1d2c Binary files /dev/null and b/BORLAND/BC45/BIN/WORKED5.DLL differ diff --git a/BORLAND/BC45/BIN/WORKHELP.HLP b/BORLAND/BC45/BIN/WORKHELP.HLP new file mode 100644 index 00000000..1a2adc7c Binary files /dev/null and b/BORLAND/BC45/BIN/WORKHELP.HLP differ diff --git a/BORLAND/BC45/BIN/WORKHELP.HLX b/BORLAND/BC45/BIN/WORKHELP.HLX new file mode 100644 index 00000000..ab13eee0 Binary files /dev/null and b/BORLAND/BC45/BIN/WORKHELP.HLX differ diff --git a/BORLAND/BC45/BIN/WORKLIB1.DLL b/BORLAND/BC45/BIN/WORKLIB1.DLL new file mode 100644 index 00000000..c0bd5d35 Binary files /dev/null and b/BORLAND/BC45/BIN/WORKLIB1.DLL differ diff --git a/BORLAND/BC45/BIN/WORKLIB2.DLL b/BORLAND/BC45/BIN/WORKLIB2.DLL new file mode 100644 index 00000000..b80a44e1 Binary files /dev/null and b/BORLAND/BC45/BIN/WORKLIB2.DLL differ diff --git a/BORLAND/BC45/BIN/WORKOP32.DOS b/BORLAND/BC45/BIN/WORKOP32.DOS new file mode 100644 index 00000000..ee6760c5 Binary files /dev/null and b/BORLAND/BC45/BIN/WORKOP32.DOS differ diff --git a/BORLAND/BC45/BIN/WORKOP32.W32 b/BORLAND/BC45/BIN/WORKOP32.W32 new file mode 100644 index 00000000..ff24913b Binary files /dev/null and b/BORLAND/BC45/BIN/WORKOP32.W32 differ diff --git a/BORLAND/BC45/BIN/WORKOPT.DOS b/BORLAND/BC45/BIN/WORKOPT.DOS new file mode 100644 index 00000000..3e6c1a74 Binary files /dev/null and b/BORLAND/BC45/BIN/WORKOPT.DOS differ diff --git a/BORLAND/BC45/BIN/WORKOPT.W32 b/BORLAND/BC45/BIN/WORKOPT.W32 new file mode 100644 index 00000000..b7dec999 Binary files /dev/null and b/BORLAND/BC45/BIN/WORKOPT.W32 differ diff --git a/BORLAND/BC45/BIN/WORKRES.DLL b/BORLAND/BC45/BIN/WORKRES.DLL new file mode 100644 index 00000000..41c79cc5 Binary files /dev/null and b/BORLAND/BC45/BIN/WORKRES.DLL differ diff --git a/BORLAND/BC45/BIN/WORKSHOP.EXE b/BORLAND/BC45/BIN/WORKSHOP.EXE new file mode 100644 index 00000000..2475fcd6 Binary files /dev/null and b/BORLAND/BC45/BIN/WORKSHOP.EXE differ diff --git a/BORLAND/BC45/BIN/WR.EXE b/BORLAND/BC45/BIN/WR.EXE new file mode 100644 index 00000000..d9229533 Binary files /dev/null and b/BORLAND/BC45/BIN/WR.EXE differ diff --git a/BORLAND/BC45/BIN/WRA.STB b/BORLAND/BC45/BIN/WRA.STB new file mode 100644 index 00000000..96f265f4 Binary files /dev/null and b/BORLAND/BC45/BIN/WRA.STB differ diff --git a/BORLAND/BC45/BIN/WREMOTE.EXE b/BORLAND/BC45/BIN/WREMOTE.EXE new file mode 100644 index 00000000..618116d8 Binary files /dev/null and b/BORLAND/BC45/BIN/WREMOTE.EXE differ diff --git a/BORLAND/BC45/BIN/WRSETUP.EXE b/BORLAND/BC45/BIN/WRSETUP.EXE new file mode 100644 index 00000000..0e40d384 Binary files /dev/null and b/BORLAND/BC45/BIN/WRSETUP.EXE differ diff --git a/BORLAND/BC45/BIN/WRW.STB b/BORLAND/BC45/BIN/WRW.STB new file mode 100644 index 00000000..e8c493cd Binary files /dev/null and b/BORLAND/BC45/BIN/WRW.STB differ diff --git a/BORLAND/BC45/BIN/WSIHOOK.DLL b/BORLAND/BC45/BIN/WSIHOOK.DLL new file mode 100644 index 00000000..24e6e514 Binary files /dev/null and b/BORLAND/BC45/BIN/WSIHOOK.DLL differ diff --git a/BORLAND/BC45/BIN/WSIWIN.DLL b/BORLAND/BC45/BIN/WSIWIN.DLL new file mode 100644 index 00000000..d50c4f4a Binary files /dev/null and b/BORLAND/BC45/BIN/WSIWIN.DLL differ diff --git a/BORLAND/BC45/BIN/YESMOUSE.DRV b/BORLAND/BC45/BIN/YESMOUSE.DRV new file mode 100644 index 00000000..47b8ccbc Binary files /dev/null and b/BORLAND/BC45/BIN/YESMOUSE.DRV differ diff --git a/BORLAND/BC45/DOC/BIVBX.WRI b/BORLAND/BC45/DOC/BIVBX.WRI new file mode 100644 index 00000000..33aa9125 Binary files /dev/null and b/BORLAND/BC45/DOC/BIVBX.WRI differ diff --git a/BORLAND/BC45/DOC/COLLECT.TXT b/BORLAND/BC45/DOC/COLLECT.TXT new file mode 100644 index 00000000..c352faf7 --- /dev/null +++ b/BORLAND/BC45/DOC/COLLECT.TXT @@ -0,0 +1,188 @@ +AUTOMATING COLLECTIONS + +Frequently an application organizes data and objects in +collections of various types, such as arrays, containers, +or linked lists, or it utilizes such capabilites inherent in +the operating platform. Collections generally expose an +iterator, a counter, a random-access function, and +optionally methods for managing the collection. Exposing +collections for automation generally involves three steps: + + 1. The collection is exposed as a property which returns + an object. + + 2. A C++ class is created, or enhanced, to support the + collection methods. + + 3. An iterator is defined to provide code to iterate + through the collection. + + +The iterator is internally exposed to the script controller +as a property having the reserved name "_NewEnum" which +returns an object supporting the IENUMVariant interface. +This interface contains methods to perform iteration. With +VisualBasic for Applications, the following syntax is used +for iteration: + + For Each Thing In Owner.Bunch ("Thing" is an arbitrary + iterator name) + Thing.Member...... (can access methods and + properties) + Next Thing (loops through all items + in collection) + +Note that the server can return any data type for items, +values or objects. + + +CREATING C++ CLASSES SPECIFICALLY FOR AUTOMATION + +Frequently C++ classes do not already exist to encapsulate +items to be exposed for automation, such as collections, +simple structures, and system objects represented by +handles. The only C++ methods required are a constructor +and support methods for the exposed automation. Instances +of these classes are exposed as properties of their parent +classes and are constructed as the properties are retrieved +(as opposed to returning references to existing C++ +instances). The constructor must accept a single argument +from the parent class: member data, result of an accessor +function, or the object's this pointer. The parent class +must supply an AUTOxxx macro that supplies this constructor +argument as a data member or function, and declares its +type with the templatized pointer class +TAutoObjectByVal, where T is the new automated C++ +class. TAutoObjectByVal causes an instance of T to be +constructed that persists until all external references to +that instance are released (when the exposed object goes +out of scope in the automation controller). Examples of +the macros used within the DECLARE_AUTOCLASS and +DEFINE_AUTOCLASS sections are given below: + + AUTODATARO(Documents, DocList, TAutoObjectByVal,) + // DocList is a TDocument*, head of a linked list of. + // type TDocument. TDocumentList is a new class, constructor: + // TDocumentList(TDocument*) + EXPOSE_PROPRO(Documents, TDocumentList, "Documents", "Doc Collection", 270) + + AUTOTHIS(Views, TAutoObjectByVal,) + // TViewList is a new class, constructor: TView(TDocument* owner) + // In this case the parent's this pointer is passed to the constuctor + EXPOSE_PROPRO(Views, TViewList, "Views", "View Collection", 240) + + AUTOFUNC0(Buttons, GetWindow(), TAutoObjectByVal, ) + // GetWindow() gets the window handle of the parent window of + // the buttons. TCalcButtons is a new class, constructor: + // TCalcButtons(HWND parent) + EXPOSE_PROPRO(Buttons, TCalcButtons, "Buttons", Button Collection", 170) + + AUTODATARO(MyArray, Elem, TAutoObjectByVal,) + // Elem is an array of shorts, defined as short Elem[COUNT] + // TMyArray is a new class, constructor: TMyArray(short* array) + EXPOSE_PROPRO(MyArray, TMyArray, "Array", "Array as collection", 110) + + +COLLECTION CLASSES + +A C++ class must be defined to host the automation +declarations along with the supporting C++ methods. For +some collections, a C++ class might already exist. Otherwise +one must be defined to represent a collection object. + + +EXPOSING COLLECTION OBJECTS + +EXPOSING ITERATORS + +Iterators are defined for automation using the AUTOITERATOR +macro, which defines the iteration algorithm for the +enclosing collection class. No internal name is supplied, +as only one iterator may exist within a class. The macro +has five arguments, each representing a code fragment, +ordered as in a "for" loop. + + 1. Declaration of state variables, e.g. int Index + 2. Loop initializer assigments, e.g. Index = 0 + 3. Loop entry test boolean expression, e.g. Index < This->Total + 4. Loop iteration statements, e.g. Index++ + 5. Current element access expression, e.g. (This->Array)[Index] + +Commas cannot be used unless inside parentheses. Semicolons +can be used to separate multiple statements, but cannot +be used to end a macro argument. In common with automated +methods, "This" is defined to be the "this" pointer of the +enclosing C++ class, in this case the collection itself. + +The AUTOITERATOR macro generates a nested class definition. +For complex iterators, this class can be specified directly +in C++ as shown below: + + class TIterator : public TAutoIterator { + public: + ThisClass* This; + /* declare state variables here as members */ + void Init() {/* loop initialization function body */} + bool Test() {/* loop entry test function body */} + void Step() {/* loop iteration function body;} + void Return(TAutoVal& v) {/* current element return: v = expr */} + TIterator* Copy() {return new TIterator(*this);} + TIterator(ThisClass* obj, TServedObject& owner) + : This(obj), TAutoIterator(owner) {} + static TAutoIterator* Build(ObjectPtr obj, TServedObject& owner) + { return new TIterator((ThisClass*)obj, owner); } + }; friend class TIterator; + +Iterators are exposed as properties using the +EXPOSE_ITERATOR macro. Note that no internal or external +names are supplied (the external name is internally +hard-wired as "_NewEnum"). The automation type describes the +type of the items returned from the iterator, in the same +manner as a function return. + + AUTOITERATOR(int Index, Index=0, IndexArray)[Index]) + // Array is a member array of shorts for which an iterator + // is defined. It will exposed as a "_NewEnum" property which + // returns an OLE enumerator. + EXPOSE_ITERATOR(TAutoShort, "Array Iterator", HC_ARRAY_ITERATOR) + +In addition to exposing an iterator, a collection class by +convention exposes a "Count" method to return the number of +items in the collections, an "Index" method to randomly +access an element of the collection, and optionally, +methods to externally manage the collection, such as add and +delete. + +____________________________________________________________ + + + ----example code from AutoCalc------ + +class TCalcButtons { + public: + TCalcButtons(HWND window) : HWnd(window) {} + short GetCount() { return IDC_LASTID - IDC_FIRSTID; } + HWND HWnd; + + DECLARE_AUTOCLASS(TCalcButtons) + AUTOFUNC0 (Count, GetCount, short,) + AUTOITERATOR(int Id, Id = IDC_FIRSTID+1, + Id <= IDC_LASTID, Id++, + TAutoObjectByVal(::GetDlgItem(This->HWnd,Id))) +}; + +DEFINE_AUTOCLASS(TCalcButtons) + + EXPOSE_PROPRO(Count, TAutoLong, "!Count","Button Count", + HC_TCALCBUTTONS_COUNT) + EXPOSE_ITERATOR(TCalcButton, "Button Iterator", + HC_TCALCBUTTONS_ITERATOR) + EXPOSE_METHOD_ID(0, Item, TCalcButton,"!Item", + "Button Collection Item", 0) + REQUIRED_ARG(TAutoShort, "!Index") + +END_AUTOCLASS(TCalcButtons, "ButtonCollection", + "Button Collection", HC_TCALCBUTTONS) + + diff --git a/BORLAND/BC45/DOC/COMPAT.TXT b/BORLAND/BC45/DOC/COMPAT.TXT new file mode 100644 index 00000000..5d1aa3ef --- /dev/null +++ b/BORLAND/BC45/DOC/COMPAT.TXT @@ -0,0 +1,423 @@ +COMPAT.TXT - Compatibility Information +(C) Copyright 1995 by Borland International + + +Contents: +======== + Using ObjectWindows 1.0 with Borland C++ 4.5 + Downloading OWL1.PAK + Using Turbo Assembler 4.0 with Borland C++ 4.5 + Using the Object Based Class Library with Borland C++ 4.5 + Using Turbo Vision 1.0x with Borland C++ 4.5 + Using the Paradox Engine and Database Frameworks with BC 4.5 + + +Using ObjectWindows 1.0 with Borland C++ 4.5 +============================================ + +The ObjectWindows 1.0 library can be built with Borland C++ 4.5 for +developing OWL 1.0 native applications. With the increased capacity of the +Borland tools as compared to Borland C++ 3.1, you can now use OWL libraries +with full symbolic debug information and debug your application in either +the Integrated Development Environment or in Tubro Debugger for Windows. + +The overall process requires modifying ObjectWindows source files and +rebuilding the object-based container library as well as ObjectWindows. All +necessary files are contained in OWL1.PAK which is on the Borland C++ +compact disk in the \bc45\install directory. If you obtained Borland C++ on +5-1/4" disks instead of compact disk, you will need to download OWL1.PAK +from Borland's ftp site, local bulletin board, or CompuServe. (See +"Downloading OWL1.PAK".) + +To begin the process, copy OWL1.PAK to the \bc45 directory and use +unpaq.exe (in the \bc45 directory) to extract the files. When using unpaq, +be sure to set: + + Restore directories: checked + Archive name: \bc45\owl1.pak + Destination dir: \bc45 + +Next, select Open archive. By default, all files are selected and if you +de-select any, they will not be installed. Now select Decompress. + +Building and using ObjectWindows and the object-based container library are +described in 1OWL45.TXT which you will now find in the directory +\bc45\source\owl1. + + + +Downloading OWL1.PAK +==================== + +OWL1.PAK can be obtained from the following sources: + + Borland's anonymous ftp site: ftp.borland.com + + CompuServe: !go BCPPWin and look in library 2. + + Borland's Download Bulletin: + The DLBBS can be dialed at 408-431-5096. Simply join the C++ + Conference (number 12). And from the File menu, select download + and enter OWL1.PAK (you do not need to be in the specific file + area). + + +Using Turbo Assembler 4.0 with Borland C++ 4.5 +============================================== +Turbo Assembler 4.0 is fully compatible with Borland C++ 4.5. There is +an error in the WHEREIS example program which will cause two undefined +symbol errors when built. The following corrections will resolve the +problem: + +In file \examples\tasm\whereis\iexedos.asm +line 118, change: +mov es,[es:psp.EnvironmentBlock] +to: +mov es,[es:Psp.EnvironmentBlock] + +line 196, change: +mov ax, [ComSpecSeg] +to: +mov ax, [ComspecSeg] + +In file \examples\tasm\whereis\whereis.asm +line 448, change: +endp main +to: +endp Main + +line 565, change: +call WriteAsciizString,ds,offset Syntax +to: +call WriteASCIIZString,ds,offset Syntax + + +Using the Object Based Class Library with Borland C++ 4.5 +========================================================= + +The object based class library, while still included with Borland C++ +4.5, must be compiled before it can be used. Here are instructions for +doing so: + +There is a makefile in the source directory, \BC45\SOURCE\CLASSLIB which +can be used to build all versions of the class library. For example, to +build a large model static version for use with Object Windows, run the +following command: + + MAKE -DDOS -DOBJECTS "-DBCC=bcc -x-" -DMODEL=l -DNAME=tclassl + +To build a debugging dynamic version of the class library DLL, run the +following command: + + MAKE -DDOS -DDBG -DOBJECTS "-DBCC=bcc -x-" -DDLL -DNAME=tclass + +Note that to successfully use the DLL version of the class library you will +have to copy TCLASS40.DLL from the \BC45\LIB directory into the \BC45\BIN +directory. + + + +Using Turbo Vision 1.0x with Borland C++ 4.5 +============================================ + +REBUILDING THE TURBO VISION LIBRARY: + +Due to changes in the debug information format, symbol length, and +runtime library, the Turbo Vision 1.0 library must be recompiled with +Borland C++ 4.5. Note that Turbo Vision 2.0 is fully compatible with +Borland C++ 4.5 and does not require the modifications in this section. + +There are a few minor changes that need to be made to the source code +before recompiling it with the new compiler. These are due to slightly +tightened syntax restrictions. The makefile will require some +modification as well, which are shown below. + +There are 3 steps to this process: + + 1. Copy the old 3.1 Turbo Vision source into the new BC45 directory + structure. + 2. Make the appropriate changes according to the instructions below. + 3. Run MAKE to build the new Turbo Vision library you need to + continue your work. If you are using Turbo Vision in an overlaid + application, make sure you follow the instructions specific to + overlays. + +These steps are now presented in more detail: Note that the Borland C++ +root directory is assumed to be \BC45. Change this as necessary for your +particular installation. Also, if you are upgrading from Borland C++ +2.0 and have the original version of Turbo Vision, some of the line +numbers mentioned may not accurately reflect your version. + +You need to copy your old Turbo Vision source and include files from +Borland C++ 3.1 into your Borland C++ 4.5 directory hierarchy. To do +this, just run the following command: + + XCOPY \BC31\TVISION \BC45\TVISION /S + +and when it asks you about creating a directory called TVISION, say yes. +Modify the above paths according to your system configuration if +necessary. You are now ready to make the necessary modifications before +rebuilding the library. + +The changes are as follows: + +1. Due to tighter syntax checking, case blocks that declare initialized + local variables need their own scoping block. Make the changes below + in the order shown so that confusion over the correct line numbers + can be avoided. In general, the '{' follows a case statement, and + the '}' follows a break statement. + + COLORSEL.CPP + + Add after line 219: } + Add after line 179: { + Add after line 177: } + Add after line 164: { + + TBUTTON.CPP + + Add after line 226: } + Add after line 211: { + Add after line 209: } + Add after line 192: { + +2. TINPUTLIN.CPP + Replace line 44: if( (p = strchr( s, '~' )) != 0 ) + With if( (p = (char*) strchr( s, '~' )) != 0) + +3. TMNUVIEW.CPP + Replace line 348: char *loc = strchr( p->name, '~' ); + With char *loc = (char*)strchr( p->name, '~' ); + +4. TVWRITE.ASM + Replace line 25: PUBLIC @TView@writeChar$qsszcucs + With PUBLIC @TView@writeChar$qsscucs + + Replace line 27: PUBLIC @TView@writeStr$qssnxzcuc + With PUBLIC @TView@writeStr$qssnxcuc + + Replace line 366: PROC @TView@writeChar$qsszcucs + With PROC @TView@writeChar$qsscucs + + Replace line 436: PROC @TView@writeStr$qssnxzcuc + With PROC @TView@writeStr$qssnxcuc + + Note that all of the above changes simply entail removing + the letter 'z' from the last part of the mangled symbol + name. + +5. MAKEFILE + Replace line 100: + CFLAGS = -c $(CCOVYFLAGS) -P -O1 -m$(MODEL) -I$(INCLUDE) -n$(OBJDIR) + With + CFLAGS = -c -x- $(CCOVYFLAGS) -P -O1 -m$(MODEL) -I$(INCLUDE) -n$(OBJDIR) + + Replace line 73: + TLIB = $(BCROOT)\bin\tlib /0 + With this group of 5 lines: + !ifdef DEBUG + TLIB = $(BCROOT)\bin\tlib + !else + TLIB = $(BCROOT)\bin\tlib /0 + !endif + + *** If you did NOT purchase the Turbo Assembler add-on package for + Borland C++ 4.5, you must make some additional changes. + + Replace the group at lines 259-263: + !if $d(BC) + $(TASM) $&.asm, $(OBJDIR)\$&.obj + !else + copy $(TVLIBDIR)\$&.obj $(OBJDIR) + !endif + With this group: + !if !$d(NOTASM) + $(TASM) $&.asm, $(OBJDIR)\$&.obj + !else + copy $(LIBDIR)\COMPAT\$&.obj $(OBJDIR) + !endif + + Add after line 49: + NOTASM = 1 + + +USE OF EXCEPTION HANDLING WITH TURBO VISION: + +Turbo Vision was designed with its own global new operator. Due to this +internal design you will not be able to use exception handling with the +new operator. However, any other type of exception handling is +supported. In order to enable exception handling do not make the change +to line 88 of the makefile. + + +USE OF OVERLAYS WITH TURBO VISION: + +** Note: All instructions in this section are in addition to the changes +recommended above. + +As with Borland C++ 3.1, Turbo Vision can be used in an overlayed program +if the library is rebuild with certain options, shown below: + + All overlayed modules must be compiled with local virtual tables (-Vs). + + Overlayed modules no longer need to be compiled via assembler (-B). + + Overlayed modules must be compiled with exceptions disabled (-x-). + +Here are the steps required to build an overlayable version of TV.LIB: + +1. First make an additional change to file TVISION\SOURCE\MAKEFILE: + + Change line 96 from : CCOVYFLAGS = -Y -Vs -B + to : CCOVYFLAGS = -Y -Vs + +2. Change to the \BC45\TVISION\LIB directory and make a backup copy of + TV.LIB by typing: + + COPY TV.LIB OLDTV.LIB + +3. Switch to the \BC45\TVISION\SOURCE directory and type: + + MAKE -B -DOVERLAY + +4. This will create a new TV.LIB in the \BC45\TVISION\LIB directory. + There are seven modules in TV.LIB which cannot be overlayed. The + easiest solution to this problem is to create three seperate + libraries. Two libraries will be used when creating overlayed TV + apps, and the original TV.LIB will remain for use in non-overlayed TV + apps: + + TV.LIB - full TV lib for use in non-overlayed TV apps + TVO.LIB - overlayable modules of TV.LIB + TVNO.LIB - non-overlayable modules of TV.LIB + + To create these libraries, switch into the TVISION\LIB directory and + type the following commands: + + TLIB TV.LIB -*SYSERR -*TSCREEN -*DRIVERS -*DRIVERS2 -*SWAPST -*TEVENT -*SYSINT + TLIB TVNO.LIB +SYSERR +TSCREEN +DRIVERS +DRIVERS2 +SWAPST +TEVENT +SYSINT + RENAME TV.LIB TVO.LIB + RENAME TVOLD.LIB TV.LIB + DEL *.OBJ *.BAK + +5. You will now have the three libraries. To create an overlayed Turbo + Vision application, include both TVO.LIB and TVNO.LIB in the project + file or link line of the makefile. Using the local options for each + item, mark TVO.LIB as overlayed and TVNO.LIB as non-overlayed. Also, + go to the TargetExpert dialog box for this target and uncheck the + Turbo Vision Library. + + + +Using the Paradox Engine And Database Frameworks with BC 4.5 +============================================================ + +THE PARADOX ENGINE + +There is only one significant detail regarding the use of the Paradox +Engine 3.0x with Borland C++ 4.5. The BC 3.1 versions of setjump and +longjump will have to be linked into your application in order to create +DOS Paradox Engine and Database Framework applications. The object +module, setjmp.obj, is provided in the BC45\LIB\COMPAT directory. Linking +this module into your application will replace the BC 4.5 version of +these functions. To do this, simply add the file +\BC45\LIB\COMPAT\SETJMP.OBJ to your project file or to the link command +in your makefile. + + +REBUILDING THE DATABASE FRAMEWORKS + +Due to changes in the debug information format, symbol length, and +runtime library, the Database Framework library must be recompiled with +Borland C++ 4.5. + +A number of changes will have to be made to the Paradox Engine DBF v3.01 +makefile in order for it to work with BC 4.5 (this makefile is available +from our local BBS at (408) 431-5096 as the file TI1169.ZIP and from +TechFax at (800) 822-4269, document number 1169): + +1. Copy makefile.bc to make40.mak + +2. Make certain that a turboc.cfg file exists in the BC45\BIN directory + containing: + + -Ic:\bc45\include + -Lc:\bc45\lib + + Make certain that a tlink.cfg file exist in the BC45\BIN directory + containing: + + -Lc:\bc45\lib + + Adjust the above paths to reflect your systems' configuration. + +3. Make the following changes: + + Line 83: Change the 'CCINCLUDE=' line to contain the path to the BC + 4.5 include directory. + Line 168: Delete the blank space at the end of the 'DEBUGFLAG=v ' line + Line 172: Delete the blank space at the end of the 'DYNAMICFLAG=d ' line + Line 202: Add '-DWindows' after '-DWINDOWS' + Line 204: Add '-DWindows' after '-DWINDOWS' + Line 206: Add '-DWindows' after '-DWINDOWS' + Line 239: Replace '$D' with 'BuildDir' + Line 249: Replace '$D' with 'BuildDir' + Line 261: Replace '$D' with 'BuildDir' + +Then use the following command to create a Database Framework Library. +Add one or both of the options -DDBG and -DWINDOWS to add debug info or +build for use in WINDOWS code. (Refer to the makefile for even more +options.) + + make -fmake40.mak + +For example, the following command will create a large model, static +windows DBF library with debug info: + + make -DWINDOWS -DDBG -fmake40.mak + +The libraries will be created in the PXENG30\C\LIB directory. These +libraries are now ready for use in your Database Frameworks Program. + + +CHANGES TO USER CODE WITH RESPECT TO DBF + +The only change to your source code involves the use of the 'new' +operator. In BC++ 4.5, the new operator no longer returns NULL in case +of failure, rather the xalloc exception is thrown. To change this back +so operator new returns NULL, call set_new_handler(0). + +The only remaining issue is with using the new operator in the +constructor of global objects. How do you call set_new_handler(0) +before a global object's constructor is called? This is accomplished by +using a #pragma startup function with a priority higher than that of the +startup function used to call the particular global object's +constructor. The following code shows an example of changing the +behavior of new: + + #include + + void old_new(void) + { + set_new_handler(0); + } + + #pragma startup old_new 31 + + BEngine eng(pxWin); + + int main (void) + { + . + . + . + return 0; + } + +Note that creating global instances of Database Framework objects is not +recommended because it can make error checking difficult. + +The other option is to change the source of the Database Frameworks: Add +the try {} catch(xalloc) clause everywhere that new is called. + + diff --git a/BORLAND/BC45/DOC/EASYWIN.TXT b/BORLAND/BC45/DOC/EASYWIN.TXT new file mode 100644 index 00000000..b902653e --- /dev/null +++ b/BORLAND/BC45/DOC/EASYWIN.TXT @@ -0,0 +1,138 @@ +New Features of EasyWin +======================= +Turbo C++ for Windows provides EasyWin, a feature that lets you +compile standard DOS applications which use traditional TTY style +input and output so they can run as true Windows programs. With +EasyWin, you do not need to change a DOS program to run it under +Windows. + +EasyWin now has support for several new features: + +- Printing support lets you print the contents of the EasyWin window. + +- Viewable scrolling buffer stores either 100 or 400 lines of text + (depending on the memory model). This buffer automatically scrolls + as you move the vertical or horizontal scroll bar thumb tabs. + +- Redirects output to a file of your choice when the buffer runs out + of space. + +- Full Windows Clipboard support, lets you paste to standard input and + copying from the buffer onto the Clipboard, using either the + keyboard or the mouse. + +For additional information about EasyWin, see: + +- Appendix A, "Using EasyWin" in the User's Guide + +- In the online help, Search for "EasyWin" or "DOS applications". + +Printing +-------- +Use the Print command on the system menu to print the contents of an +EasyWin window. It activates the standard Print dialog from which you +can specify printing options. + +By default, EasyWin prints 80 columns and approximately 54 lines on +U.S. Letter size (8.5" x 11") paper. + +Note: The Print command is grayed if you do not have a default + printer installed under Windows. If you have a printer + installed but it is not the default, make it the default + printer before attempting to print from an EasyWin + application. + +Scrolling Buffer +---------------- +EasyWin caches your screen output into a buffer of either: + +- 400 lines (for compact and large memory models) + +- 100 lines (for small and medium memory models) + +You can view the buffer any time by using the scroll bar or any of the +standard window movement keys. + +You can change the buffer size of your EasyWin application by +declaring the following global variable in your main source file with +the appropriate initializer: + +POINT _BufferSize = { X, Y }; + +where: + +X is the number of columns you want. Setting X to a value + other than 80 is not recommended as the results are + unpredictable. + +Y is the number of lines you want. If you need to specify a + value for Y greater than 100, use the compact or large + memory model. The small and medium memory models have + limited local heap space for the buffer. + +Autoscrolling +------------- +If you click and drag either the vertical or horizontal scroll bar +thumb tab, the text in the buffer automatically scrolls up and down or +left and right. This is a useful feature when you want to quickly scan +large amounts of data in the EasyWin window. + +Saving Text in an Output File +----------------------------- +If you want to redirect the output of your program to a file, add the +following global variable to your main source file: + +char *_OutputFileName = "C:\\myoutput.txt"; + +Make _OutputFileName the name of the file in which to store the +redirected output. + +Note: If the output file you specified already exists, it is deleted + without warning. + +Clipboard Support +----------------- +EasyWin lets you to cut, copy, and paste text from an EasyWin +application window. + +To select text, use the Edit command from the system menu and choose +Mark. This puts you in Mark mode. You can use the mouse or the +keyboard to select text. You can move the cursor and select text using +the standard rules and keystrokes for this feature. + +Action Explanation +------ ----------- +Enter Exits Mark mode. Any marked text is copied to the + Clipboard. + +Escape Exits Mark mode. No text is selected. + +Right mouse button same as Enter. + +Edit|Copy same as Enter. + +Edit|Paste pastes text into stdin, receiving the contents of + the Clipboard as input to your program, merging it + with any keyboard input. + +Example +------- +If you are writing a program that requests its data from the keyboard +via scanf, cin, or other similar stdio/conio functions: + +1. Write a data file that contains your entire input. + +2. Load that file into NotePad, select it, and copy it to the + Clipboard. + +3. Run your program, go to the system edit menu, and choose Paste. + +Your program accepts the contents of Clipboard as input. + +Notes: + +- The Paste command is grayed if the Clipboard contains no objects of + type CF_TEXT or if your program has terminated. + +- The Copy command is grayed if you have not selected a block of text. + diff --git a/BORLAND/BC45/DOC/HELPME.WRI b/BORLAND/BC45/DOC/HELPME.WRI new file mode 100644 index 00000000..c8bded6b Binary files /dev/null and b/BORLAND/BC45/DOC/HELPME.WRI differ diff --git a/BORLAND/BC45/DOC/INTLDEMO.TXT b/BORLAND/BC45/DOC/INTLDEMO.TXT new file mode 100644 index 00000000..e4023d04 --- /dev/null +++ b/BORLAND/BC45/DOC/INTLDEMO.TXT @@ -0,0 +1,108 @@ +=========================================================================== +International API +=========================================================================== + + + Borland C++ provides support for international program + development. Currently, support is provided for the + Great Britain and United States English, French, and + German locales. Future releases of Borland C++ will + increase the number of locales supported. + + The LOCALE.BLL Support for these locales is contained in the + file is installed LOCALE.BLL library. By default, the "C" locale is in + in BC45\BIN effect. However, a call to setlocale dynamically links + directory. the LOCALE.BLL library to your program. A locale- + specific module is enabled by a call to setlocale. The + call will also specify which character set to use with + the locale. (Character set is sometimes referred to as + "code page" or "code set.") You can query the locale + settings by using localeconv and setlocale functions. + See the Library Reference, Chapter 3, for a description + of these functions. + + If the call to setlocale can be resolved, several + character-handling functions change their behavior. + Because Borland C++ 4.5 international API currently + supports only 8-bit characters (thereby enabling + recognition of as many as 256 characters), only + single-byte character-handling functions are affected. + The list of affected functions is in the Library + Reference, Chapter 1. + + In your code, you must #define _ _USELOCALES_ _to have + the locale-sensitive functions available. Otherwise, + only the "C" locale macros will be used. + + + The international ======================================================= +API sample program + To illustrate the effects of selecting different + locales, Borland C++ provides a sample program. The + sample program (named INTLDEMO.EXE) is an ObjectWindows + application. All source code and a project file for the + sample are provided. The sample program INTLDEMO (in + BC45\EXAMPLES\WINDOWS\INTLDEMO) demonstrates how the + setlocale function can produce an "internationally + aware" Windows application. You can switch the inter- + face language at run time between English, French, and + German. + + + 1 + + + INTLDEMO displays all of the Windows ANSI character set + (also referred to as the WIN 1252 character set) in a + 16-by-16 character grid. A number of characters are + highlighted according to the selections under the + "Locale" and the "Classification" menus. When you + execute INTLDEMO, the screen shows the default "C" + locale, and the default classification is isalpha. The + highlighted characters are therefore the characters A + to Z and a to z. By selecting another locale (for + example, French) the accented versions of the + characters (for example ‚) are also highlighted. + Various combinations of locale and classification can + be illustrated by selecting the appropriate menu items. + + The results of calling the localeconv function for the + current locale are illustrated by selecting + "Conventions|Show". For example, with the French locale + selected, the international currency symbol becomes FRF + and the currency symbol becomes F. Note that this + window can remain open while either the language or + locale is changed and the values are updated + accordingly. + + The "File|List" menu produces a dialog box that + demonstrates the effects of the locale on collation + sequences and on date and time functions. The files in + the current directory are shown sorted according to the + current locale, and with date and times displayed + according to the conventions and in the language of the + selected locale. File names can be switched between + upper/lower case to demonstrate the effects of the + toupper and tolower functions in the current locale. + The dialog also illustrates the effects of the + BWCCIntlInit function on the Ok, Cancel and Help + buttons of the dialog. Any file can be selected to be + viewed and its contents similarly sorted according to + the current locale collation sequence. + + The "Language" menu allows the language of the UI to be + changed "on the fly." This feature uses ObjectWindow's + ability to associate windows interface elements to a + module, in this case a .DLL that contains the resources + in a particular language. When the language is changed, + a new language .DLL is loaded and the interface + elements are reloaded from that .DLL. Note that the + date and times in the File List dialog are not affected + by the change in language, but by the choice of locale. + + The 'Classification' menu shows a list of the locale- + sensitive isxxx() functions. Selecting one of these + items will cause the characters that return true for + this function in the current locale to be highlighted + in the main window. + diff --git a/BORLAND/BC45/DOC/OLE_ERRS.TXT b/BORLAND/BC45/DOC/OLE_ERRS.TXT new file mode 100644 index 00000000..aae6d9eb --- /dev/null +++ b/BORLAND/BC45/DOC/OLE_ERRS.TXT @@ -0,0 +1,288 @@ +// These error codes have been taken from the OLE header files and sorted +// into numerical order. The comments too come from the OLE header files. +// +// This list is provided as a convenience for interpreting OLE error +// codes when functions fail. + +#define S_OK 0x00000000 +#define S_FALSE 0x00000001 +#define STG_S_CONVERTED 0x00030200 +#define OLE_S_FIRST 0x00040000 // all interfaces +#define OLE_S_USEREG 0x00040000 // use the reg database to provide the requested info +#define OLE_S_STATIC 0x00040001 // success, but static +#define OLE_S_MAC_CLIPFORMAT 0x00040002 // macintosh clipboard format +#define OLE_S_LAST 0x000400FF +#define DRAGDROP_S_DROP 0x00040100 +#define DRAGDROP_S_CANCEL 0x00040101 +#define DRAGDROP_S_USEDEFAULTCURSORS 0x00040102 +#define CLASSFACTORY_S_FIRST 0x00040110 // IClassFactory +#define CLASSFACTORY_S_LAST 0x0004011F +#define MARSHAL_S_FIRST 0x00040120 // IMarshal, IStdMarshalInfo, marshal APIs +#define MARSHAL_S_LAST 0x0004012F +#define DATA_S_SAMEFORMATETC 0x00040130 +#define DATA_S_FIRST 0x00040130 // IDataObject +#define DATA_S_LAST 0x0004013F +#define VIEW_S_FIRST 0x00040140 // IViewObject +#define VIEW_S_LAST 0x0004014F +#define REGDB_S_FIRST 0x00040150 // reg.dat manipulation API +#define REGDB_S_LAST 0x0004015F +#define CACHE_S_FORMATETC_NOTSUPPORTED 0x00040170 +#define CACHE_S_FIRST 0x00040170 // IOleCache +#define CACHE_S_SAMECACHE 0x00040171 +#define CACHE_S_SOMECACHES_NOTUPDATED 0x00040172 +#define CACHE_S_LAST 0x0004017F +#define OLEOBJ_S_FIRST 0x00040180 // IOleObject +#define OLEOBJ_S_CANNOT_DOVERB_NOW 0x00040181 +#define OLEOBJ_S_INVALIDHWND 0x00040182 +#define OLEOBJ_S_LAST 0x0004018F +#define CLIENTSITE_S_FIRST 0x00040190 // IOleClientSite +#define CLIENTSITE_S_LAST 0x0004019F +#define INPLACE_S_FIRST 0x000401A0 // IOleWindow,IOleInPlaceObject,IOleInPlaceActiveObject +#define INPLACE_S_TRUNCATED 0x000401A0 // Message is too long, some of it had to be truncated before displaying +#define INPLACE_S_LAST 0x000401AF // IOleInPlaceUIWindow,IOleInPlaceFrame,IOleInPlaceSite +#define ENUM_S_FIRST 0x000401B0 // IEnum* +#define ENUM_S_LAST 0x000401BF +#define CONVERT10_S_FIRST 0x000401C0 // OleConvertOLESTREAMToIStorage, OleConvertIStorageToOLESTREAM +#define CONVERT10_S_NO_PRESENTATION 0x000401C0 // Returned by either API, the original object had no presentation +#define CONVERT10_S_LAST 0x000401CF +#define CLIPBRD_S_FIRST 0x000401D0 // OleSetClipboard, OleGetClipboard, OleFlushClipboard +#define CLIPBRD_S_LAST 0x000401DF +#define MK_S_FIRST 0x000401E0 // IMoniker, IBindCtx, IRunningObjectTable, IParseDisplayName +#define MK_S_REDUCED_TO_SELF 0x000401E2 +#define MK_S_ME 0x000401E4 +#define MK_S_HIM 0x000401E5 +#define MK_S_US 0x000401E6 +#define MK_S_MONIKERALREADYREGISTERED 0x000401E7 +#define MK_S_LAST 0x000401EF // IOleContainer, IOleItemContainer, IOleLink +#define CO_S_FIRST 0x000401F0 // all Co* API +#define CO_S_LAST 0x000401FF +#define E_NOTIMPL 0x80000001 // not implemented +#define E_OUTOFMEMORY 0x80000002 // ran out of memory +#define E_INVALIDARG 0x80000003 // one or more arguments are invalid +#define E_NOINTERFACE 0x80000004 // no such interface supported +#define E_POINTER 0x80000005 // invalid pointer +#define E_HANDLE 0x80000006 // invalid handle +#define E_ABORT 0x80000007 // operation aborted +#define E_FAIL 0x80000008 // unspecified error +#define E_ACCESSDENIED 0x80000009 // general access denied error +#define E_UNEXPECTED 0x8000FFFF // relatively catastrophic failure +#define RPC_E_CALL_REJECTED 0x80010001 // call was rejected by callee +#define RPC_E_CALL_CANCELED 0x80010002 // call was canceld by call - returned by MessagePending +#define RPC_E_CANTPOST_INSENDCALL 0x80010003 // the caller is dispatching an intertask SendMessage call and can NOT call out via PostMessage +#define RPC_E_CANTCALLOUT_INASYNCCALL 0x80010004 // the caller is dispatching an asynchronus call can NOT make an outgoing call on behalf of this call +#define RPC_E_CANTCALLOUT_INEXTERNALCALL 0x80010005 // the caller is not in a state where an outgoing call can be made +#define RPC_E_CONNECTION_TERMINATED 0x80010006 // the connection terminated or is in a bogus state +#define RPC_E_SERVER_DIED 0x80010007 // the callee (server [not server application]) is not available +#define RPC_E_CLIENT_DIED 0x80010008 // the caller (client) disappeared while the callee (server) was processing a call +#define RPC_E_INVALID_DATAPACKET 0x80010009 // the date paket with the marshalled parameter data is incorrect +#define RPC_E_CANTTRANSMIT_CALL 0x8001000A // the call was not transmitted properly; the message queue was full and was not emptied after yielding +#define RPC_E_CLIENT_CANTMARSHAL_DATA 0x8001000B // the client (caller) can not marshall the parameter data +#define RPC_E_CLIENT_CANTUNMARSHAL_DATA 0x8001000C // the client (caller) can not unmarshall the return data +#define RPC_E_SERVER_CANTMARSHAL_DATA 0x8001000D // the server (caller) can not unmarshall the parameter data +#define RPC_E_SERVER_CANTUNMARSHAL_DATA 0x8001000E // the server (caller) can not marshall the return data - low memory +#define RPC_E_INVALID_DATA 0x8001000F // received data are invalid; can be server or client data +#define RPC_E_INVALID_PARAMETER 0x80010010 // a particular parameter is invalid and can not be un/marshalled +#define RPC_E_CANTCALLOUT_AGAIN 0x80010011 // DDE conversation - no second outgoing call on same channel +#define RPC_E_UNEXPECTED 0x8001FFFF // a internal error occured +#define DISP_E_UNKNOWNINTERFACE 0x80020001 +#define DISP_E_MEMBERNOTFOUND 0x80020003 +#define DISP_E_PARAMNOTFOUND 0x80020004 +#define DISP_E_TYPEMISMATCH 0x80020005 +#define DISP_E_UNKNOWNNAME 0x80020006 +#define DISP_E_NONAMEDARGS 0x80020007 +#define DISP_E_BADVARTYPE 0x80020008 +#define DISP_E_EXCEPTION 0x80020009 +#define DISP_E_OVERFLOW 0x8002000A +#define DISP_E_BADINDEX 0x8002000B +#define DISP_E_UNKNOWNLCID 0x8002000C +#define DISP_E_ARRAYISLOCKED 0x8002000D +#define DISP_E_BADPARAMCOUNT 0x8002000E +#define DISP_E_PARAMNOTOPTIONAL 0x8002000F +#define DISP_E_BADCALLEE 0x80020010 +#define DISP_E_NOTACOLLECTION 0x80020011 +#define TYPE_E_BUFFERTOOSMALL 0x80028016 +#define TYPE_E_INVDATAREAD 0x80028018 +#define TYPE_E_UNSUPFORMAT 0x80028019 +#define TYPE_E_REGISTRYACCESS 0x8002801C +#define TYPE_E_LIBNOTREGISTERED 0x8002801D +#define TYPE_E_UNDEFINEDTYPE 0x80028027 +#define TYPE_E_QUALIFIEDNAMEDISALLOWED 0x80028028 +#define TYPE_E_INVALIDSTATE 0x80028029 +#define TYPE_E_WRONGTYPEKIND 0x8002802A +#define TYPE_E_ELEMENTNOTFOUND 0x8002802B +#define TYPE_E_AMBIGUOUSNAME 0x8002802C +#define TYPE_E_NAMECONFLICT 0x8002802D +#define TYPE_E_UNKNOWNLCID 0x8002802E +#define TYPE_E_DLLFUNCTIONNOTFOUND 0x8002802F +#define TYPE_E_BADMODULEKIND 0x800288BD +#define TYPE_E_SIZETOOBIG 0x800288C5 +#define TYPE_E_DUPLICATEID 0x800288C6 +#define TYPE_E_TYPEMISMATCH 0x80028CA0 +#define TYPE_E_OUTOFBOUNDS 0x80028CA1 +#define TYPE_E_IOERROR 0x80028CA2 +#define TYPE_E_CANTCREATETMPFILE 0x80028CA3 +#define TYPE_E_CANTLOADLIBRARY 0x80029C4A +#define TYPE_E_INCONSISTENTPROPFUNCS 0x80029C83 +#define TYPE_E_CIRCULARTYPE 0x80029C84 +#define STG_E_INVALIDFUNCTION 0x80030001 +#define STG_E_FILENOTFOUND 0x80030002 +#define STG_E_PATHNOTFOUND 0x80030003 +#define STG_E_TOOMANYOPENFILES 0x80030004 +#define STG_E_ACCESSDENIED 0x80030005 +#define STG_E_INVALIDHANDLE 0x80030006 +#define STG_E_INSUFFICIENTMEMORY 0x80030008 +#define STG_E_INVALIDPOINTER 0x80030009 +#define STG_E_NOMOREFILES 0x80030012 +#define STG_E_DISKISWRITEPROTECTED 0x80030013 +#define STG_E_SEEKERROR 0x80030019 +#define STG_E_WRITEFAULT 0x8003001D +#define STG_E_READFAULT 0x8003001E +#define STG_E_SHAREVIOLATION 0x80030020 +#define STG_E_LOCKVIOLATION 0x80030021 +#define STG_E_FILEALREADYEXISTS 0x80030050 +#define STG_E_INVALIDPARAMETER 0x80030057 +#define STG_E_MEDIUMFULL 0x80030070 +#define STG_E_ABNORMALAPIEXIT 0x800300FA +#define STG_E_INVALIDHEADER 0x800300FB +#define STG_E_INVALIDNAME 0x800300FC +#define STG_E_UNKNOWN 0x800300FD +#define STG_E_UNIMPLEMENTEDFUNCTION 0x800300FE +#define STG_E_INVALIDFLAG 0x800300FF +#define STG_E_INUSE 0x80030100 +#define STG_E_NOTCURRENT 0x80030101 +#define STG_E_REVERTED 0x80030102 +#define STG_E_CANTSAVE 0x80030103 +#define STG_E_OLDFORMAT 0x80030104 +#define STG_E_OLDDLL 0x80030105 +#define STG_E_SHAREREQUIRED 0x80030106 +#define STG_E_NOTFILEBASEDSTORAGE 0x80030107 +#define STG_E_EXTANTMARSHALLINGS 0x80030108 +#define OLE_E_FIRST 0x80040000 // all interfaces +#define OLE_E_OLEVERB 0x80040000 // invalid OLEVERB structure +#define OLE_E_ADVF 0x80040001 // invalid advise flags +#define OLE_E_ENUM_NOMORE 0x80040002 // you can't enuemrate any more, because the associated data is missing +#define OLE_E_ADVISENOTSUPPORTED 0x80040003 // this implementation doesn't take advises +#define OLE_E_NOCONNECTION 0x80040004 // there is no connection for this connection id +#define OLE_E_NOTRUNNING 0x80040005 // need run the object to perform this operation +#define OLE_E_NOCACHE 0x80040006 // there is no cache to operate on +#define OLE_E_BLANK 0x80040007 // Uninitialized object +#define OLE_E_CLASSDIFF 0x80040008 // linked object's source class has changed +#define OLE_E_CANT_GETMONIKER 0x80040009 // not able to get the moniker of the object +#define OLE_E_CANT_BINDTOSOURCE 0x8004000A // not able to bind to the source +#define OLE_E_STATIC 0x8004000B // object is static, operation not allowed +#define OLE_E_PROMPTSAVECANCELLED 0x8004000C // user cancelled out of save dialog +#define OLE_E_INVALIDRECT 0x8004000D // invalid rectangle +#define OLE_E_WRONGCOMPOBJ 0x8004000E // compobj.dll is too old for the ole2.dll initialized +#define OLE_E_INVALIDHWND 0x8004000F // invalid window handle +#define OLE_E_NOT_INPLACEACTIVE 0x80040010 // object is not in any of the inplace active states +#define OLE_E_CANTCONVERT 0x80040011 // not able to convert the object +#define OLE_E_NOSTORAGE 0x80040012 // not able to perform the operation because object is not given storage yet. +#define DVGEN_E_FIRST 0x80040064 // (OLE_E_FIRST+100) Might move to FACILITY_NULL +#define DV_E_FORMATETC 0x80040064 // invalid FORMATETC structure +#define DV_E_DVTARGETDEVICE 0x80040065 // invalid DVTARGETDEVICE structure +#define DV_E_STGMEDIUM 0x80040066 // invalid STDGMEDIUM structure +#define DV_E_STATDATA 0x80040067 // invalid STATDATA structure +#define DV_E_LINDEX 0x80040068 // invalid lindex +#define DV_E_TYMED 0x80040069 // invalid tymed +#define DV_E_CLIPFORMAT 0x8004006A // invalid clipboard format +#define DV_E_DVASPECT 0x8004006B // invalid aspect(s) +#define DV_E_DVTARGETDEVICE_SIZE 0x8004006C // tdSize paramter of the DVTARGETDEVICE structure is invalid +#define DV_E_NOIVIEWOBJECT 0x8004006D // object doesn't support IViewObject interface +#define OLE_E_LAST 0x800400FF +#define DRAGDROP_E_FIRST 0x80040100 // IDropSource, IDropTarget +#define DRAGDROP_S_FIRST 0x80040100 // IDropSource, IDropTarget +#define DRAGDROP_E_INVALIDHWND 0x80040100 // invalid HWND +#define DRAGDROP_E_ALREADYREGISTERED 0x80040100 // this window has already been registered as a drop target +#define DRAGDROP_E_NOTREGISTERED 0x80040100 // trying to revoke a drop target that has not been registered +#define DRAGDROP_E_LAST 0x8004010F +#define DRAGDROP_S_LAST 0x8004010F +#define CLASS_E_NOAGGREGATION 0x80040110 // class does not support aggregation (or class object is remote) +#define CLASSFACTORY_E_FIRST 0x80040110 // IClassFactory +#define CLASS_E_CLASSNOTAVAILABLE 0x80040111 // dll doesn't support that class (returned from DllGetClassObject) +#define CLASSFACTORY_E_LAST 0x8004011F +#define MARSHAL_E_FIRST 0x80040120 // IMarshal, IStdMarshalInfo, marshal APIs +#define MARSHAL_E_LAST 0x8004012F +#define DATA_E_FIRST 0x80040130 // IDataObject +#define DATA_E_LAST 0x8004013F +#define VIEW_E_DRAW 0x80040140 +#define VIEW_E_FIRST 0x80040140 // IViewObject +#define VIEW_E_LAST 0x8004014F +#define REGDB_E_FIRST 0x80040150 // reg.dat manipulation API +#define REGDB_E_READREGDB 0x80040150 // some error reading the registration database +#define REGDB_E_WRITEREGDB 0x80040151 // some error reading the registration database +#define REGDB_E_KEYMISSING 0x80040152 // some error reading the registration database +#define REGDB_E_INVALIDVALUE 0x80040153 // some error reading the registration database +#define REGDB_E_CLASSNOTREG 0x80040154 // some error reading the registration database +#define REGDB_E_IIDNOTREG 0x80040155 // some error reading the registration database +#define REGDB_E_LAST 0x8004015F +#define CACHE_E_NOCACHE_UPDATED 0x80040170 +#define CACHE_E_FIRST 0x80040170 // IOleCache +#define CACHE_E_LAST 0x8004017F +#define OLEOBJ_E_NOVERBS 0x80040180 +#define OLEOBJ_S_INVALIDVERB 0x80040180 +#define OLEOBJ_E_FIRST 0x80040180 // IOleObject +#define OLEOBJ_E_INVALIDVERB 0x80040181 +#define OLEOBJ_E_LAST 0x8004018F +#define CLIENTSITE_E_FIRST 0x80040190 // IOleClientSite +#define CLIENTSITE_E_LAST 0x8004019F +#define INPLACE_E_FIRST 0x800401A0 // IOleWindow,IOleInPlaceObject,IOleInPlaceActiveObject +#define INPLACE_E_NOTUNDOABLE 0x800401A0 // undo is not avaiable +#define INPLACE_E_NOTOOLSPACE 0x800401A1 // Space for tools is not available +#define INPLACE_E_LAST 0x800401AF // IOleInPlaceUIWindow,IOleInPlaceFrame,IOleInPlaceSite +#define ENUM_E_FIRST 0x800401B0 // IEnum* +#define ENUM_E_LAST 0x800401BF +#define CONVERT10_E_FIRST 0x800401C0 // OleConvertOLESTREAMToIStorage, OleConvertIStorageToOLESTREAM +#define CONVERT10_E_OLESTREAM_GET 0x800401C0 // OLESTREAM Get method failed +#define CONVERT10_E_OLESTREAM_PUT 0x800401C1 // OLESTREAM Put method failed +#define CONVERT10_E_OLESTREAM_FMT 0x800401C2 // Contents of the OLESTREAM not in correct format +#define CONVERT10_E_OLESTREAM_BITMAP_TO_DIB 0x800401C3 // There was in an error in a Windows GDI call while converting the bitmap to a DIB +#define CONVERT10_E_STG_FMT 0x800401C4 // Contents of the IStorage not in correct format +#define CONVERT10_E_STG_NO_STD_STREAM 0x800401C5 // Contents of IStorage is missing one of the standard streams ("\1CompObj", "\1Ole", "\2OlePres000") +#define CONVERT10_E_STG_DIB_TO_BITMAP 0x800401C6 // There was in an error in a Windows GDI call while converting the DIB to a bitmap +#define CONVERT10_E_LAST 0x800401CF +#define CLIPBRD_E_FIRST 0x800401D0 // OleSetClipboard, OleGetClipboard, OleFlushClipboard +#define CLIPBRD_E_CANT_OPEN 0x800401D0 // OpenClipboard Failed +#define CLIPBRD_E_CANT_EMPTY 0x800401D1 // EmptyClipboard Failed +#define CLIPBRD_E_CANT_SET 0x800401D2 // SetClipboard Failed +#define CLIPBRD_E_BAD_DATA 0x800401D3 // Data on clipboard is invalid +#define CLIPBRD_E_CANT_CLOSE 0x800401D4 // OpenClipboard Failed +#define CLIPBRD_E_LAST 0x800401DF +#define MK_E_CONNECTMANUALLY 0x800401E0 +#define MK_E_FIRST 0x800401E0 // IMoniker, IBindCtx, IRunningObjectTable, IParseDisplayName +#define MK_E_EXCEEDEDDEADLINE 0x800401E1 +#define MK_E_NEEDGENERIC 0x800401E2 +#define MK_E_UNAVAILABLE 0x800401E3 +#define MK_E_SYNTAX 0x800401E4 +#define MK_E_NOOBJECT 0x800401E5 +#define MK_E_INVALIDEXTENSION 0x800401E6 +#define MK_E_INTERMEDIATEINTERFACENOTSUPPORTED 0x800401E7 +#define MK_E_NOTBINDABLE 0x800401E8 +#define MK_E_NOTBOUND 0x800401E9 // called IBindCtx->RevokeObjectBound for an object which was not bound +#define MK_E_CANTOPENFILE 0x800401EA +#define MK_E_MUSTBOTHERUSER 0x800401EB +#define MK_E_NOINVERSE 0x800401EC +#define MK_E_NOSTORAGE 0x800401ED +#define MK_E_NOPREFIX 0x800401EE +#define MK_E_LAST 0x800401EF // IOleContainer, IOleItemContainer, IOleLink +#define CO_E_FIRST 0x800401F0 // all Co* API +#define CO_E_NOTINITIALIZED 0x800401F0 // CoInitialize has not been called and must be +#define CO_E_ALREADYINITIALIZED 0x800401F1 // CoInitialize has already been called and cannot be called again (temporary) +#define CO_E_CANTDETERMINECLASS 0x800401F2 // can't determine clsid (e.g., extension not in reg.dat) +#define CO_E_CLASSSTRING 0x800401F3 // the string form of the clsid is invalid (including ole1 classes) +#define CO_E_IIDSTRING 0x800401F4 // the string form of the iid is invalid +#define CO_E_APPNOTFOUND 0x800401F5 // application not found +#define CO_E_APPSINGLEUSE 0x800401F6 // application cannot be run more than once +#define CO_E_ERRORINAPP 0x800401F7 // some error in the app program file +#define CO_E_DLLNOTFOUND 0x800401F8 // dll not found +#define CO_E_ERRORINDLL 0x800401F9 // some error in the dll file +#define CO_E_WRONGOSFORAPP 0x800401FA // app written for other version of OS or other OS altogether +#define CO_E_OBJNOTREG 0x800401FB // object is not registered +#define CO_E_OBJISREG 0x800401FC // object is already registered +#define CO_E_OBJNOTCONNECTED 0x800401FD // handler is not connected to server +#define CO_E_APPDIDNTREG 0x800401FE // app was launched, but didn't registered a class factory +#define CO_E_LAST 0x800401FF +#define FACILITY_NULL 0 // generally useful errors ([SE]_*) +#define FACILITY_RPC 1 // remote procedure call errors (RPC_E_*) +#define FACILITY_DISPATCH 2 // late binding dispatch errors +#define FACILITY_STORAGE 3 // storage errors (STG_E_*) +#define FACILITY_ITF 4 // interface-specific errors diff --git a/BORLAND/BC45/DOC/OWLDOC.WRI b/BORLAND/BC45/DOC/OWLDOC.WRI new file mode 100644 index 00000000..6310ece1 Binary files /dev/null and b/BORLAND/BC45/DOC/OWLDOC.WRI differ diff --git a/BORLAND/BC45/DOC/PE.TXT b/BORLAND/BC45/DOC/PE.TXT new file mode 100644 index 00000000..69e19e41 --- /dev/null +++ b/BORLAND/BC45/DOC/PE.TXT @@ -0,0 +1,1253 @@ + + PORTABLE EXECUTABLE FORMAT + + Author: Micheal J. O'Leary + + + Preface + + This document was edited and released by Microsoft Developer + Support. It describes the binary portable executable format for NT. + The information is provided at this point because we feel it will + make the work of application development easier. Unfortunately, the + information in this document may change before the final release of + Windows NT. Microsoft is NOT committing to stay with these formats + by releasing this document. Questions or follow-ups for any of the + information presented here should be posted to CompuServe MSWIN32 + forum, section 6. + --Steve Firebaugh + Microsoft Developer Support + + + +Contents + + 1. Overview + + 2. PE Header + + 3. Object Table + + 4. Image Pages + + 5. Exports + 5.1 Export Directory Table + 5.2 Export Address Table + 5.3 Export Name Table Pointers + 5.4 Export Ordinal Table + 5.5 Export Name Table + + 6. Imports + 6.1 Import Directory Table + 6.2 Import Lookup Table + 6.3 Hint-Name Table + 6.4 Import Address Table + + 7. Thread Local Storage + 7.1 Thread Local Storage Directory Table + 7.2 Thread Local Storage CallBack Table + + 8. Resources + 8.1 Resource Directory Table + 8.2 Resource Example + + 9. Fixup Table + 9.1 Fixup Block + + 10. Debug Information + 10.1 Debug Directory + + + +1. Overview + + ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ <ÄÄ¿ <ÄÄÄÄÄ Base of Image Header + ³ DOS 2 Compatible ³ ³ + ³ EXE Header ³ ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³ + ³ unused ³ ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³ + ³ OEM Identifier ³ ³ + ³ OEM Info ³ ³ + ³ ³ ³ DOS 2.0 Section + ³ Offset to ³ ³ (for DOS compatibility only) + ³ PE Header ³ ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³ + ³ DOS 2.0 Stub ³ ³ + ³ Program & ³ ³ + ³ Reloc. Table ³ ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ <ÄÄÙ + ³ unused ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ <ÄÄÄÄÄÄÄÄÄ Aligned on 8 byte boundary + ³ PE Header ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ Object Table ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ Image Pages ³ + ³ import info ³ + ³ export info ³ + ³ fixup info ³ + ³ resource info³ + ³ debug info ³ + ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ + +Figure 1. A typical 32-bit Portable EXE File Layout + + + +2. PE Header + + + ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ + ³ SIGNATURE BYTES ³ CPU TYPE ³ # OBJECTS ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ TIME/DATE STAMP ³ RESERVED ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ RESERVED ³ NT HDR SIZE³ FLAGS ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÂÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ RESERVED ³LMAJOR³LMINOR³ RESERVED ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÁÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ RESERVED ³ RESERVED ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ ENTRYPOINT RVA ³ RESERVED ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ RESERVED ³ IMAGE BASE ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ OBJECT ALIGN ³ FILE ALIGN ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ OS MAJOR ³ OS MINOR ³USER MAJOR ³USER MINOR ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ SUBSYS MAJOR³ SUBSYS MINOR³ RESERVED ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ IMAGE SIZE ³ HEADER SIZE ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ FILE CHECKSUM ³ SUBSYSTEM ³ DLL FLAGS ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ STACK RESERVE SIZE ³ STACK COMMIT SIZE ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ HEAP RESERVE SIZE ³ HEAP COMMIT SIZE ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ RESERVED ³ # INTERESTING RVA/SIZES ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ EXPORT TABLE RVA ³ TOTAL EXPORT DATA SIZE ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ IMPORT TABLE RVA ³ TOTAL IMPORT DATA SIZE ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ RESOURCE TABLE RVA ³ TOTAL RESOURCE DATA SIZE ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ EXCEPTION TABLE RVA ³ TOTAL EXCEPTION DATA SIZE³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ SECURITY TABLE RVA ³ TOTAL SECURITY DATA SIZE ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ FIXUP TABLE RVA ³ TOTAL FIXUP DATA SIZE ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ DEBUG TABLE RVA ³ TOTAL DEBUG DIRECTORIES ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ IMAGE DESCRIPTION RVA ³ TOTAL DESCRIPTION SIZE ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ MACHINE SPECIFIC RVA ³ MACHINE SPECIFIC SIZE ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ THREAD LOCAL STORAGE RVA ³ TOTAL TLS SIZE ³ + ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ + +Figure 2. PE Header + +Notes: + + o A VA is a virtual address that is already biased by the Image + Base found in the PE Header. A RVA is a virtual address that is + relative to the Image Base. + + o An RVA in the PE Header which has a value of zero indicates the + field isn't used. + + o Image pages are aligned and zero padded to a File Align + boundary. The bases of all other tables and structures must be + aligned on DWORD (4 byte) boundary. Thus, all VA's and RVA's + must be on a 32 bit boundary. All table and structure fields + must be aligned on their "natural" boundaries, with the possible + exception of the Debug Info. + +SIGNATURE BYTES = DB * 4. +Current value is "PE/0/0". Thats PE followed by two zeros (nulls). + +CPU TYPE = DW CPU Type. +This field specifies the type of CPU compatibility required by this +image to run. The values are: + + o 0000h __unknown + + o 014Ch __80386 + + o 014Dh __80486 + + o 014Eh __80586 + + o 0162h __MIPS Mark I (R2000, R3000) + + o 0163h __MIPS Mark II (R6000) + + o 0166h __MIPS Mark III (R4000) + +# OBJECTS = DW Number of object entries. +This field specifies the number of entries in the Object Table. + +TIME/DATE STAMP = DD Used to store the time and date the file was +created or modified by the linker. + +NT HDR SIZE = DW This is the number of remaining bytes in the NT +header that follow the FLAGS field. + +FLAGS = DW Flag bits for the image. +The flag bits have the following definitons: + + o 0000h __Program image. + + o 0002h __Image is executable. + If this bit isn't set, then it indicates that either errors + where detected at link time or that the image is being + incrementally linked and therefore can't be loaded. + + o 0200h __Fixed. + Indicates that if the image can't be loaded at the Image Base, + then don't load it. + + o 2000h __Library image. + +LMAJOR/LMINOR = DB Linker major/minor version number. + +ENTRYPOINT RVA = DD Entrypoint relative virtual address. +The address is relative to the Image Base. The address is the +starting address for program images and the library initialization +and library termination address for library images. + +IMAGE BASE = DD The virtual base of the image. +This will be the virtual address of the first byte of the file (Dos +Header). This must be a multiple of 64K. + +OBJECT ALIGN = DD The alignment of the objects. This must be a power +of 2 between 512 and 256M inclusive. The default is 64K. + +FILE ALIGN = DD Alignment factor used to align image pages. The +alignment factor (in bytes) used to align the base of the image pages +and to determine the granularity of per-object trailing zero pad. +Larger alignment factors will cost more file space; smaller alignment +factors will impact demand load performance, perhaps significantly. +Of the two, wasting file space is preferable. This value should be a +power of 2 between 512 and 64K inclusive. + +OS MAJOR/MINOR = DW OS version number required to run this image. + +USER MAJOR/MINOR # = DW User major/minor version number. +This is useful for differentiating between revisions of +images/dynamic linked libraries. The values are specified at link +time by the user. + +SUBSYS MAJOR/MINOR # = DW Subsystem major/minor version number. + +IMAGE SIZE = DD The virtual size (in bytes) of the image. +This includes all headers. The total image size must be a multiple +of Object Align. + +HEADER SIZE = DD Total header size. +The combined size of the Dos Header, PE Header and Object Table. + +FILE CHECKSUM = DD Checksum for entire file. Set to 0 by the linker. + +SUBSYSTEM = DW NT Subsystem required to run this image. +The values are: + + o 0000h __Unknown + + o 0001h __Native + + o 0002h __Windows GUI + + o 0003h __Windows Character + + o 0005h __OS/2 Character + + o 0007h __Posix Character + +DLL FLAGS = DW Indicates special loader requirements. +This flag has the following bit values: + + o 0001h __Per-Process Library Initialization. + + o 0002h __Per-Process Library Termination. + + o 0004h __Per-Thread Library Initialization. + + o 0008h __Per-Thread Library Termination. + +All other bits are reserved for future use and should be set to zero. + +STACK RESERVE SIZE = DD Stack size needed for image. +The memory is reserved, but only the STACK COMMIT SIZE is committed. +The next page of the stack is a 'guarded page'. When the application +hits the guarded page, the guarded page becomes valid, and the next +page becomes the guarded page. This continues until the RESERVE SIZE +is reached. + +STACK COMMIT SIZE = DD Stack commit size. + +HEAP RESERVE SIZE = DD Size of local heap to reserve. + +HEAP COMMIT SIZE = DD Amount to commit in local heap. + +# INTERESTING VA/SIZES = DD Indicates the size of the VA/SIZE array +that follows. + +EXPORT TABLE RVA = DD Relative Virtual Address of the Export Table. +This address is relative to the Image Base. + +IMPORT TABLE RVA = DD Relative Virtual Address of the Import Table. +This address is relative to the Image Base. + +RESOURCE TABLE RVA = DD Relative Virtual Address of the Resource +Table. This address is relative to the Image Base. + +EXCEPTION TABLE RVA = DD Relative Virtual Address of the Exception +Table. This address is relative to the Image Base. + +SECURITY TABLE RVA = DD Relative Virtual Address of the Security +Table. This address is relative to the Image Base. + +FIXUP TABLE RVA = DD Relative Virtual Address of the Fixup Table. +This address is relative to the Image Base. + +DEBUG TABLE RVA = DD Relative Virtual Address of the Debug Table. +This address is relative to the Image Base. + +IMAGE DESCRIPTION RVA = DD Relative Virtual Address of the +description string specified in the module definiton file. + +MACHINE SPECIFIC RVA = DD Relative Virtual Address of a machine +specific value. This address is relative to the Image Base. + +TOTAL EXPORT DATA SIZE = DD Total size of the export data. + +TOTAL IMPORT DATA SIZE = DD Total size of the import data. + +TOTAL RESOURCE DATA SIZE = DD Total size of the resource data. + +TOTAL EXCEPTION DATA SIZE = DD Total size of the exception data. + +TOTAL SECURITY DATA SIZE = DD Total size of the security data. + +TOTAL FIXUP DATA SIZE = DD Total size of the fixup data. + +TOTAL DEBUG DIRECTORIES = DD Total number of debug directories. + +TOTAL DESCRIPTION SIZE = DD Total size of the description data. + +MACHINE SPECIFIC SIZE = DD A machine specific value. + + + +3. Object Table + +The number of entries in the Object Table is given by the # Objects +field in the PE Header. Entries in the Object Table are numbered +starting from one. The object table immediately follows the PE +Header. The code and data memory object entries are in the order +chosen by the linker. The virtual addresses for objects must be +assigned by the linker such that they are in ascending order and +adjacent, and must be a multiple of Object Align in the PE header. + +Each Object Table entry has the following format: + + ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ + ³ OBJECT NAME ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ VIRTUAL SIZE ³ RVA ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ PHYSICAL SIZE ³ PHYSICAL OFFSET ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ RESERVED ³ RESERVED ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ RESERVED ³ OBJECT FLAGS ³ + ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ + +Figure 3. Object Table + +OBJECT NAME = DB * 8 Object name. This is an eight-byte null-padded +ASCII string representing the object name. + +VIRTUAL SIZE = DD Virtual memory size. The size of the object that +will be allocated when the object is loaded. Any difference between +PHYSICAL SIZE and VIRTUAL SIZE is zero filled. + +RVA = DD Relative Virtual Address. The virtual address the object is +currently relocated to, relative to the Image Base. Each Object's +virtual address space consumes a multiple of Object Align (power of 2 +between 512 and 256M inclusive. Default is 64K), and immediately +follows the previous Object in the virtual address space (the virtual +address space for a image must be dense). + +PHYSICAL SIZE = DD Physical file size of initialized data. The size +of the initialized data in the file for the object. The physical +size must be a multiple of the File Align field in the PE Header, and +must be less than or equal to the Virtual Size. + +PHYSICAL OFFSET = DD Physical offset for object's first page. This +offset is relative to beginning of the EXE file, and is aligned on a +multiple of the File Align field in the PE Header. The offset is +used as a seek value. + +OBJECT FLAGS = DD Flag bits for the object. The object flag bits +have the following definitions: + + o 000000020h __Code object. + + o 000000040h __Initialized data object. + + o 000000080h __Uninitialized data object. + + o 040000000h __Object must not be cached. + + o 080000000h __Object is not pageable. + + o 100000000h __Object is shared. + + o 200000000h __Executable object. + + o 400000000h __Readable object. + + o 800000000h __Writeable object. + +All other bits are reserved for future use and should be set to zero. + +4. Image Pages + +The Image Pages section contains all initialized data for all +objects. The seek offset for the first page in each object is +specified in the object table and is aligned on a File Align +boundary. The objects are ordered by the RVA. Every object begins +on a multiple of Object Align. + + + +5. Exports + +A typical file layout for the export information follows: + + ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ + ³ DIRECTORY TABLE ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ ADDRESS TABLE ³ + ³ ³ + ³ ³ + ³ ³ + ³ ³ + ³ ³ + ³ ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ NAME PTR TABLE ³ + ³ ³ + ³ ³ + ³ ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ ORDINAL TABLE ³ + ³ ³ + ³ ³ + ³ ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ NAME STRINGS ³ + ³ ³ + ³ ³ + ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ + +Figure 4. Export File Layout + +5.1 Export Directory Table + +The export information begins with the Export Directory Table which +describes the remainder of the export information. The Export +Directory Table contains address information that is used to resolve +fixup references to the entry points within this image. + + ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ + ³ EXPORT FLAGS ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ TIME/DATE STAMP ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ MAJOR VERSION ³ MINOR VERSION ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ NAME RVA ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ ORDINAL BASE ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ # EAT ENTRIES ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ # NAME PTRS ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ ADDRESS TABLE RVA ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ NAME PTR TABLE RVA ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ ORDINAL TABLE RVA ³ + ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ + +Figure 5. Export Directory Table Entry + +EXPORT FLAGS = DD Currently set to zero. + +TIME/DATE STAMP = DD Time/Date the export data was created. + +MAJOR/MINOR VERSION = DW A user settable major/minor version number. + +NAME RVA = DD Relative Virtual Address of the Dll asciiz Name. +This is the address relative to the Image Base. + +ORDINAL BASE = DD First valid exported ordinal. +This field specifies the starting ordinal number for the export +address table for this image. Normally set to 1. + +# EAT ENTRIES = DD Indicates number of entries in the Export Address +Table. + +# NAME PTRS = DD This indicates the number of entries in the Name Ptr +Table (and parallel Ordinal Table). + +ADDRESS TABLE RVA = DD Relative Virtual Address of the Export Address +Table. +This address is relative to the Image Base. + +NAME TABLE RVA = DD Relative Virtual Address of the Export Name Table +Pointers. +This address is relative to the beginning of the Image Base. This +table is an array of RVA's with # NAMES entries. + +ORDINAL TABLE RVA = DD Relative Virtual Address of Export Ordinals +Table Entry. +This address is relative to the beginning of the Image Base. + +5.2 Export Address Table + +The Export Address Table contains the address of exported entrypoints +and exported data and absolutes. An ordinal number is used to index +the Export Address Table. The ORDINAL BASE must be subracted from the +ordinal number before indexing into this table. + +Export Address Table entry formats are described below: + + ÚÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄ¿ + ³ EXPORTED RVA ³ + ÀÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÙ + +Figure 6. Export Address Table Entry + +EXPORTED RVA = DD Export address. +This field contains the relative virtual address of the exported +entry (relative to the Image Base). + +5.3 Export Name Table Pointers + +The export name table pointers array contains address into the Export +Name Table. The pointers are 32-bits each, and are relative to the +Image Base. The pointers are ordered lexically to allow binary +searches. + +5.4 Export Ordinal Table + +The Export Name Table Pointers and the Export Ordinal Table form two +parallel arrays, separated to allow natural field alignment. The +export ordinal table array contains the Export Address Table ordinal +numbers associated with the named export referenced by corresponding +Export Name Table Pointers. + +The ordinals are 16-bits each, and already include the Ordinal Base +stored in the Export Directory Table. + +5.5 Export Name Table + +The export name table contains optional ASCII names for exported +entries in the image. These tables are used with the array of Export +Name Table Pointers and the array of Export Ordinals to translate a +procedure name string into an ordinal number by searching for a +matching name string. The ordinal number is used to locate the entry +point information in the export address table. + +Import references by name require the Export Name Table Pointers +table to be binary searched to find the matching name, then the +corresponding Export Ordinal Table is known to contain the entry +point ordinal number. Import references by ordinal number provide +the fastest lookup since searching the name table is not required. + +Each name table entry has the following format: + + ÚÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄ¿ + ³ ASCII STRING ::: :::::::: '\0' ³ + ÀÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÙ + +Figure 7. Export Name Table Entry + +ASCII STRING = DB ASCII String. +The string is case sensitive and is terminated by a null byte. + + + +6. Imports + +A typical file layout for the import information follows: + + ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ + ³ DIRECTORY TABLE ³ + ³ ³ + ³ ³ + ³ ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ NULL DIR ENTRY ³ + ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ + + ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ + ³ DLL1 LOOKUP TABLE ³ + ³ ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ NULL ³ + ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ + + ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ + ³ DLL2 LOOKUP TABLE ³ + ³ ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ NULL ³ + ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ + + ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ + ³ Dll3 LOOKUP TABLE ³ + ³ ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ NULL ³ + ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ + + ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ + ³ HINT-NAME TABLE ³ + ³ ³ + ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ + + ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ + ³ DLL1 ADDRESS TABLE ³ + ³ ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ NULL ³ + ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ + + ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ + ³ DLL2 ADDRESS TABLE ³ + ³ ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ NULL ³ + ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ + + ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ + ³ DLL3 ADDRESS TABLE ³ + ³ ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ NULL ³ + ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ + +Figure 8. Import File Layout + +6.1 Import Directory Table + +The import information begins with the Import Directory Table which +describes the remainder of the import information. The Import +Directory Table contains address information that is used to resolve +fixup references to the entry points within a DLL image. The import +directory table consists of an array of Import Directory Entries, one +entry for each DLL this image references. The last directory entry is +empty (NULL) which indicates the end of the directory table. + +An Import Directory Entry has the following format: + + ÚÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄ¿ + ³ IMPORT FLAGS ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ TIME/DATE STAMP ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ MAJOR VERSION ³ MINOR VERSION ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ NAME RVA ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ IMPORT LOOKUP TABLE RVA ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ IMPORT ADDRESS TABLE RVA ³ + ÀÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÙ + +Figure 9. Import Directory Entry + +IMPORT FLAGS = DD Currently set to zero. + +TIME/DATE STAMP = DD Time/Date the import data was pre-snapped or +zero if not pre-snapped. + +MAJOR/MINOR VERSION = DW The major/minor version number of the dll +being referenced. + +NAME RVA = DD Relative Virtual Address of the Dll asciiz Name. +This is the address relative to the Image Base. + +IMPORT LOOKUP TABLE RVA = DD This field contains the address of the +start of the import lookup table for this image. The address is +relative to the beginning of the Image Base. + +IMPORT ADDRESS TABLE RVA = DD This field contains the address of the +start of the import addresses for this image. The address is +relative to the beginning of the Image Base. + +6.2 Import Lookup Table + +The Import Lookup Table is an array of ordinal or hint/name RVA's for +each DLL. The last entry is empty (NULL) which indicates the end of +the table. + +The last element is empty. + + 3 0 + 1 + ÚÄÒÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄ¿ + ³0º ORDINAL#/HINT-NAME TABLE RVA ³ + ÀÄÐÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÙ + +Figure 10. Import Address Table Format + +ORDINAL/HINT-NAME TABLE RVA = 31-bits (mask = 7fffffffh) Ordinal +Number or Name Table RVA. +If the import is by ordinal, this field contains a 31 bit ordinal +number. If the import is by name, this field contains a 31 bit +address relative to the Image Base to the Hint-Name Table. + +O = 1-bit (mask = 80000000h) Import by ordinal flag. + + o 00000000h __Import by name. + + o 80000000h __Import by ordinal. + +6.3 Hint-Name Table + +The Hint-Name Table format follows: + + ÚÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄ¿ + ³ HINT ³ ASCII STRING |||³ + ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄ´ + ³|||||||||||||||||³ '\0' PAD ³ + ÀÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÙ + + + The PAD field is optional. + +Figure 11. Import Hint-Name Table + +HINT = DW Hint into Export Name Table Pointers. +The hint value is used to index the Export Name Table Pointers array, +allowing faster by-name imports. If the hint is incorrect, then a +binary search is performed on the Export Name Ptr Table. + +ASCII STRING = DB ASCII String. +The string is case sensitive and is terminated by a null byte. + +PAD = DB Zero pad byte. +A trailing zero pad byte appears after the trailing null byte if +necessary to align the next entry on an even boundary. + +The loader overwrites the import address table when loading the image +with the 32-bit address of the import. + + + +6.4 Import Address Table + +The Import Address Table is an array of addresses of the imported +routines for each DLL. The last entry is empty (NULL) which indicates +the end of the table. + +7. Thread Local Storage + +Thread local storage is a special contiguous block of data. Each +thread will gets its own block upon creation of the thread. + +The file layout for thread local storage follows: + ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ + ³ DIRECTORY TABLE ³ + ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ + ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ + ³ TLS DATA ³ + ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ + ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ + ³ INDEX VARIABLE ³ + ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ + ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ + ³ CALLBACK ADDRESSES ³ + ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ + +Figure 12. Thread Local Storage Layout + +7.1 Thread Local Storage Directory Table + +The Thread Local Storage Directory Table contains address information +that is used to describe the rest of TLS. + +The Thread Local Storage Directory Table has the following format: + + ÚÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄ¿ + ³ START DATA BLOCK VA ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ END DATA BLOCK VA ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ INDEX VA ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ CALLBACK TABLE VA ³ + ÀÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÙ + +Figure 13. Thread Local Storage Directory Table + +START DATA BLOCK VA = DD Virtual Address of the start of the thread +local storage data block. + +END DATA BLOCK VA = DD Virtual Address of the end of the thread local +storage data block. + +INDEX VA = DD Virtual Address of the index variable used to access +the thread local storage data block. + +CALLBACK TABLE VA = DD Virtual Address of the callback table. + +7.2 Thread Local Storage CallBack Table + +The Thread Local Storage Callbacks is an array of Virtual Address of +functions to be called by the loader after thread creation and thread +termination. The last entry is empty (NULL) which indicates the end +of the table. + +The Thread Local Storage CallBack Table has the following format: + + ÚÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄ¿ + ³ FUNCTION1 VA ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ FUNCTION2 VA ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ NULL ³ + ÀÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÙ + +Figure 14. Thread Local Storage CallBack Table + +8. Resources + +Resources are indexed by a multiple level binary-sorted tree +structure. The overall design can incorporate 2**31 levels, however, +NT uses only three: the highest is TYPE, then NAME, then LANGUAGE. + +A typical file layout for the resource information follows: + ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ + ³ RESOURCE DIRECTORY ³ + ³ ³ + ³ ³ + ³ ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ RESOURCE DATA ³ + ³ ³ + ³ ³ + ³ ³ + ³ ³ + ³ ³ + ³ ³ + ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ + +Figure 15. Resource File Layout + + +The Resource directory is made up of the following tables: + + + +8.1 Resource Directory Table +ÚÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄ¿ +³ RESOURCE FLAGS ³ +ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³ TIME/DATE STAMP ³ +ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³ MAJOR VERSION ³ MINOR VERSION ³ +ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³ # NAME ENTRY ³ # ID ENTRY ³ +ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³ RESOURCE DIR ENTRIES ³ +ÀÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÙ + +Figure 16. Resource Table Entry + + +RESOURCE FLAGS = DD Currently set to zero. + +TIME/DATE STAMP = DD Time/Date the resource data was created by the +resource compiler. + +MAJOR/MINOR VERSION = DW A user settable major/minor version number. + +# NAME ENTRY = DW The number of name entries. +This field contains the number of entries at the beginning of the +array of directory entries which have actual string names associated +with them. + +# ID ENTRY = DW The number of ID integer entries. +This field contains the number of 32-bit integer IDs as their names +in the array of directory entries. + +The resource directory is followed by a variable length array of +directory entries. # NAME ENTRY is the number of entries at the +beginning of the array that have actual names associated with each +entry. The entires are in ascending order, case insensitive strings. +# ID ENTRY identifies the number of entries that have 32-bit integer +IDs as their name. These entries are also sorted in ascending order. + +This structure allows fast lookup by either name or number, but for +any given resource entry only one form of lookup is supported, not +both. This is consistent with the syntax of the .RC file and the .RES +file. + + + +The array of directory entries have the following format: + 3 0 + 1 +ÚÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄ¿ +³ NAME RVA/INTEGER ID ³ +ÃÄÒÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³Eº DATA ENTRY RVA/SUBDIR RVA ³ +ÀÄÐÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÙ + +Figure 17. Resource Directory Entry + + +INTERGER ID = DD ID. +This field contains a integer ID field to identify a resource. + +NAME RVA = DD Name RVA address. +This field contains a 31-bit address relative to the beginning of the +Image Base to a Resource Directory String Entry. + +E = 1-bit (mask 80000000h) Unescape bit. +This bit is zero for unescaped Resource Data Entries. + +DATA RVA = 31-bits (mask 7fffffffh) Data entry address. +This field contains a 31-bit address relative to the beginning of the +Image Base to a Resource Data Entry. + +E = 1-bit (mask 80000000h) Escape bit. +This bit is 1 for escaped Subdirectory Entry. + +DATA RVA = 31-bits (mask 7fffffffh) Directory entries. +This field contains a 31-bit address relative to the beginning of the +Image Base to Subdirectory Entry. + + + +Each resource directory string entry has the following format: +ÚÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄ¿ +³ LENGTH ³ UNICODE STRING ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄ´ +³ ³ +ÀÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÙ + +Figure 18. Resource Directory String Entry + + +LENGTH = DW Length of string. + +UNICODE STRING = DW UNICODE String. + +All of these string objects are stored together after the last +resource directory entry and before the first resource data object. +This minimizes the impact of these variable length objects on the +alignment of the fixed size directory entry objects. The length needs +to be word aligned. + + + +Each Resource Data Entry has the following format: + + ÚÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄ¿ + ³ DATA RVA ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ SIZE ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ CODEPAGE ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ RESERVED ³ + ÀÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÙ + +Figure 19. Resource Data Entry + + + +DATA RVA = DD Address of Resource Data. +This field contains 32-bit virtaul address of the resource data +(relative to the Image Base). + +SIZE = DD Size of Resource Data. +This field contains the size of the resource data for this resource. + +CODEPAGE = DD Codepage. + +RESERVED = DD Reserved - must be zero. + +Each resource data entry describes a leaf node in the resource +directory tree. It contains an address which is relative to the +beginning of Image Base, a size field that gives the number of bytes +of data at that address, a CodePage that should be used when decoding +code point values within the resource data. Typically for new +applications the code page would be the unicode code page. + + + +8.2 Resource Example + +The following is an example for an app. which wants to use the following data +as resources: + + TypeId# NameId# Language ID Resource Data + 00000001 00000001 0 00010001 + 00000001 00000001 1 10010001 + 00000001 00000002 0 00010002 + 00000001 00000003 0 00010003 + 00000002 00000001 0 00020001 + 00000002 00000002 0 00020002 + 00000002 00000003 0 00020003 + 00000002 00000004 0 00020004 + 00000009 00000001 0 00090001 + 00000009 00000009 0 00090009 + 00000009 00000009 1 10090009 + 00000009 00000009 2 20090009 + +Then the Resource Directory in the Portable format looks like: +Offset Data +0000: 00000000 00000000 00000000 00030000 (3 entries in this directory) +0010: 00000001 80000028 (TypeId #1, Subdirectory at offset 0x28) +0018: 00000002 80000050 (TypeId #2, Subdirectory at offset 0x50) +0020: 00000009 80000080 (TypeId #9, Subdirectory at offset 0x80) +0028: 00000000 00000000 00000000 00030000 (3 entries in this directory) +0038: 00000001 800000A0 (NameId #1, Subdirectory at offset 0xA0) +0040: 00000002 00000108 (NameId #2, data desc at offset 0x108) +0048: 00000003 00000118 (NameId #3, data desc at offset 0x118) +0050: 00000000 00000000 00000000 00040000 (4 entries in this directory) +0060: 00000001 00000128 (NameId #1, data desc at offset 0x128) +0068: 00000002 00000138 (NameId #2, data desc at offset 0x138) +0070: 00000003 00000148 (NameId #3, data desc at offset 0x148) +0078: 00000004 00000158 (NameId #4, data desc at offset 0x158) +0080: 00000000 00000000 00000000 00020000 (2 entries in this directory) +0090: 00000001 00000168 (NameId #1, data desc at offset 0x168) +0098: 00000009 800000C0 (NameId #9, Subdirectory at offset 0xC0) +00A0: 00000000 00000000 00000000 00020000 (2 entries in this directory) +00B0: 00000000 000000E8 (Language ID 0, data desc at offset 0xE8 +00B8: 00000001 000000F8 (Language ID 1, data desc at offset 0xF8 +00C0: 00000000 00000000 00000000 00030000 (3 entries in this directory) +00D0: 00000001 00000178 (Language ID 0, data desc at offset 0x178 +00D8: 00000001 00000188 (Language ID 1, data desc at offset 0x188 +00E0: 00000001 00000198 (Language ID 2, data desc at offset 0x198 + +00E8: 000001A8 (At offset 0x1A8, for TypeId #1, NameId #1, Language id #0 + 00000004 (4 bytes of data) + 00000000 (codepage) + 00000000 (reserved) +00F8: 000001AC (At offset 0x1AC, for TypeId #1, NameId #1, Language id #1 + 00000004 (4 bytes of data) + 00000000 (codepage) + 00000000 (reserved) +0108: 000001B0 (At offset 0x1B0, for TypeId #1, NameId #2, + 00000004 (4 bytes of data) + 00000000 (codepage) + 00000000 (reserved) +0118: 000001B4 (At offset 0x1B4, for TypeId #1, NameId #3, + 00000004 (4 bytes of data) + 00000000 (codepage) + 00000000 (reserved) +0128: 000001B8 (At offset 0x1B8, for TypeId #2, NameId #1, + 00000004 (4 bytes of data) + 00000000 (codepage) + 00000000 (reserved) +0138: 000001BC (At offset 0x1BC, for TypeId #2, NameId #2, + 00000004 (4 bytes of data) + 00000000 (codepage) + 00000000 (reserved) +0148: 000001C0 (At offset 0x1C0, for TypeId #2, NameId #3, + 00000004 (4 bytes of data) + 00000000 (codepage) + 00000000 (reserved) +0158: 000001C4 (At offset 0x1C4, for TypeId #2, NameId #4, + 00000004 (4 bytes of data) + 00000000 (codepage) + 00000000 (reserved) +0168: 000001C8 (At offset 0x1C8, for TypeId #9, NameId #1, + 00000004 (4 bytes of data) + 00000000 (codepage) + 00000000 (reserved) +0178: 000001CC (At offset 0x1CC, for TypeId #9, NameId #9, Language id #0 + 00000004 (4 bytes of data) + 00000000 (codepage) + 00000000 (reserved) +0188: 000001D0 (At offset 0x1D0, for TypeId #9, NameId #9, Language id #1 + 00000004 (4 bytes of data) + 00000000 (codepage) + 00000000 (reserved) +0198: 000001D4 (At offset 0x1D4, for TypeId #9, NameId #9, Language id #2 + 00000004 (4 bytes of data) + 00000000 (codepage) + 00000000 (reserved) + +And the data for the resources will look like: +01A8: 00010001 +01AC: 10010001 +01B0: 00010002 +01B4: 00010003 +01B8: 00020001 +01BC: 00020002 +01C0: 00020003 +01C4: 00020004 +01C8: 00090001 +01CC: 00090009 +01D0: 10090009 +01D4: 20090009 + + +9. Fixup Table + +The Fixup Table contains entries for all fixups in the image. The +Total Fixup Data Size in the PE Header is the number of bytes in the +fixup table. The fixup table is broken into blocks of fixups. Each +block represents the fixups for a 4K page. + +Fixups that are resolved by the linker do not need to be processed by +the loader, unless the load image can't be loaded at the Image Base +specified in the PE Header. + +9.1 Fixup Block + +Fixup blocks have the following format: + + ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ + ³ PAGE RVA ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ BLOCK SIZE ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ TYPE/OFFSET ³ TYPE/OFFSET ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ TYPE/OFFSET ³ ... ³ + ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ + +Figure 20. Fixup Block Format + +To apply a fixup, a delta needs to be calculated. The 32-bit delta +is the difference between the preferred base, and the base where the +image is actually loaded. If the image is loaded at its preferred +base, the delta would be zero, and thus the fixups would not have to +be applied. Each block must start on a DWORD boundary. The ABSOLUTE +fixup type can be used to pad a block. + +PAGE RVA = DD Page RVA. The image base plus the page rva is added to +each offset to create the virtual address of where the fixup needs to +be applied. + +BLOCK SIZE = DD Number of bytes in the fixup block. This includes the +PAGE RVA and SIZE fields. + +TYPE/OFFSET is defined as: + + 1 1 0 + 5 1 + ÚÄÄÄÄÒÄÄÄÄÄÄÄÄÄÄÄÄ¿ + ³TYPEº OFFSET ³ + ÀÄÄÄÄÐÄÄÄÄÄÄÄÄÄÄÄÄÙ +Figure 21. Fixup Record Format + +TYPE = 4-bit fixup type. This value has the following definitions: + + o 0h __ABSOLUTE. This is a NOP. The fixup is skipped. + + o 1h __HIGH. Add the high 16-bits of the delta to the 16-bit field + at Offset. The 16-bit field represents the high value of a 32- + bit word. + + o 2h __LOW. Add the low 16-bits of the delta to the 16-bit field + at Offset. The 16-bit field represents the low half value of a + 32-bit word. This fixup will only be emitted for a RISC machine + when the image Object Align isn't the default of 64K. + + o 3h __HIGHLOW. Apply the 32-bit delta to the 32-bit field at + Offset. + + o 4h __HIGHADJUST. This fixup requires a full 32-bit value. The + high 16-bits is located at Offset, and the low 16-bits is + located in the next Offset array element (this array element is + included in the SIZE field). The two need to be combined into a + signed variable. Add the 32-bit delta. Then add 0x8000 and + store the high 16-bits of the signed variable to the 16-bit + field at Offset. + + o 5h __MIPSJMPADDR. + +All other values are reserved. + + + +10. Debug Information + +The debug information is defined by the debugger and is not +controlled by the portable EXE format or linker. The only data +defined by the portable EXE format is the Debug Directory Table. + +10.1 Debug Directory + +The debug directory table consists of one or more entries that have +the following format: + + ÚÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄ¿ + ³ DEBUG FLAGS ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ TIME/DATE STAMP ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ MAJOR VERSION ³ MINOR VERSION ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ DEBUG TYPE ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ DATA SIZE ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ DATA RVA ³ + ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ DATA SEEK ³ + ÀÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÙ + +Figure 22. Debug Directory Entry + +DEBUG FLAGS = DD Set to zero for now. + +TIME/DATE STAMP = DD Time/Date the debug data was created. + +MAJOR/MINOR VERSION = DW Version stamp. +This stamp can be used to determine the version of the debug data. + +DEBUG TYPE = DD Format type. +To support multiple debuggers, this field determines the format of +the debug information. This value has the following definitions: + + o 0001h __Image contains COFF symbolics. + + o 0001h __Image contains CodeView symbolics. + + o 0001h __Image contains FPO symbolics. + +DATA SIZE = DD The number of bytes in the debug data. This is the +size of the actual debug data and does not include the debug +directory. + +DATA RVA = DD The relative virtual address of the debug data. This +address is relative to the beginning of the Image Base. + +DATA SEEK = DD The seek value from the beginning of the file to the +debug data. + +If the image contains more than one type of debug information, then +the next debug directory will immediately follow the first debug +directory. diff --git a/BORLAND/BC45/DOC/RESCAN.WRI b/BORLAND/BC45/DOC/RESCAN.WRI new file mode 100644 index 00000000..6391c3c6 Binary files /dev/null and b/BORLAND/BC45/DOC/RESCAN.WRI differ diff --git a/BORLAND/BC45/DOC/RESFMT.TXT b/BORLAND/BC45/DOC/RESFMT.TXT new file mode 100644 index 00000000..48d1d518 --- /dev/null +++ b/BORLAND/BC45/DOC/RESFMT.TXT @@ -0,0 +1,1134 @@ + + Win32 Binary Resource Formats + + Author: Floyd Rogers + + + Preface + + This document was edited and released by Microsoft Developer + Support. It describes the binary format of resources in Win32. The + information is provided at this point because we feel it will make + the work of application development easier. Unfortunately, the + information in this document may change before the final release of + Windows NT. Microsoft is NOT committing to stay with these formats + by releasing this document. Questions or follow-ups for any of the + information presented here should be posted to CompuServe MSWIN32 + forum, section 4. + --Steve Firebaugh + Microsoft Developer Support + + +1. Overview + 1.1 Comparison to Windows 16 (Win 3.0/3.1) + 1.2 Strings in UNICODE + 1.3 DWORD Alignment +2. General information + 2.1 New Statements + 2.1.1 New Button statements + 2.1.1.1 AUTO3STATE + 2.1.1.2 AUTOCHECKBOX + 2.1.1.3 AUTORADIOBUTTON + 2.1.1.4 PUSHBOX + 2.1.1.5 STATE3 (3STATE) + 2.1.1.6 USERBUTTON + 2.1.2 EXSTYLE statement + 2.1.3 CHARACTERISTICS statement + 2.1.4 VERSION statement + 2.1.5 LANGUAGE statement + 2.1.6 MESSAGETABLE statement + 2.1.6 Additional syntax for UNICODE strings. +3. Resource Header Format + 3.1 DataSize + 3.2 HeaderSize + 3.3 Type + 3.4 Names + 3.5 Additional Resource Header Information + 3.5.1 DataVersion + 3.5.2 MemoryFlags + 3.5.3 LanguageId + 3.5.4 Version and Characteristics + 3.6 Differentiating 16 and 32-bit resource files + 3.7 File alignment +4. Resource Data Format + 4.1 Version Resources + 4.2 Icon Resources + 4.3 Menu Resources + 4.4 Dialog Box Resources + 4.5 Cursor Resources + 4.6 Bitmap Resources + 4.7 Font and Font Directory Resources + 4.8 String Table Resources + 4.9 Accelerator Table Resources + 4.10 User Defined Resources and RCDATA + 4.11 Name Table and Error Table Resources + 4.12 Version Resourses + 4.13 Messagetable Resources +5. Revision History + + + + +1. Overview + +This document details the structure of the resource binary file +(.res) format for the Windows 32 API (Windows NT 3.1 and Win32s). +The structure is similar to the existing Windows 16 (Win 3.0/3.1) +structure, but supports essential new features such as UNICODE +strings, version headers, and DWORD alignment. To support these +changes, the file format written by the resource compiler must be +changed from that used by Windows 16. + +1.1 Comparison between Windows 3.0/3.1 and Windows 32 + +The Windows 16 resource file is a file containing one or more binary +resources. Each resource is preceded by a variable length structure +containing: Type, Name, Flags, Size. The Type and Name fields are +either a string identifying the Type or Name, or a WORD value +specifying the ordinal identity of the resource. The Flags field +specifies to the system how to load into memory the resource, and the +size specifies the size in bytes of the resource. The size, +therefore, points to the next resource in the file. + +The Windows 32 (both NT and Win32s) resource file retains this +structure, while expanding the header information with several +additional values. It also adds a few fields to some of the pre- +defined resources (Menu and Dialog, for instance), aligns all fields +within the predefined resources on WORD or DWORD boundaries, and adds +UNICODE (16-bit character) support to the data structures. + +One additional difference in resource files for Windows 32 is worth +noting. This does not directly affect the structure of the resource +file, but is rather a difference in how resource files are handled +and incorporated into an executable image (dll or exe). Windows NT +uses COFF format objects. Because of this, and the fact that the +Windows 32 exe format is much different than the Windows 16 format, +the SDK provides a utility named CVTRES that converts a resource file +into a COFF object. The linker then incorporates this object +directly into the resulting executable image. No provision is made +(as in Windows 16) for running the second pass of the resource +compiler multiple times to update the resources: relinking the image +is required. + +However, the Windows 32 API provides a set of APIs that allow a +program to enumerate all resources within an executable image, and +update individual resources in the image. + +1.2 Strings in UNICODE + +All strings in a resource file are now stored in UNICODE format. In +this format, all characters are represented by a 16-bit (WORD) value. +The first 128 characters are identical to the 128 characters in the +Windows ANSI character set (although the characters are represented +by 16 bits each rather than 8bits). The characters in positions 160- +254 are similar to the characters in the standard Windows character +set (note that the characters 128-159 are illegal Unicode +codepoints). This means that they are terminated with a UNICODE_NULL +symbol rather than a single NULL. The resource compiler translates +all normal ASCII strings into UNICODE by calling the +MultiByteToWideChar function provided by the Windows API. All +escaped characters are stored directly, and are assumed to be valid +UNICODE characters for the resource. If these strings are read in +later by an application as ASCII (for instance, by calling the +LoadString api), they will be converted back from UNICODE to ASCII +transparently by the loader. + +The only exception to the rule is strings in RCDATA statements. +These psuedo-strings are not real strings, but merely a convenient +notation for a collection of bytes. Users may overlay a structure +over the data from an RCDATA statement, and expect certain data to be +at certain offsets. If a psuedo-string gets automatically changed +into a UNICODE string, it things would inadvertently change the +offsets of things in the structure and break those applications. +Hence, these psuedo-strings must be left as ASCII bytes. To specify +a UNICODE string inside an RCDATA statement, the user should use the +explicit L-quoted string. + +1.3 DWORD Alignment + +To make resource binary files easier to read under Windows 32, all +objects within the file are to be DWORD aligned. This includes +headers, as well as data entries. This does not usually entail +changes in the order of the fields of resource data structures, but +does entail the need for some padding between fields. + +The single exception to this rule is the font and fontdir structures. +The reason for the exception is that these two structures are copied +directly from other files, and are not used by RC. + +2. General information + +The resource file is created by the resource compiler (RC) while +parsing the resource script file (.RC) and including any other +resource data files (eg. .ICO, .CUR, .BMP, .FNT). The resource file +contains all information necessary to build the resource table in the +executable image. The main purpose of the resource file is to speed +the edit-compile-link cycle by not always forcing resource to be +recompiled. + +There are currently about a dozen pre-defined resource types. These +include Menus, Dialogs, Accelerators, Strings, Icons, Cursors, +Bitmaps, Fonts and Version. These resources are used by the Windows +system to define the appearance of the application window. The +resource script allows the application writer to represent these +features in an easily editable form. Other type ranges are reserved +for use by the application for application-specific data. No attempt +is made by the resource compiler to modify this user-defined data +from 16-bit to 32-bit format. + +The executable image file for Windows 32 is not a Segmented image. +In the 16-bit executable image file, each resource was placed into a +separate segment in the image file. The Windows 32 image file places +all resources into a single Object or section. The Windows 32 image +file also provides a binary-sorted resource table that allows fast +lookup of a particular resource, rather than a table that must be +searched linearly, as in the 16-bit image file. Because this Windows +32 image file format is more complex that the Windows 16 format, +making it harder to update directly, the Windows 32 API provides +methods of modifying the resource data directly. + +The CVTRES conversion utility that converts the resource file into a +COFF object creates the resource table. This table contains three +directories, indexed by Type, Name and Language, in that order. The +Type and Name directories consist of two parts: the part dedicated +to resources whose types or names are represented by strings, an +those represented by ordinal WORD values. Because the use of strings +as resource type and name identifiers takes considerably more room +than ordinal identifiers, Microsoft recommends that they not be used. + +Note that, as all strings in a resource file (including the strings +used to identify the type and name of resources) are UNICODE, the +corresponding strings in the program that are being passed to +LoadBitmap, etc., must also be UNICODE (only if the application is +using the UNICODE set of apis rather than the ASCII set). This is +facilitated by use of the TEXT macro provided in winnt.h. + +The third level, language, provides the capability for the +application developer to ship a single executable image that supports +more than one language. For instance, one image providing French, +French-Canadian and French-Belgium could be easily shipped in one +image file. An application could also be shipped with support for +all languages supported by the UNICODE standard, although this would +make the image prohibitively large. However, since the system +provides facilities to modify the resources within an image, a setup +program could customize the application's image file for each +specific user, eliminating unneeded language support to save space in +the image file. + +2.1 New statements + +Several new statements have been added that the Windows 32 resource +compiler processes. + +2.1.1 New Button statements. + +These statements allow the application developer the same freedom of +expression that the PUSHBUTTON, DEFPUSHBUTTON, etc., statements do, +and correspond to the appropriate button style. + +They all have syntax identical to that of PUSHBUTTON, etc. + +2.1.1.1 AUTO3STATE + +Allows declaration of an AUTO3STATE button. + +2.1.1.2 AUTOCHECKBOX + +Allows declaration of an AUTOCHECKBOX button. + +2.1.1.3 AUTORADIOBUTTON + +Allows declaration of an AUTORADIOBUTTON button. + +2.1.1.5 PUSHBOX + +Allows declaration of a PUSHBOX button. + +2.1.1.6 STATE3 + +Allows declaration of a 3STATE button (the 3 is at the end for syntax +purposes). + +2.1.1.7 USERBUTTON + +Allows declaration of a USERBUTTON user-defined button. + +2.1.2 EXSTYLE statement + +This statement allows the application developer to designate one of +the extended (WS_EX_xxx) styles for a dialog or control window. +There are three methods, depending upon what is needed. + +It may be placed just below the DIALOG statement to apply to the +dialog window (like the CAPTION or STYLE statements). + + EXSTYLE + +It may be placed on the DIALOG statement with the memory flags. + + FOOBAR DIALOG [MemFlags...] [EXSTYLE=] x, y, dx, dy + +It may also be placed on the individual CONTROL, PUSHBUTTON, LTEXT, +etc. statements at the end of the statement. + + AUTOCHECKBOX "autocheckbox", id, x, y, dx, dy + [styleflags][exstyleflags] + +2.1.3 CHARACTERISTICS statement + +This statement allows the application developer to specify +information about the resource that may be of use to tools that read +and write resource files. It has no significance to the system and +is not stored in the image file. + + CHARACTERISTICS + +2.1.4 VERSION statement + +This statement is intended to allow the application to specify a +version number of the resource in the resource file (for those tools +that read and write resource files.) It has no significance to the +system and is not stored in the image file. + + VERSION + +2.1.5 LANGUAGE statement + +The LANGUAGE statement is used to specify the language the resource +file, or section of resource file, is written in. It may be placed +anywhere within the resource script file that a single-line statement +(such as ICON, CURSOR, BITMAP) may be placed. The scope of the +language specified by a LANGUAGE statement is from that point in the +script file to the next LANGUAGE statement, or the end of the file. + + LANGUAGE , + +where represents the language id, and the +sub-language identifiers. The values specified in winnt.h should be +used. + +The LANGUAGE statement may also be placed before the BEGIN statement +for MENU, DIALOG, STRINGTABLE, ACCELERATOR and RCDATA resources, +along with other optional statements like CAPTION, STYLE, etc. If +the statement is placed here, it's scope is limited to the resource +being defined. + +2.1.6 MESSAGETABLE statement + +The MESSAGETABLE statement is used to include a message table. A +message table is a special-purpose string table that is used to +contain error or informational messages, and may contain formatting +information. The format is: + + MESSAGETABLE + +2.1.7 Additional syntax for UNICODE strings. + +Quoted strings in the resource script are treated as ASCII strings +(in the current codepage) unless preceeded by a "L" or "l" character, +eg: + L"This is a Unicode string" +Declaring a string UNICODE with this syntax has two effects. In a +RCDATA statement, this causes the compiler to store the string as +UNICODE rather than ASCII. In all cases using this syntax, escapes +embedded within the string become UNICODE codepoint escapes resulting +in a 16-bit UNICODE character, eg: + L"This is the first line,\x2028and this is the second" +where the 0x2028 UNICODE character is the Line Separator character. +Any UNICODE character may be embedded within any resource script +string in this manner. + +3. Resource Header Format + +The general format of the entire file is simply a number of resource +file entries concatenated together. Each resource contains the +information about a single resource, such as a dialog or a string +table. + +Each entry consists of a resource header followed by the data for +that resource. A resource header (which is DWORD aligned) is +composed of four elements: two dwords containing the size of the +header and the size of the resource data, the resource type, the +resource name, and additional resource information. The data for the +resource follows the resource header and is specific to each +particular type of resource. + +3.1 DataSize + +This field gives the size of the data that follows the header, not +including any file padding between this resource and any resource +that follows this resource in the resource file. + +3.2 HeaderSize + +The HeaderSize field gives the size of the resource header structure +that follows. + +3.3 Type + +The type field can either be a number or a null-terminated UNICODE +string specifying the name of the type. This variable kind of type +is known as a `Name or Ordinal' field, and is used in most places in +a resource file where an ID may appear. + +The first WORD of a Name or Ordinal field identifies whether the +field is a number or a string. If the first WORD is 0xffff (an +invalid UNICODE character), then the following WORD of information is +the type number. Otherwise, the field is specified by a UNICODE +string. + +If the type field is a number, then the number specifies a standard +or user-defined resource type. All standard Windows resource types +have been assigned numbers, which are listed below. This list is +taken from the header file used to make RC and contains the type +number of the various resource types: + + /* Predefined resource types */ + #define RT_NEWRESOURCE 0x2000 + #define RT_ERROR 0x7fff + #define RT_CURSOR 1 + #define RT_BITMAP 2 + #define RT_ICON 3 + #define RT_MENU 4 + #define RT_DIALOG 5 + #define RT_STRING 6 + #define RT_FONTDIR 7 + #define RT_FONT 8 + #define RT_ACCELERATORS 9 + #define RT_RCDATA 10 + #define RT_MESSAGETABLE 11 + #define RT_GROUP_CURSOR 12 + #define RT_GROUP_ICON 14 + #define RT_VERSION 16 + #define RT_NEWBITMAP (RT_BITMAP|RT_NEWRESOURCE) + #define RT_NEWMENU (RT_MENU|RT_NEWRESOURCE) + #define RT_NEWDIALOG (RT_DIALOG|RT_NEWRESOURCE) + +If the type field is a string, then the type is a user-defined type. + +3.4 Names + +A name identifies the particular resource. A name (like a type) may +be a number or a string, and they are distinguished in the same way +as numbers and strings are distinguished in the type field. + +Note that no padding (for DWORD alignment) is needed between the Type +and Name fields, as they contain only WORD data and hence the Name +field will always be properly aligned. However, there may need to be +a WORD of padding after the Name field to align the rest of the +header on DWORD boundaries. + +3.5 Additional Header Information + +The additional information contains more information about the +particular resource data, including size and language ID. The +structure of the Header, plus it's additional information is as +follows: + +struct tagResource { + DWORD DataSize; // size of data without header + DWORD HeaderSize; // Length of the additional header + [Ordinal or name TYPE] // type identifier, id or string + [Ordinal or name NAME] // name identifier, id or string + DWORD DataVersion; // predefined resource data version + WORD MemoryFlags; // state of the resource + WORD LanguageId; // UNICODE support for NLS + DWORD Version; // Version of the resource data + DWORD Characteristics; // Characteristics of the data + } ; + +The additional information structure will always begin on a DWORD +boundary within the resource file, which may require adding some +padding in between the name field and the ResAdditional structure. + +3.5.1 DataVersion + +The DataVersion field determines the format of the information +within the resource header that follows. This may be used in the +future to allow additional information to be entered into the +predefined formats. + +3.5.2 MemoryFlags + +The field wMemoryFlags contains flags telling the state of a given +resource. These attributes are given to a given resource by +modifiers in the .RC script. The script identifiers inject the +following flag values: + + #define MOVEABLE 0x0010 + #define FIXED ~MOVEABLE + #define PURE 0x0020 + #define IMPURE ~PURE + #define PRELOAD 0x0040 + #define LOADONCALL ~PRELOAD + #define DISCARDABLE 0x1000 + +The resource compiler for NT always ignores the setting of the +MOVEABLE, IMPURE, and PRELOAD flags. + +3.5.3 LanguageId + +The language ID is included in each resource to specify the language +that the strings are written with when they need to be translated +back to a single byte strings. As well, there may be multiple +resources of exactly the same type and name which differ in only the +language of the strings within the resources. + +The language IDs are documented in Appendix A of the NLS +specification, or in winnt.h. The language of a resource or set of +resources is specified by the LANGUAGE statement. + +3.5.4 Version and Characteristics + +Currently, there is space in the resource file format for version and +characteristic information of the resource. These values can be set +by the resource compiler by using the VERSION or CHARACTERISTICS +statements. + +3.6 Differentiating 16 and 32-bit resource files. + +Because it might be desirable for an ISV's tool that reads and writes +resource files to be able to read either the older Windows 16 format +files and the new Windows 32 format, Microsoft has devised a method +to do this using illegal type and name ordinal numbers. + +The method involved is to place an illegal resource in the resource +file. The following eight bytes were chosen: + + 0x00 0x00 0x00 0x00 0x20 0x00 0x00 0x00 + +Assume that it is a 16-bit file. In that case, the Type is illegal +since the first 0x00 says string, but a zero-length string is an +illegal string. This, then is an illegal 16-bit resource header, +indicating that the file is a 32-bit file. + +Assume that it is a 32-bit file. Given that, the size of the data is +zero, which surely will never be the case. + +The Windows 32 resource compiler prefaces each 32-bit resource file +with this string of data (followed by an additional data structure +describing a zero-length resource with 0 ordinal type and 0 ordinal +name), allowing differentiation of 16 and 32-bit resource files. Any +tools reading resource files should ignore this resource. + +3.7 File Alignment. + +Because it is sometimes useful to separate resources into several +scripts and then concatenate them after compiling the resource files +separately, it is necessary to specify that resource files are padded +to a dword size. If this padding were not included, it could result +in the first resource of the second and/or subsequent resource files +not aligning upon a dword boundary. + +4. Resource Data Format + +For any of the pre-defined data types, all structures are DWORD +aligned, including the bitmap, icon, and font header structures. As +well, the data will always begin on a DWORD boundary. + +4.1 Version Resources + +Version resources are used to record the version of the application +using the resource file. Version resources contain a fixed amount of +information. The structure of the version resource is as follows: + +typedef struct tagVS_FIXEDFILEINFO { + DWORD dwSignature; // e.g. 0xfeef04bd + DWORD dwStrucVersion; // e.g. 0x00000042 = "0.42" + DWORD dwFileVersionMS; // e.g. 0x00030075 = "3.75" + DWORD dwFileVersionLS; // e.g. 0x00000031 = "0.31" + DWORD dwProductVersionMS; // e.g. 0x00030010 = "3.10" + DWORD dwProductVersionLS; // e.g. 0x00000031 = "0.31" + DWORD dwFileFlagsMask; // = 0x3F for version "0.42" + DWORD dwFileFlags; // e.g. VFF_DEBUG | VFF_PRERELEASE + DWORD dwFileOS; // e.g. VOS_DOS_WINDOWS16 + DWORD dwFileType; // e.g. VFT_DRIVER + DWORD dwFileSubtype; // e.g. VFT2_DRV_KEYBOARD + DWORD dwFileDateMS; // e.g. 0 + DWORD dwFileDateLS; // e.g. 0 + } VS_FIXEDFILEINFO; + +4.2 Icon Resources + +The ICON statement in the .RC script does not create a single +resource object, but creates a group of resources. This allows +Windows programs a degree of device-independence through the use of +different pixel bitmaps on hardware configurations with differing +capabilities. Icons, most often designed for differing numbers of +pixel planes and pixel counts, are grouped and treated by Windows as +a single resource. In the .RES and .EXE files, however, they are +stored as a group of resources. These groups are stored in a .RES +file with the components first (in this case the different icons +[type 3]) and a group header following (Type 14). The group header +contains the information necessary to allow Windows to select the +proper icon to display. + +The components have the following structure: + + [Resource header (type = 3)] + + [DIB Header] + [Color DIBits of icon XOR mask] + [Monochrome DIBits of AND mask] + +Each component is given an ordinal ID that is unique from all other +icon components. + +The Device Independent Bitmap (DIB) header's fields represent the +masks' information separately with two exceptions. First, the height +field represents both the XOR and AND masks. Before converting the +two DIBs to Device Dependent Bitmaps (DDB), the height should be +divided by two. The masks are always the same size and are one-half +the size given in the DIB header. Second, the number of bits per +pixel and bit count refer to the XOR mask. The AND mask is always +monochrome and should be interpreted as having one plane and one bit +per pixel. Before using an icon with Windows refer to the SDK +reference materials for more information on DIBs. Since the format +of an icon component closely resembles the format of the .ICO file, +the documentation in section 9.2 of the Windows SDK Reference is +useful. DDBs should not be used for Windows 32 applications. + +The group header is described here: + + [Resource header (type = 14)] + +struct IconHeader { + WORD wReserved; // Currently zero + WORD wType; // 1 for icons + WORD wCount; // Number of components + WORD padding; // filler for DWORD alignment + }; + +The next portion is repeated for each component resource: + +struct ResourceDirectory { + BYTE bWidth; + BYTE bHeight; + BYTE bColorCount; + BYTE bReserved; + WORD wPlanes; + WORD wBitCount; + DWORD lBytesInRes; + WORD wNameOrdinal; // Points to component + WORD padding; // filler for DWORD alignment + }; + +Notice that the group header consists of a fixed header and data that +repeats for each group component. Both of these parts are fixed +length allowing for random access of the group component information. + +This group header contains all of the data from the .ICO header and +from the individual resource descriptors. + +4.3 Menu Resources + +Menu resources are composed of a menu header followed by a sequential +list of menu items. There are two types of menu items: popups and +normal menu items. The MENUITEM SEPARATOR is a special case of a +normal menu item with an empty name, zero ID, and zero flags. The +format for these types is shown here: + + [Resource header (type = 4)] + +struct MenuHeader { + WORD wVersion; // Currently zero + WORD cbHeaderSize; // Also zero + }; + +These next items are repeated for every menu item. + +Popup menu items (signalled by fItemFlags & POPUP): + +struct PopupMenuItem { + WORD fItemFlags; + WCHAR szItemText[]; + }; + +Normal menu items (signalled by !(fItemFlags & POPUP)): + +struct NormalMenuItem { + WORD fItemFlags; + WORD wMenuID; + WCHAR szItemText[]; + }; + +The wVersion and cbHeaderSize structure members identify the version +of the menu template. They are both zero for Windows 3.0 but may be +incremented with future changes to the menu template. + +The WORD fItemFlags is a set of flags describing the menu item. If +the POPUP bit is set, the item is a POPUP. Otherwise, it is a normal +menu component. There are several other flag bits that may be set. +Their values are as follows: + + #define GRAYED 0x0001 // 'GRAYED' keyword + #define INACTIVE 0x0002 // 'INACTIVE' keyword + #define BITMAP 0x0004 // 'BITMAP' keyword + #define OWNERDRAW 0x0100 // 'OWNERDRAW' keyword + #define CHECKED 0x0008 // 'CHECKED' keyword + #define POPUP 0x0010 // Used internally + #define MENUBARBREAK 0x0020 // 'MENUBARBREAK' keyword + #define MENUBREAK 0x0040 // 'MENUBREAK' keyword + #define ENDMENU 0x0080 // Used internally + +The fItemFlags portion of the last menu item in a given POPUP is +flagged by OR'ing it with ENDMENU. It is important to note that +since popups can be nested, there may be multiple levels of items +with ENDMENU set. When menus are nested, the items are inserted +sequentially. A program can traverse this hierarchy by checking for +the item with the ENDMENU flag set. + +4.4 Dialog Box Resources + +A dialog box is contained in a single resource and has a header and a +portion repeated for each control in the dialog box. The header is +as follows: + + [Resource header (type = 5)] + +struct DialogBoxHeader { + DWORD lStyle; + DWORD lExtendedStyle; // new for NT + WORD NumberOfItems; + WORD x; + WORD y; + WORD cx; + WORD cy; + [Name or Ordinal] MenuName; + [Name or Ordinal] ClassName; + WCHAR szCaption[]; + WORD wPointSize; // Only here if FONT set for dialog + WCHAR szFontName[]; // This too + }; + +The item DWORD lStyle is a standard window style composed of flags +found in WINDOWS.H. The default style for a dialog box is: + + WS_POPUP | WS_BORDER | WS_SYSMENU + +The lExtendedStyle DWORD is used to specify the extended window style +flags. If an extended style is specified on the DIALOG statement, or +with the other optional modifier statements, this DWORD is set to +that value. + +The items marked `Name or Ordinal' are the same format used +throughout the resource file (most notably in each resource header) +to store a name or an ordinal ID. As before, if the first byte is an +0xffff, the next two bytes contain an ordinal ID. Otherwise, the +first 1 or more WORDS contain a null-terminated string. An empty +string is represented by a single WORD zero in the first location. + +The WORD wPointSize and WCHAR szFontName entries are present if the +FONT statement was included for the dialog box. This can be detected +by checking the entry lStyle. if lStyle & DS_SETFONT (DS_SETFONT = +0x40), then these entries will be present. + +The data for each control starts on a DWORD boundary (which may +require some padding from the previous control), and its format is as +follows: + +struct ControlData { + DWORD lStyle; + DWORD lExtendedStyle; + WORD x; + WORD y; + WORD cx; + WORD cy; + WORD wId; + [Name or Ordinal] ClassId; + [Name or Ordinal] Text; + WORD nExtraStuff; + }; + +As before, the item DWORD lStyle is a standard window style composed +of the flags found in WINDOWS.H. The type of control is determined +by the class. The class is either given by a zero-terminated string, +or in the case of many common Windows classes, is given a one word +code to save space and speed processing. Because UNICODE allows +0x8000 as a legal character, the ordinal classes are prefaced with a +of 0xFFFF, similar to the ordinal Type and Name fields. The one word +classes are listed here: + + #define BUTTON 0x8000 + #define EDIT 0x8100 + #define STATIC 0x8200 + #define LISTBOX 0x8300 + #define SCROLLBAR 0x8400 + #define COMBOBOX 0x8500 + +The lExtendedStyle DWORD is used to specify the extended style flags +to be used for this control. The extended style flags are placed at +the end of the CONTROL (or other control statements) statement +following the coordinates + +The extra information at the end of the control data structure is +currently not used, but is intended for extra information that may be +needed for menu items in the future. Usually it is zero length. + +The various statements used in a dialog script are all mapped to +these classes along with certain modifying styles. The values for +these styles can be found in WINDOWS.H. All dialog controls have the +default styles of WS_CHILD and WS_VISIBLE. A list of the default +styles used to make the script statements follows: + + Statement Default Class Default Styles + CONTROL None WS_CHILD|WS_VISIBLE + LTEXT STATIC ES_LEFT + RTEXT STATIC ES_RIGHT + CTEXT STATIC ES_CENTER + LISTBOX LISTBOX WS_BORDER | LBS_NOTIFY + CHECKBOX BUTTON BS_CHECKBOX | WS_TABSTOP + PUSHBUTTON BUTTON BS_PUSHBUTTON | WS_TABSTOP + GROUPBOX BUTTON BS_GROUPBOX + DEFPUSHBUTTON BUTTON BS_DEFPUSHBUTTON | WS_TABSTOP + RADIOBUTTON BUTTON BS_RADIOBUTTON + AUTOCHECKBOX BUTTON BS_AUTOCHECKBOX + AUTO3STATE BUTTON BS_AUTO3STATE + AUTORADIOBUTTON BUTTON BS_AUTORADIOBUTTON + PUSHBOX BUTTON BS_PUSHBOX + STATE3 BUTTON BS_3STATE + EDITTEXT EDIT ES_LEFT|WS_BORDER|WS_TABSTOP + COMBOBOX COMBOBOX None + ICON STATIC SS_ICON + SCROLLBAR SCROLLBAR None + +The control text is stored in the `Name or Ordinal' format described +in detail above. + +4.5 Cursor Resources + +Cursor resources are very much like icon resources. They are formed +in groups with the components preceding the header. This header also +employs a fixed-length component index that allows random access of +the individual components. The structure of the cursor header is as +follows: + + [Resource header (type = 12)] + +struct CursorHeader { + WORD wReserved; // Currently zero + WORD wType; // 2 for cursors + WORD cwCount; // Number of components + WORD padding; // filler for DWORD alignment + }; + +The next portion is repeated for each component resource, and starts +on a DWORD boundary. + +struct ResourceDirectory { + WORD wWidth; + WORD wHeight; + WORD wPlanes; + WORD wBitCount; + DWORD lBytesInRes; + WORD wNameOrdinal; // Points to component + WORD padding; // filler for DWORD alignment + }; + +Each cursor component is also similar to each icon component. There +is, however, one significant difference between the two: cursors +have the concept of a `hotspot' where icons do not. Here is the +component structure: + + [Resource header (Type = 1)] + +struct CursorComponent { + short xHotspot; + short yHotspot; + } + [Monochrome XOR mask] + [Monochrome AND mask] + +These masks are bitmaps copied from the .CUR file. The main +difference from icons in this regard is that cursors do not have +color DIBs used for XOR masks like cursors. Although the bitmaps are +monochrome and do not have DIB headers or color tables, the bits are +still in DIB format with respect to alignment and direction. See the +SDK Reference for more information on DIB formats. + +4.6 Bitmap Resources + +Windows 32 can read two types of device-independent bitmaps. The +normal type of DIB is the Windows 3.0 DIB format. The other type of +DIB is that used for OS/2 versions 1.1 and 1.2. The bitmap resource +consists of a single device-independent bitmap and accordingly, this +DIB can be of either format. The two DIBs are distinguished by their +header structures. They both have the size of their respective +structures as the first DWORD in the header. Both these structures +are documented in the Windows SDK Reference Version 3.0 volume 2, +section 7. The header structure for the normal DIB is +BITMAPINFOHEADER while the OS/2 DIB header is called +BITMAPCOREHEADER. The correct size (as a DWORD) must be in the first +entry of the structure. + + [Normal resource header (type = 2)] + + [BITMAPINFOHEADER or BITMAPCOREHEADER] + [Color table if not 24 bits per pixel] + [Packed-pixel bitmap] + +Note that the color table is optional. All but 24 bit color bitmaps +have a color table attached next. This table's length can be +computed by 2#BitsPerPixel * 3 bytes for OS/2 bitmaps or +2#BitsPerPixel * 4 bytes for Windows bitmaps. The bitmap image data +is placed immediately following the color table. + +Note that the bitmap file has an unaligned header structure +(BITMAPFILEHEADER structure). This header is not, however, stored in +the resource file, as it serves only to identify the type of file +(DIB or DDB). + +4.7 Font and Font Directory Resources + +Font resources are different from the other types of resources in +that they are not added to the resources of a specific application +program. Font resources are added to .EXE files that are renamed to +be .FON files. These files are libraries as opposed to applications. + +Font resources use a resource group structure. Individual fonts are +the components of a font group. Each component is defined by a FONT +statement in the .RC file. The group header follows all components +and contains all information necessary to access a specific font. +The format of a font component resource is as follows: + + [Normal resource header (type = 8)] + + [Complete contents of the .FNT file follow as the resource body - + - See the Windows SDK Reference for the format of the .FNT file] + +The group header for the fonts is normally last in the .RES file. +Note that unlike cursor and icon groups, the font group need not be +contiguous in the .RES file. Font declarations may be placed in the +.RC file mixed with other resource declarations. The group header is +added automatically by RC at the end of the .RES file. Programs +generating .RES files must add the FONTDIR entry manually. The group +header has the following structure: + + [Normal resource header (type = 7)] + + WORD NumberOfFonts; // Total number in .RES file + +The remaining data is repeated for every font in the .RES file. + + +WORD fontOrdinal; +struct FontDirEntry { + WORD dfVersion; + DWORD dfSize; + char dfCopyright[60]; + WORD dfType; + WORD dfPoints; + WORD dfVertRes; + WORD dfHorizRes; + WORD dfAscent; + WORD dfInternalLeading; + WORD dfExternalLeading; + BYTE dfItalic; + BYTE dfUnderline; + BYTE dfStrikeOut; + WORD dfWeight; + BYTE dfCharSet; + WORD dfPixWidth; + WORD dfPixHeight; + BYTE dfPitchAndFamily; + WORD dfAvgWidth; + WORD dfMaxWidth; + BYTE dfFirstChar; + BYTE dfLastChar; + BYTE dfDefaultChar; + BYTE dfBreakChar; + WORD dfWidthBytes; + DWORD dfDevice; + DWORD dfFace; + DWORD dfReserved; + char szDeviceName[]; + char szFaceName[]; + }; + +4.8 String Table Resources + +These tables are constructed in blocks of 16 strings. The +organization of these blocks of 16 is determined by the IDs given to +the various strings. The lowest four bits of the ID determine a +string's position in the block. The upper twelve bits determine +which block the string is in. Each block of 16 strings is stored as +one resource entry. Each string or error table resource block is +stored as follows: + + [Normal resource header (type = 6 for strings)] + + [Block of 16 strings. The strings are Pascal style with a WORD + length preceding the string. 16 strings are always written, even + if not all slots are full. Any slots in the block with no string + have a zero WORD for the length.] + +It is important to note that the various blocks need not be written +out in numerical order in the resource file. Each block is assigned +an ordinal ID. This ID is the high 12 bits of the string IDs in the +block plus one (ordinal IDs can't be zero). The blocks are written +to the .RES file in the order the blocks are encountered in the .RC +file, while the CVTRES utility will cause them to become ordered in +the COFF object, and hence the image file. + +4.9 Accelerator Table Resources + +An accelerator table is stored as a single resource. Multiple +accelerator tables are also allowed. The format of an accelerator +table is very simple. No header for the table is used. Each entry +in the table has a single four word entry. The last entry in the +table is flaged by the hex value 0x0080 (fFlags |= 0x0080). Since +all entries are fixed length, random access can be done because the +number of elements in the table can be computed by dividing the +length of the resource by eight. Here is the structure of the table +entries: + + [Normal resource header (type = 9)] + +The following structure is repeated for all accelerator table +entries. + +struct AccelTableEntry { + WORD fFlags; + WORD wAscii; + WORD wId; + WORD padding; + }; + +4.10 User Defined Resources and RCDATA + +RC allows the programmer to include resources not defined in Windows. +The user may choose a name not defined as a standard type and use it +to include data that is to be used as a resource. This data may be +taken from an external file or may be placed between BEGIN and END +statements. As an option, the programmer can define the type as +RCDATA with the same results. + +As might be imagined, the format of this resource is very simple +because the resource compiler knows nothing about the logical +structure of the data. Here is the organization: + + [Normal resource header (type = 10 for RCDATA, named types + represent user-defined types)] + + [The data from the BEGIN ... END or from the external file is + included without translation into the .RES file] + +4.11 Name Table and Error Table Resources + +Name tables and error resources are no longer supported in the +Windows binary resource file format. + +4.12 Version Resources. + +Version resources specify information that can be used by setup +programs to discover which of several versions of a program or +dynamic link library to install into the system. There is also a set +of api's to query the version resources. There are three major types +of information stored in version resources: the main information in +a VS_FIXEDFILEINFO structure, Language information data in a variable +file information structure (VarFileInfo), and user defined string +information in StringFileInfo structures. For Windows 32, the +strings within the version information resource is stored in Unicode, +providing localization of the resoruces. Each block of information +is dword aligned. + +The structure of a version resource is depicted by the +VS_VERSION_INFO structure. + +VS_VERSION_INFO { + WORD wLength; /* Length of the version resource */ + WORD wValueLength; /* Length of the value field for this block */ + WORD wType; /* type of information: 1==string, 0==binary */ + WCHAR szKey[]; /* Unicode string KEY field */ + [WORD Padding1;] /* possible word of padding */ + VS_FIXEDFILEINFO Value; /* Fixed File Info Structure */ + BYTE Children[]; /* position of VarFileInfo or StringFileInfo data */ +}; + +The Fixed File Info structure contains basic information about the +version, including version numbers for the product and file, and type +of the file. + +typedef struct tagVS_FIXEDFILEINFO { + DWORD dwSignature; /* signature - always 0xfeef04bd */ + DWORD dwStrucVersion; /* structure version - currently 0 */ + DWORD dwFileVersionMS; /* Most Significant file version dword */ + DWORD dwFileVersionLS; /* Least Significant file version dword */ + DWORD dwProductVersionMS; /* Most Significant product version */ + DWORD dwProductVersionLS; /* Least Significant product version */ + DWORD dwFileFlagMask; /* file flag mask */ + DWORD dwFileFlags; /* debug/retail/prerelease/... */ + DWORD dwFileOS; /* OS type. Will always be Windows32 value */ + DWORD dwFileType; /* Type of file (dll/exe/drv/... )*/ + DWORD dwFileSubtype; /* file subtype */ + DWORD dwFileDateMS; /* Most Significant part of date */ + DWORD dwFileDateLS; /* Least Significant part of date */ +} VS_FIXEDFILEINFO; + +The user defined string information is contained within the +StringFileInfo structure, which is a set of two strings: the key and +the information itself. + +StringFileInfo { + WCHAR szKey[]; /* Unicode "StringFileInfo" */ + [WORD padding;] /* possible padding */ + StringTable Children[]; +}; + +StringTable { + WCHAR szKey[]; /* Unicode string denoting the language - 8 bytes */ + String Children[]; /* array of children String structures */ +} + +String { + WCHAR szKey[]; /* arbitrary Unicode encoded KEY string */ + /* note that there is a list of pre-defined keys */ + [WORD padding;] /* possible padding */ + WCHAR Value[]; /* Unicode-encoded value for KEY */ +} String; + +The variable file info (VarFileInfo) block contains a list of +languages supported by this version of the application/dll. + +VarFileInfo { + WCHAR szKey[]; /* Unicode "VarFileInfo" */ + [WORD padding;]; /* possible padding */ + Var Children[]; /* children array */ +}; + +Var { + WCHAR szKey[]; /* Unicode "Translation" (or other user key) */ + [WORD padding;] /* possible padding */ + WORD Value[]; /* one or more values, normally language id's */ +}; + +4.13 Messagetable Resources. + +A message table is a resource that contains formatted text that is +used to display an error message or messagebox. It has taken the +place of the error table resource (which was never used). The data +consists of a MESSAGE_RESOURCE_DATA structure, which contains one or +more MESSAGE_RESOURCE_BLOCKS, which in turn may consist of one or +more MESSAGE_RESOURCE_ENTRY structures. The structure is similar to +that of the STRINGTABLE resource. + +typedef struct _MESSAGE_RESOURCE_DATA { + ULONG NumberOfBlocks; + MESSAGE_RESOURCE_BLOCK Blocks[]; +} MESSAGE_RESOURCE_DATA, *PMESSAGE_RESOURCE_DATA; + +typedef struct _MESSAGE_RESOURCE_BLOCK { + ULONG LowId; + ULONG HighId; + ULONG OffsetToEntries; +} MESSAGE_RESOURCE_BLOCK, *PMESSAGE_RESOURCE_BLOCK; + +typedef struct _MESSAGE_RESOURCE_ENTRY { + USHORT Length; + USHORT Flags; + UCHAR Text[]; +} MESSAGE_RESOURCE_ENTRY, *PMESSAGE_RESOURCE_ENTRY; + +If the Flags USHORT is MESSAGE_RESOURCE_UNICODE (value 0x0001), the +string is encoded in UNICODE rather than ASCII in the current +codepage. diff --git a/BORLAND/BC45/DOC/RPC/APA.WRI b/BORLAND/BC45/DOC/RPC/APA.WRI new file mode 100644 index 00000000..41be4fde Binary files /dev/null and b/BORLAND/BC45/DOC/RPC/APA.WRI differ diff --git a/BORLAND/BC45/DOC/RPC/APB.WRI b/BORLAND/BC45/DOC/RPC/APB.WRI new file mode 100644 index 00000000..d3639e19 Binary files /dev/null and b/BORLAND/BC45/DOC/RPC/APB.WRI differ diff --git a/BORLAND/BC45/DOC/RPC/APC.WRI b/BORLAND/BC45/DOC/RPC/APC.WRI new file mode 100644 index 00000000..3ce024ae Binary files /dev/null and b/BORLAND/BC45/DOC/RPC/APC.WRI differ diff --git a/BORLAND/BC45/DOC/RPC/APD.WRI b/BORLAND/BC45/DOC/RPC/APD.WRI new file mode 100644 index 00000000..e9c6cf4c Binary files /dev/null and b/BORLAND/BC45/DOC/RPC/APD.WRI differ diff --git a/BORLAND/BC45/DOC/RPC/APE.WRI b/BORLAND/BC45/DOC/RPC/APE.WRI new file mode 100644 index 00000000..1af06047 Binary files /dev/null and b/BORLAND/BC45/DOC/RPC/APE.WRI differ diff --git a/BORLAND/BC45/DOC/RPC/APF.WRI b/BORLAND/BC45/DOC/RPC/APF.WRI new file mode 100644 index 00000000..589eb369 Binary files /dev/null and b/BORLAND/BC45/DOC/RPC/APF.WRI differ diff --git a/BORLAND/BC45/DOC/RPC/CH0.WRI b/BORLAND/BC45/DOC/RPC/CH0.WRI new file mode 100644 index 00000000..78fdeee6 Binary files /dev/null and b/BORLAND/BC45/DOC/RPC/CH0.WRI differ diff --git a/BORLAND/BC45/DOC/RPC/CH1.WRI b/BORLAND/BC45/DOC/RPC/CH1.WRI new file mode 100644 index 00000000..c34ef75b Binary files /dev/null and b/BORLAND/BC45/DOC/RPC/CH1.WRI differ diff --git a/BORLAND/BC45/DOC/RPC/CH10.WRI b/BORLAND/BC45/DOC/RPC/CH10.WRI new file mode 100644 index 00000000..4b77e905 Binary files /dev/null and b/BORLAND/BC45/DOC/RPC/CH10.WRI differ diff --git a/BORLAND/BC45/DOC/RPC/CH11.WRI b/BORLAND/BC45/DOC/RPC/CH11.WRI new file mode 100644 index 00000000..421af502 Binary files /dev/null and b/BORLAND/BC45/DOC/RPC/CH11.WRI differ diff --git a/BORLAND/BC45/DOC/RPC/CH12.WRI b/BORLAND/BC45/DOC/RPC/CH12.WRI new file mode 100644 index 00000000..f8258ff5 Binary files /dev/null and b/BORLAND/BC45/DOC/RPC/CH12.WRI differ diff --git a/BORLAND/BC45/DOC/RPC/CH13A.WRI b/BORLAND/BC45/DOC/RPC/CH13A.WRI new file mode 100644 index 00000000..36dec970 Binary files /dev/null and b/BORLAND/BC45/DOC/RPC/CH13A.WRI differ diff --git a/BORLAND/BC45/DOC/RPC/CH13B.WRI b/BORLAND/BC45/DOC/RPC/CH13B.WRI new file mode 100644 index 00000000..e1c114c3 Binary files /dev/null and b/BORLAND/BC45/DOC/RPC/CH13B.WRI differ diff --git a/BORLAND/BC45/DOC/RPC/CH14.WRI b/BORLAND/BC45/DOC/RPC/CH14.WRI new file mode 100644 index 00000000..0fb0980d Binary files /dev/null and b/BORLAND/BC45/DOC/RPC/CH14.WRI differ diff --git a/BORLAND/BC45/DOC/RPC/CH2.WRI b/BORLAND/BC45/DOC/RPC/CH2.WRI new file mode 100644 index 00000000..abf345e8 Binary files /dev/null and b/BORLAND/BC45/DOC/RPC/CH2.WRI differ diff --git a/BORLAND/BC45/DOC/RPC/CH3.WRI b/BORLAND/BC45/DOC/RPC/CH3.WRI new file mode 100644 index 00000000..88376886 Binary files /dev/null and b/BORLAND/BC45/DOC/RPC/CH3.WRI differ diff --git a/BORLAND/BC45/DOC/RPC/CH4.WRI b/BORLAND/BC45/DOC/RPC/CH4.WRI new file mode 100644 index 00000000..8f4bbb30 Binary files /dev/null and b/BORLAND/BC45/DOC/RPC/CH4.WRI differ diff --git a/BORLAND/BC45/DOC/RPC/CH5.WRI b/BORLAND/BC45/DOC/RPC/CH5.WRI new file mode 100644 index 00000000..db27976d Binary files /dev/null and b/BORLAND/BC45/DOC/RPC/CH5.WRI differ diff --git a/BORLAND/BC45/DOC/RPC/CH6.WRI b/BORLAND/BC45/DOC/RPC/CH6.WRI new file mode 100644 index 00000000..1cddddf8 Binary files /dev/null and b/BORLAND/BC45/DOC/RPC/CH6.WRI differ diff --git a/BORLAND/BC45/DOC/RPC/CH7.WRI b/BORLAND/BC45/DOC/RPC/CH7.WRI new file mode 100644 index 00000000..9e760e4b Binary files /dev/null and b/BORLAND/BC45/DOC/RPC/CH7.WRI differ diff --git a/BORLAND/BC45/DOC/RPC/CH8.WRI b/BORLAND/BC45/DOC/RPC/CH8.WRI new file mode 100644 index 00000000..027a2ac6 Binary files /dev/null and b/BORLAND/BC45/DOC/RPC/CH8.WRI differ diff --git a/BORLAND/BC45/DOC/RPC/CH9.WRI b/BORLAND/BC45/DOC/RPC/CH9.WRI new file mode 100644 index 00000000..34cedd3a Binary files /dev/null and b/BORLAND/BC45/DOC/RPC/CH9.WRI differ diff --git a/BORLAND/BC45/DOC/RPC/FRONT.WRI b/BORLAND/BC45/DOC/RPC/FRONT.WRI new file mode 100644 index 00000000..8d14826b Binary files /dev/null and b/BORLAND/BC45/DOC/RPC/FRONT.WRI differ diff --git a/BORLAND/BC45/DOC/RPC/GLOS.WRI b/BORLAND/BC45/DOC/RPC/GLOS.WRI new file mode 100644 index 00000000..555d38cc Binary files /dev/null and b/BORLAND/BC45/DOC/RPC/GLOS.WRI differ diff --git a/BORLAND/BC45/DOC/RPC/INDX.WRI b/BORLAND/BC45/DOC/RPC/INDX.WRI new file mode 100644 index 00000000..c2efcaa7 Binary files /dev/null and b/BORLAND/BC45/DOC/RPC/INDX.WRI differ diff --git a/BORLAND/BC45/DOC/RWINI.TXT b/BORLAND/BC45/DOC/RWINI.TXT new file mode 100644 index 00000000..529f4b44 --- /dev/null +++ b/BORLAND/BC45/DOC/RWINI.TXT @@ -0,0 +1,64 @@ + RWINI.TXT + =========== + +This file explains switches used in the WORKSHOP.INI +file that control driver behavior (WORKSHOP.INI is +in your Windows directory). + +A number of display drivers don't implement some +off-screen operations correctly. This file documents +specific workarounds for some of these driver problems. +Most of the workarounds were tested on a variety of drivers +and don't cause additional problems. However, some of these +workarounds have side effects on other drivers, or they +significantly affect the performance of the operation. These +workarounds are controlled by switches in WORKSHOP.INI. +Place all of the switches under the section [Resource Workshop]. + + +RWS_OwnFloodFill=1 +------------------ +Some drivers don't perform flood fill correctly. Either the +operation fails, or vertical bars are placed on byte +boundaries in the image. If when using the paint can tool +you see either of these symptoms, use this switch to correct +it. Note that this switch is slower than the driver code. + +RWS_Own16Color=1 +---------------- +If you are creating 16-color bitmaps with custom colors +(for example, a gray-scale image), you must turn off the +"Save with default device colors" option in the +Options|Editor options dialog box. If, after doing that, the +color table returns to the default colors after saving, use +this switch to correct the problem. + +RWS_Own256Color=1 +----------------- +If you're creating 256-color images with custom colors and +the colors return to the default, use this switch to correct +the problem. + +RWS_ColorCopy=1 +--------------- +Some drivers don't perform GetDIBits properly when the +source device dependent bitmap is monochrome and either +less than 8 pixels wide or an odd number of pixels wide. +You can determine if this problem exists by creating a +new 6X6X2-Color image. If the initial image is black, +your driver has this problem. This switch copies the +monochrome image to a color image before calling GetDIBits. + +NoDriverHacks=1 +--------------- +When using 256-color drivers, Resource Workshop displays +a grid on all zoomed images. Use this switch to turn off the +grid. If Workshop crashes when an image is zoomed, turn the +switch off and report the problem to your driver manufacturer. + +bAutoH=0 +-------- +Use this switch to suppress the Add File To Project dialog +box when creating new .RC projects. + + ========= END OF FILE RWINI.TXT ========= diff --git a/BORLAND/BC45/DOC/TD_ASM.TXT b/BORLAND/BC45/DOC/TD_ASM.TXT new file mode 100644 index 00000000..ce2ebe54 --- /dev/null +++ b/BORLAND/BC45/DOC/TD_ASM.TXT @@ -0,0 +1,815 @@ +/*************************************************************************/ + TURBO DEBUGGER + Assembler-level debugging + +This file contains information about Assembler-level debugging. The +contents of the file are as follows: + +1. When source debugging isn't enough +2. The assembler +3. Assembler-specific bugs +4. Inline assembler tips +5. Inline assembler keywords +6. The Numeric Processor window + +The material in this file is for programmers who are familiar with +programming the 80x86 processor family in assembler. You don't need +to use the information in this chapter to debug your programs, but +there are certain problems that might be easier to find using +the techniques discussed here. + + +=================================================================== +1. When source debugging isn't enough +=================================================================== + +Sometimes, however, you can gain insight into a problem by looking +at the exact instructions that the compiler generated, the contents +of the CPU registers, and the contents of the stack. To do this, +you need to be familiar with both the 80x86 family of processors +and with how the compiler turns your source code into machine +instructions. Because many excellent books are available about the +internal workings of the CPU, we won't go into that in detail here. +You can quickly learn how the compiler turns your source code into +machine instructions by looking at the instructions generated for +each line of source code within the CPU window. + +Turbo Debugger can detect an 8087, 80287, 80387, or 80486 numeric +coprocessor and disassemble those instructions if a floating-point +chip or emulator is present. + +The instruction mnemonic RETF indicates that this is a far return +instruction. The normal RET mnemonic indicates a near return. + +Where possible, the target of JMP and CALL instructions is +displayed symbolically. If CS:IP is a JMP or conditional jump +instruction, an up-arrow or down-arrow that shows jump direction +will be displayed only if the executing instruction will cause the +jump to occur. Also, memory addresses used by MOV, ADD, and other +instructions display symbolic addresses. + + +=================================================================== +2. The assembler +=================================================================== + +If you use the Assemble command in the Code pane local menu, Turbo +Debugger lets you assemble instructions for the 8086, 80186, 80286, +80386, and 80486 processors, and also for the 8087, 80287, and 80387 +numeric coprocessors. + +When you use Turbo Debugger's built-in assembler to modify your program, +the changes you make are not permanent. If you reload your program Run| +Program Reset, or if you load another program using File|Open, +you'll lose any changes you've made. + +Normally you use the assembler to test an idea for fixing your program. +Once you've verified that the change works, you must change your source +code and recompile and link your program. + +The following sections describe the differences between the built- +in assembler and the syntax accepted by Borland C++'s inline +assembler. + + +Operand address size overrides +============================== + +For the call (CALL), jump (JMP), and conditional jump (JNE, JL, and +so forth) instructions, the assembler automatically generates the +smallest instruction that can reach the destination address. You +can use the NEAR and FAR overrides before the destination address +to assemble the instruction with a specific size. For example, + + CALL FAR XYZ + JMP NEAR A1 + + +Memory and immediate operands +----------------------------- + +When you use a symbol from your program as an instruction operand, +you must tell the built-in assembler whether you mean the contents +of the symbol or the address of the symbol. If you use just the +symbol name, the assembler treats it as an address, exactly as if +you had used the assembler OFFSET operator before it. If you put +the symbol inside brackets ([ ]), it becomes a memory reference. +For example, if your program contains the data definition + + A DW 4 + +then "A" references the area of memory where A is stored. + +When you assemble an instruction or evaluate an assembler +expression to refer to the contents of a variable, use the name of +the variable alone or between brackets: + + mov dx,a + mov ax,[a] + +To refer to the address of the variable, use the OFFSET operator: + + mov ax,offset a + + +Operand data size overrides +=========================== + +For some instructions, you must specify the operand size using one +of the following expressions before the operand: + + BYTE PTR + WORD PTR + +Here are examples of instructions using these overrides: + + add BYTE PTR[si],10 + mov WORD PTR[bp+10],99 + +In addition to these size overrides, you can use the following +overrides to assemble 8087/80287/80387/80486 numeric processor +instructions: + + DWORD PTR + QWORD PTR + TBYTE PTR + +Here are some examples using these overrides: + + fild QWORD PTR[bx] + stp TBYTE PTR[bp+4] + + +String instructions +=================== + +When you assemble a string instruction, you must include the size +(byte or word) as part of the instruction mnemonic. The assembler +does not accept the form of the string instructions that uses a +sizeless mnemonic with an operand that specifies the size. For +example, use STOSW rather than STOS WORD PTR[di]. + + +========================================= +3. Assembler-specific bugs +========================================= + +This section, which covers some of the common pitfalls of assembly +language programming, is intended for people who have Turbo Assembler +or use inline assembler in C++ programs. You should refer to the +Turbo Assembler User's Guide for a fuller explanation on these +often encountered errors--and tips on how to avoid them. + +Forgetting to return to DOS +=========================== + +In C++, a program ends automatically when there is no more code to +execute, even if no explicit termination command was written into the +program. Not so in assembly language, where only those actions that +you explicitly request are performed. When you run a program that has +no command to return to DOS, execution simply continues right past the +end of the program's code and into whatever code happens to be in the +adjacent memory. + + +Forgetting a RET instruction +============================ + +The proper invocation of a subroutine consists of a call to the subroutine +from another section of code, execution of the subroutine, and a return +from the subroutine to the calling code. Remember to insert a RET +instruction in each subroutine, so that the RETurn to the calling code +occurs. When you're typing a program, it's easy to skip a RET and end +up with an error. + + +Generating the wrong type of return +=================================== + +The PROC directive has two effects. First, it defines a name by which a +procedure can be called. Second, it controls whether the procedure is a near +or far procedure. + +The RET instructions in a procedure should match the type of the procedure, +shouldn't they? + +Yes and no. The problem is that it's possible and often desirable to group +several subroutines in the same procedure. Since these subroutines lack an +associated PROC directive, their RET instructions take on the type of the +overall procedure, which is not necessarily the correct type for the +individual subroutines. + + +Reversing operands +================== + +To many people, the order of instruction operands in 8086 assembly language +seems backward (and there is certainly some justification for this +viewpoint). If the line + + mov ax,bx + +meant "move AX to BX," the line would scan smoothly from left to right, and +this is exactly the way in which many microprocessor manufacturers have +designed their assembly languages. + +However, Intel took a different approach with 8086 assembly language; for +us, the line means "move BX to AX," and that can sometimes cause confusion. + + +Forgetting the stack or reserving a too-small stack +=================================================== + +In most cases, you're treading on thin ice if you don't explicitly allocate +space for a stack. Programs without an allocated stack sometimes run, but +there is no assurance that these programs will run under all circumstances. +DOS programs can have a .STACK directive to reserve space for the stack. +For each program, you should reserve more than enough space for the +deepest stack the program can use. + + +Calling a subroutine that wipes out registers +============================================= + +When you're writing assembler code, it's easy to think of the registers +as local variables, dedicated to the use of the procedure you're working +on at the moment. In particular, there's a tendency to assume that +registers are unchanged by calls to other procedures. It just isn't +so--the registers are global variables, and each procedure can preserve or +destroy any or all registers. + + +Using the wrong sense for a conditional jump +============================================ + +The profusion of conditional jumps in assembly language (JE, JNE, JC, +JNC, JA, JB, JG, and so on) allows tremendous flexibility in writing +code--and also makes it easy to select the wrong jump for a given purpose. +Moreover, since condition-handling in assembly language requires at least +two separate lines, one for the comparison and one for the conditional +jump (it requires many more lines for complex conditions), assembly +language condition-handling is less intuitive and more prone to errors than +condition-handling in C++. + + +Forgetting about REP string overrun +=================================== + +String instructions have a curious property: After they're executed, the +pointers they use wind up pointing to an address 1 byte away (or 2 bytes +for a word instruction) from the last address processed. This can cause +some confusion with repeated string instructions, especially REP SCAS and +REP CMPS. + + +Relying on a zero CX to cover a whole segment +============================================= + +Any repeated string instruction executed with CX equal to zero does nothing. +This can be convenient in that there's no need to check for the zero +case before executing a repeated string instruction; on the other hand, +there's no way to access every byte in a segment with a byte-sized string +instruction. + + +Using incorrect direction flag settings +======================================= + +When a string instruction is executed, its associated pointer or pointers-- +SI or DI or both--increment or decrement. It all depends on the state of the +direction flag. + +The direction flag can be cleared with CLD to cause string instructions to +increment (count up) and can be set with STD to cause string instructions to +decrement (count down). Once cleared or set, the direction flag stays in the +same state until either another CLD or STD is executed, or until the flags +are popped from the stack with POPF or IRET. While it's handy to be able to +program the direction flag once and then execute a series of string +instructions that all operate in the same direction, the direction flag can +also be responsible for intermittent and hard-to-find bugs by causing the +behavior of string instructions to depend on code that executed much earlier. + + +Using the wrong sense for a repeated string comparison +====================================================== + +The CMPS instruction compares two areas of memory; the SCAS instruction +compares the accumulator to an area of memory. Prefixed by REPE, either +of these instructions can perform a comparison until either CX becomes +zero or a not-equal comparison occurs. Unfortunately, it's easy to become +confused about which of the REP prefixes does what. + + +Forgetting about string segment defaults +======================================== + +Each of the string instructions defaults to using a source segment (if any) +of DS, and a destination segment (if any) of ES. It's easy to forget this +and try to perform, say, a STOSB to the data segment, since that's where +all the data you're processing with non-string instructions normally resides. + + +Converting incorrectly from byte to word operations +=================================================== + +In general, it's desirable to use the largest possible data size (usually +word, but dword on an 80386) for a string instruction, since string +instructions with larger data sizes often run faster. + +There are a couple of potential pitfalls here. First, the conversion from a +byte count to a word count by a simple + + shr cx,1 + +loses a byte if CX is odd, since the least-significant bit is shifted out. + +Second, make sure you remember SHR divides the byte count by two. Using, +say, STOSW with a byte rather than a word count can wipe out other data +and cause problems of all sorts. + + +Using multiple prefixes +======================= + +String instructions with multiple prefixes are error-prone and should +generally be avoided. + + +Relying on the operand(s) to a string instruction +================================================= + +The optional operand or operands to a string instruction are used for data +sizing and segment overrides only, and do not guarantee that the memory +location referenced is accessed. + + +Wiping out a register with multiplication +========================================= + +Multiplication--whether 8 bit by 8 bit, 16 bit by 16 bit, or 32 bit by 32 +bit--always destroys the contents of at least one register other than the +portion of the accumulator used as a source operand. + + +Forgetting that string instructions alter several registers +=========================================================== + +The string instructions, MOVS, STOS, LODS, CMPS, and SCAS, can affect several +of the flags and as many as three registers during execution of a single +instruction. When you use string instructions, remember that SI, DI, or +both either increment or decrement (depending on the state of the direction +flag) on each execution of a string instruction. CX is also decremented at +least once, and possibly as far as zero, each time a string instruction with +a REP prefix is used. + + +Expecting certain instructions to alter the carry flag +====================================================== + +While some instructions affect registers or flags unexpectedly, other +instructions don't even affect all the flags you might expect them to. + + +Waiting too long to use flags +============================= + +Flags last only until the next instruction that alters them, which is +usually not very long. It's a good practice to act on flags as soon as +possible after they're set, thereby avoiding all sorts of potential bugs. + + +Confusing memory and immediate operands +======================================= + +An assembler program may refer either to the offset of a memory variable or +to the value stored in that memory variable. Unfortunately, assembly language +is neither strict nor intuitive about the ways in which these two types of +references can be made, and as a result, offset and value references to a +memory variable are often confused. + + +Failing to preserve everything in an interrupt handler +====================================================== + +Every interrupt handler should explicitly preserve the contents of all +registers. While it is valid to preserve explicitly only those registers +that the handler modifies, it's good insurance just to push all registers +on entry to an interrupt handler and pop all registers on exit. + + +Forgetting group overrides in operands and data tables +====================================================== + +Segment groups let you partition data logically into a number of areas +without having to load a segment register every time you want to switch +from one of those logical data areas to another. + + + +========================================= +4. Inline assembler tips +========================================= + + +Looking at raw hex data +======================= + +You can use the Data|Add Watch and Data| Evaluate/Modify commands with +a format modifier to look at raw data dumps. For example, if your +language is Assembler, + + [ES:DI],20m + +specifies that you want to look at a raw hex memory dump of the 20 bytes +pointed to by the ES:DI register pair. + + +Source-level debugging +====================== + +You can step through your assembler code using a Module window just as +with any of the high-level languages. If you want to see the register +values, you can put a Registers window to the right of the Module window. + +Sometimes, you may want to use a CPU window and see your source code as +well. To do this, open a CPU window and choose the Code pane's Mixed +command until it reads Both. That way you can see both your source code +and machine code bytes. Remember to zoom the CPU window (by pressing F5) +if you want to see the machine code bytes. + + +Examining and changing registers +================================ + +The obvious way to change registers is to highlight a register in either +a CPU window or Registers window. A quick way to change a register is to +choose Data|Evaluate/Modify. You can enter an assignment expression that +directly modifies a register's contents. For example, + + SI = 99 + +loads the SI register with 99. + +Likewise, you can examine registers using the same technique. For example, + + Alt-D E AX + +shows you the value of the AX register. + + +========================================= +5. Inline assembler keywords +========================================= + +This section lists the instruction mnemonics and other special symbols that +you use when entering instructions with the inline assembler. The keywords +presented here are the same as those used by Turbo Assembler. + + +8086/80186/80286 instructional mnemonics +_________________________________________ + AAA INC LIDT** REPNZ + AAD INSB* LLDT** REPZ + AAM INSW* LMSW** RET + AAS INT LOCK REFT + ADC INTO LODSB ROL + ADD IRET LODSW ROR + AND JB LOOP SAHF + ARPL** JBE LOOPNZ SAR + BOUND* JCXZ LOOPZ SBB + CALL JE LSL** SCASB + CLC JL LTR** SCASW + CLD JLE MOV SGDT** + CLI JMP MOVSB SHL + CLTS** JNB MOVSW SHR + CMC JNBE MUL SLDT** + CMP JNE NEG SMSW** + CMPSB JNLE NOP STC + CMPSW JNO NOT STD + CWD JNP OR STI + DAA JO OUT STOSB + DAS JP OUTSB STOSW + DEC JS OUTSW STR** + DIV LAHF POP SUB + ENTER* LAR** POPA* TEST + ESC LDS POPF WAIT + HLT LEA PUSH VERR** + IDIV LEAVE PUSHA* VERW** + IMUL LES PUSHF XCHG + IN LGDT** RCL XLAT + XOR +___________________________________________ + +* Available only when running on the 186 and 286 processor +** Available only when running on the 286 processor + + +Turbo Debugger supports all 80386 and 80387 instruction +mnemonics and registers: + +80386 instruction mnemonics +_________________________________________ + + BSF LSS SETG SETS + BSR MOVSX SETL SHLD + BT MOVZX SETLE SHRD + BTC POPAD SETNB CMPSD + BTR POPFD SETNE STOSD + BTS PUSHAD SETNL LODSD + CDQ PUSHFD SETNO MOVSD + CWDE SETA SETNP SCASD + IRETD SETB SETNS INSD + LFS SETBE SETO OUTSD + LGS SETE SETP JECXZ +__________________________________________ + +80486 instruction mnemonics +_________________________________________ + + BSWAP INVLPG + CMPXCHG WBINVD + INVD XADD +_________________________________________ + +80386 registers +_________________________________________ + + EAX EDI + EBX EBP + ECX ESP + EDX FS + ESI GS +_________________________________________ + +CPU registers +__________________________________________________________________ + +Byte registers AH, AL, BH, BL, CH, CL, DH, DL + +Word registers AX, BX, CX, DX, SI, DI, SP, BP, FLAGS + +Segment registers CS, DS, ES, SS + +Floating registers ST, ST(0), ST(1), ST(2), ST(3), ST(4), + ST(5), ST(6), ST(7) +___________________________________________________________________ + +Special keywords +_________________________________________ + + WORD PTR TBYTE PTR + BYTE PTR NEAR + DWORD PTR FAR + QWORD PTR SHORT +_________________________________________ + +8087/80287 numeric coprocessor instruction mnemonics +____________________________________________________ + FABS FIADD FLDL2E FST + FADD FIACOM FLDL2T FSTCW + FADDP FIACOMP FLDPI FSTENV + FBLD FIDIV FLDZ FSTP + FBSTP FIDIVR FLD1 FSTSW** + FCHS FILD FMUL FSUB + FCLEX FIMUL FMULP FSUBP + FCOM FINCSTP FNOP FSUBR + FCOMP FINIT FNSTS** FSUBRP + FCOMPP FIST FPATAN FTST + FDECSTP FISTP FPREM FWAIT + FDISI FISUB FPTAN FXAM + FDIV FISUBR FRNDINT FXCH + FDIVP FLD FRSTOR FXTRACT + FDIVR FLDCWR FSAVENT FYL2X + FDIVRP FLDENV FSCALE FYL2XPI + FENI FLDLG2 FSETPM* F2XM1 + FFREE FLDLN2 FSQRT +_____________________________________________________ + +* Available only when running on the 287 numeric coprocessor. +** On the 80287, the fstsw instruction can use the AX register as an + operand, as well as the normal memory operand. + + +80387 instruction mnemonics +_________________________________________ + + FCOS FUCOM + FSIN FUCOMP + FPREM1 FUCOMPP + FSINCOS +_________________________________________ + + +The 80x87 coprocessor chip and emulator +======================================= + +This section is for programmers who are familiar with the operation +if the 80x87 math coprocessor. If your program uses floating-point +numbers, Turbo Debugger lets you examine and change the state of the numeric +coprocessor or, if the coprocessor is emulated, examine the state of the +software emulator. (Windows permits you only to examine the state of the +emulator, not to change it.) You don't need to use the capabilities +described in this chapter to debug programs that use floating-point numbers, +although some very subtle bugs may be easier to find. + +In this section, we discuss the differences between the 80x87 chip and +the software emulator. We also describe the Numeric Processor window and +show you how to examine and modify the floating-point registers, the status +bits, and the control bits. + + +The 80x87 chip vs. the emulator +=============================== + +TDW automatically detects whether your program is using the math chip or the +emulator and adjusts its behavior accordingly. + +Note that most programs use either the emulator or the math chip, not both +within the same program. If you have written special assembler code that +uses both, TDW won't be able to show you the status of the math chip; it +reports on the emulator only. + + +========================================= +6. The Numeric Processor window +========================================= + +You create a Numeric Processor window by choosing the View|Numeric Processor +command from the menu bar. The line at the top of the window shows the +current instruction pointer, opcode, and data pointer. The instruction +pointer is both shown as a 20-bit physical address. The data pointer is +either a 16-bit or a 20-bit address, depending on the memory model. You +can convert 20-bit addresses to segment and offset form by using the first +four digits as the segment value and the last digit as the offset value. + +For example, if the top line shows IPTR=5A669, you can treat this as the +address 5a66:9 if you want to examine the current data and instruction in +a CPU window. This window has three panes: The left pane (Register pane) +shows the contents of the floating-point registers, the middle pane +(Control pane) shows the control flags, and the right pane (Status pane) +shows the status flags. + +The top line shows you the following information about the last floating- +point operation that was executed: + +o Emulator indicates that the numeric processor is being emulated. If there + were a numeric processor, 8087, 80287, 80387, or 80486 would appear instead. + +o The IPTR shows the 20-bit physical address from which the last floating- + point instruction was fetched. + +o The OPCODE shows the instruction type that was fetched. + +o The OPTR shows the 16-bit or 20-bit physical address of the memory address + that the instruction referenced, if any. + + +The Register pane +----------------- + + The 80-bit floating-point registers + ----------------------------------- + + The Register pane shows each of the floating-point registers, ST(0) to + ST(7), along with its status (valid/zero/special/empty). The contents + are shown as an 80-bit floating-point number. + + If you've zoomed the Numeric Processor window (by pressing F5) or made + it wider by using Window|Size/Move, you'll also see the floating-point + registers displayed as raw hex bytes. + + + The Register pane's local menu + ------------------------------ + ___________ + | Zero | + | Empty | + | Change... | + |___________| + + To bring up the Register pane local menu, press Alt-F10, or use the Ctrl + key with the first letter of the desired command to directly access the + command. + + Zero + ---- + + Sets the value of the currently highlighted register to zero. + + Empty + ----- + + Sets the value of the currently highlighted register to empty. This is a + special status that indicates that the register no longer contains valid + data. + + Change + ------ + + Loads a new value into the currently highlighted register. You are + prompted for the value to load. You can enter an integer or floating- + point value, using the current language's expression parser. The value + you enter is automatically converted to the 80-bit temporary real format + used by the numeric coprocessor. + + You can also invoke this command by simply starting to type the new value + for the floating-point register. A dialog box appears, exactly as if you + had specified the Change command. + + +The Control pane +---------------- + + The control bits + ---------------- + + The following table lists the different control flags and how they + appear in the Control pane: +_________________________________________ + + Name in pane Flag description__ + + im Invalid operation mask + dm Denormalized operand mask + zm Zero divide mask + om Overflow mask + um Underflow mask + pm Precision mask + iem Interrupt enable mask (8087 only) + pc Precision control + rc Rounding control + ic Infinity control__ + + + The Control pane's local menu + ----------------------------- + ________ + | Toggle | + |________| + + Press Tab to go to the Control pane, then press Alt-F10 to pop up the + local menu. (Alternatively, you can use the Ctrl key with the first letter + of the desired command to access it.) + + Toggle + ------ + + Cycles through the values that the currently highlighted control flag + can be set to. Most flags can only be set or cleared (0 or 1), so this + command just toggles the flag to the other value. Some other flags have + more than two values; for those flags, this command increments the flag + value until the maximum value is reached, and then sets it back to zero. + + You can also toggle the control flag values by highlighting them and + pressing Enter. + + +The Status pane +--------------- + + The status bits + --------------- + + The following table lists the different status flags and how they appear + in the Status pane: +____________________________________ + + Name in pane Flag description__ + + ie Invalid operation + de Denormalized operand + ze Zero divide + oe Overflow + ue Underflow + pe Precision + ir Interrupt request + cc Condition code + st Stack top pointer_ + + + The Status pane's local menu + ---------------------------- + ________ + | Toggle | + |________| + + Press Tab to move to the Statuspane, then press Alt-F10 to pop up the + local menu. (You can also use the Ctrl key with the first letter of the + desired command to access the command directly.) + + + Toggle + ------ + + Cycles through the values that the currently highlighted status flag + can be set to. Most flags can only be set or cleared (0 or 1), so this + command just toggles the flag to the other value. Some other flags have + more than two values; for those flags, this command increments the + flag value until the maximum value is reached, and then sets it back to + zero. + + You can also toggle the status flag values by highlighting them and + pressing Enter. + +/***************************** END OF FILE *******************************/ + diff --git a/BORLAND/BC45/DOC/TD_HDWBP.TXT b/BORLAND/BC45/DOC/TD_HDWBP.TXT new file mode 100644 index 00000000..1bb08b3c --- /dev/null +++ b/BORLAND/BC45/DOC/TD_HDWBP.TXT @@ -0,0 +1,223 @@ +/*************************************************************************/ + TURBO DEBUGGER + USING THE HARDWARE DEBUGGING FEATURES + + +CONFIGURING YOUR SYSTEM +======================= + +Before you can set hardware breakpoints, you must install TDDEBUG.386. + +Turbo Debugger uses the debug registers of 80386 (and higher) processors to +set hardware breakpoints. However, for Turbo Debugger to take advantage of +the special debug registers, TDDEBUG.386 must be properly installed. +(TDDEBUG.386 provides the same functionality as the Windows SDK file +WINDEBUG.386, with added support for the debug registers.) + +INSTALL.EXE copies TDDEBUG.386 to your hard disk and alters your Windows +SYSTEM.INI file so that Windows loads TDDEBUG.386 instead of WINDEBUG.386. +If you are having problems setting hardware breakpoints, make sure that +TDDEBUG.386 is correctly installed: + + 1) The installation program copies TDDEBUG.386 from the installation disks + to your your language BIN directory. If you move the file to another + directory, substitute that directory in the following instructions. + + 2) With an editor, open the Windows SYSTEM.INI file, search for "[386enh]". + Add the following line to that section: + + device = c:\lang_dir\bin\TDDEBUG.386 + + 3) If there's a line in the [386enh] section that loads WINDEBUG.386, you + must either comment that line out with a semicolon or delete it + altogether. (You can't load both TDDEBUG.386 and WINDEBUG.386.) + +For example, if you load WINDEBUG.386 from the C:\WINDOWS directory, +the commented-out line would read: + + ;device=c:\windows\windebug.386 + + +SETTING HARDWARE BREAKPOINTS +============================ + +There are several ways to set a hardware-assisted breakpoint: + +o Choose Breakpoints|Changed memory global. + + In the input box of the dialog box that opens, enter a memory + address followed by the number of bytes TDW is to watch to determine + if your program has changed anything in that part of memory. If you + enter a variable name or expression as the address, the count refers + to how many objects of that size to watch. + + For example, if your program contains a word-sized variable x, + typing "x,2" causes two objects of size sizeof(x) (4 bytes total) + to be watched. + + When you set a breakpoint using the Changed Memory Global command, Turbo + Debugger automatically determines whether that breakpoint can make use of + the available hardware. If it can, Turbo Debugger sets a hardware + breakpoint for you and indicates that the breakpoint is set in hardware + by putting an asterisk (*) after the global breakpoint number in the left + pane of the Breakpoints window. + +o Choose Breakpoints|Hardware Breakpoint. + + Use this command to set a general-purpose hardware breakpoint. This + command displays the Hardware Breakpoint Options dialog box (described + later). + +o Use the Breakpoint Options dialog box (see the paragraphs after the next + one for an explanation of how to display this dialog box) to get to the + Hardware Breakpoint Options dialog box (described later). + + In the Breakpoint Options dialog box, check the Global checkbox, then + press the Change button to display the Conditions and Actions dialog + box. In this dialog box, select the Hardware radio button in the + Condition group, then press the Hardware button at the bottom of the + box to display the Hardware Breakpoint Options dialog box. + + You can get to the Breakpoint Options dialog box from two locations: + the Breakpoints menu or the Breakpoints view window. + + - Choose Breakpoints|At (Alt-B A) to display the Breakpoint Options + dialog box. + + - Choose View|Breakpoints to display the Breakpoints window. In the left + pane, highlight the breakpoint you want to work with, then display the + local menu (Alt-F10 or right-hand mouse click) and choose the Set + Options or the Add command to display the Breakpoint Options dialog box. + + +USING THE HARDWARE BREAKPOINT OPTIONS DIALOG BOX +================================================ + +This section starts with a description of the hardware and software +limitations on the hardware conditions you can set with Turbo Debugger, +and then explains all the options you can set from the Hardware Breakpoints +dialog box. + + +Hardware conditions permitted with TDDEBUG.386 +---------------------------------------------- + +When you're using TDDEBUG.386 with Turbo Debugger, you can set the following +types of hardware breakpoints from the Hardware Breakpoint dialog box: + +o Instruction fetch + +o Read from memory + +o Read/write memory + +Because you can't set any type of data matching when you use TDDEBUG.386, +you must always set the Data Match radio buttons to Match All. You can +also match only a single memory address or range of memory addresses. +A range can encompass from 1 to 16 bytes, depending on how many other +hardware breakpoints you have set and the address of the beginning of +the range. + +The other options in the Hardware Breakpoint dialog are for other hardware +debuggers and device drivers that might support more matching modes. + + +The Hardware Breakpoint Options dialog box +------------------------------------------ + +This section describes the options on the Hardware Breakpoint Option +dialog box. Remember that your hardware isn't likely to support +all combinations of matching that you can specify from this menu. The +previous section describes the combinations that are allowed for the +TDDEBUG.386 device driver supplied with Turbo Debugger. + +The Hardware Breakpoint Options dialog box lets you set the three matching +criteria that make up a hardware breakpoint: + +o The bus cycle type to be matched + +o The range of addresses to be matched + +o The range of data values to be matched + +For example, a hardware breakpoint might say "Watch for an I/O write +anywhere from address 3F8 to 3FF as long as the data value is equal to +1." This breakpoint will then be triggered any time a byte of 1 is +written to any of the I/O locations that control the COM1 serial port. + +Usually, you set far simpler hardware breakpoints than this, such +as "Watch for I/O to address 200." + + Cycle Type radio buttons + ------------------------ + + With these radio buttons, you can make one of the following settings: + + Read Memory Match memory reads + Write Memory Match memory writes + Access Memory Match memory read or write + Input I/O Match I/O input + Output I/O Match I/O Output + Both I/O Match I/O input or output + Fetch Instruction Match instruction fetch + + The Access Memory option is a combination of the Read Memory and Write + Memory options--it matches either memory reads or writes. Likewise, + the Both I/O option matches I/O reads or writes. + + Some hardware debuggers are capable of distinguishing between simple + data reads from memory and instruction fetches. In this case, if you + set a breakpoint to match on read memory, an instruction fetch from + that location will not trigger the hardware breakpoint. Instruction + cycles include all the bytes that the processor reads in order to + determine the instruction operation to perform, including prefix + bytes, operand addresses, and immediate values. The actual data read + or written to memory referenced by an operand's address is not + considered to be part of the instruction fetch. For example, + + MOV AX,[1234] + + fetches 3 instruction bytes from memory and reads 2 data bytes. If you + use instruction fetch matching, remember that the 80x86 processor + family prefetches instructions to be executed, so you may get false + matches, depending on whether your hardware debugger can sort out + prefetched instructions from ones that are really executed. + + Address radio buttons + --------------------- + + With these radio buttons, you can make one of the following settings: + + Above Match above an address + Below Match below an address + Range Match within address range + Not Range Match outside address range + Less or Equal Match below or equal to address + Greater or Equal Match above or equal to address + Equal Match a single address + Unequal Match all but a single address + Match All Match any address + + + Data Match radio buttons + ------------------------ + + The Data Match radio buttons let you make the following settings: + + Above Match above a value + Below Match below a value + Range Match within value range + Not Range Match outside value range + Less or Equal Match below or equal to value + Greater or Equal Match above or equal to value + Equal Match a single value + Unequal Match all but a single value + Match All Match any value + + If you turn on a Data or Address option that involves any less-than or + greater-than condition, a single address match range either starts at + zero and extends to the value you specified, or starts at the value + you specified and extends to the highest allowed value for addresses + or data. + +/***************************** END OF FILE *******************************/ diff --git a/BORLAND/BC45/DOC/TD_HELP.TXT b/BORLAND/BC45/DOC/TD_HELP.TXT new file mode 100644 index 00000000..2423bfda --- /dev/null +++ b/BORLAND/BC45/DOC/TD_HELP.TXT @@ -0,0 +1,421 @@ +/***********************************************************************/ + TURBO DEBUGGER + TIPS AND HINTS + +This file contains tips and hints concerning problems you might +encounter while using TD.EXE, TDW.EXE, and TD32.EXE. The following +topics are covered: + +1. TDW.INI +2. TDW Hardware Debugging +3. Running TDW under Windows For Workgroups +4. Restart Information/Session State Saving +5. Program Reset +6. Program Interrupt Key +7. Resetting and restarting programs +8. Video Support +9. Windows debugging hints +10. Answers to common questions + + +------------ + 1. TDW.INI +------------ +You must have a single copy of TDW.INI located on your system, and +it must be located in your main Windows directory (usually "\WINDOWS"). +Be sure to delete any extra copies of TDW.INI that you might have on +your system. + +By default, TDW.INI contains the following text: + + [TurboDebugger] + VideoDll = \SVGA.DLL + debuggerDll = \TDWINTH.DLL + + [VideoOptions] + +You can use TD32 to debug under Win32s. However, to do so, you must +ensure you use SVGA.DLL or equivalent support in the VideoDLL entry +in the [TurboDebugger] section of TDW.INI. Use the Turbo Debugger Video +Configuration utility (TDWINI.EXE) to set the required option. + + +--------------------------- + 2. TDW Hardware Debugging +--------------------------- +In order to support hardware debugging in TDW, you need to load +the device driver TDDEBUG.386. Edit your SYSTEM.INI file in the \WINDOWS +directory and add the following statement to the [386enh] section: + + device=\TDDEBUG.386 + +Make sure that you comment out the line that loads the Windows driver +WINDEBUG.386 with a semicolon. For example: + + ;c:\windows\windebug.386 + + +--------------------------------------------- + 3. Running TDW under Windows For Workgroups +--------------------------------------------- +If you use Windows for Workgroups 3.11, you must use TDWINTH.DLL when +you debug with TDW. Be sure the DebuggerDll setting in your +TDW.INI file explicitly points to TDWINTH.DLL. For example: + + debuggerDll=\TDWINTH.DLL + + +--------------------------------------------- + 4. Restart Information/Session State Saving +--------------------------------------------- +Turbo Debugger saves Breakpoint, Inspector, and other session information +when you exit a debugging session. Then, when you restart a debugging +session, Turbo Debugger restores this information. To ignore the restart +information, use Turbo Debugger's -ji command line switch when you load +Turbo Debugger. + +If your system crashes during a debugging session, your configuration +file is likely to become corrupt. This can cause Turbo Debugger to hang +on startup. Because of this, it is advisable to delete any .TR, .TRW, or +.TR2 files from your hard disk if you crash during a debugging session. + + +------------------ + 5. Program Reset +------------------ +Dialog applications that do not have a parent window will cause your +system to hang if you reload the application. + + +-------------------------- + 6. Program Interrupt Key +-------------------------- +Under TD: Ctrl-Break +Under TDW: Ctrl-Alt-SysReq +Under Win32s: Ctrl-Alt-F11 +Under NT: F12 + + +-------------------------------------- + 7. Resetting and restarting programs +-------------------------------------- +When you reload or reset a program a number of times under Windows 32s, +it is likely that you will run out of memory. This problem has been +reported to Microsoft. + +If Turbo Debugger fails to start correctly, especially after a system +crash, the debugger session state and configuration files may be +corrupted. Try removing the following files: + +For TD: TDCONFIG.TD + ***.TR + +For TDW: TDCONFIG.TDW + ***.TRW + +For TD32: TDCONFIG.TD2 + ***.TR2 + +Where *** equals your application's name. + +These files will be found in either the working directory, +the \BorlandC\Bin directory, or the \Windows directory. + + +------------------ + 8. Video Support +------------------ +Turbo Debugger requires that you use the correct Windows video driver +for your video card. For example, if you have a TSENG card, make sure +that you are using the TSENG Windows video driver (the generic VGA +video driver does not work correctly with this video card). + +To find out what type of video card you have installed in your +machine, type MSD at the DOS prompt. Use the TDWINI.EXE +utility to set up your video driver. + +SVGA.DLL supports most video card configurations, provided that you +are using the correct Windows video drivers. Use the Turbo Debugger Video +Configuration utility (TDWINI.EXE) to determine the correct Video Support +for your adapter. + + +Screen not being repainted +-------------------------- +Ensure that the "ForceRepaint" flag is set to "Yes" in the +VideoOptions section of TDW.INI: + + [VideoOptions] + ForceRepaint=Yes + +This can be done through the Turbo Debugger Video Configuration +utility (TDWINI.EXE). + + +Dual Monitor Support under Windows 32s +-------------------------------------- +TD32 can support dual monitor debugging under Windows 32s. +Ensure that a monochrome adapter is installed in your machine +and set the Mono flag in the [VideoOptions] section of TDW.INI +to "Yes." + + [VideoOptions] + MONO=yes + +This can be done through the Turbo Debugger Video Configuration +utility, TDWINI.EXE. + + +--------------------------- +9. Windows debugging hints +--------------------------- +View|Windows Messages + +1) If you set up View|Windows Messages to display messages for + more than one procedure or handle or both, do not log all + messages. Instead, log specific messages for each procedure or + handle. If you log all messages, the system might hang, in + which case you will have to reboot to continue. This behavior + is due to the large number of messages being transferred + between Windows and Turbo Debugger. + +2) When setting a break on the Mouse class of messages, note that + a "mouse down" message must be followed by a "mouse up" message + before the keyboard will become active again. When you return + to the application, you might have to press the mouse button + several times (or press the key) to get Windows to receive a + "mouse up" message. You'll know Windows has received the message + when you see it in the bottom pane of the Windows Message window + after the program breaks. + + +-------------------------------- +10. Answers to common questions +-------------------------------- +Following is a list of the most commonly asked questions about TDW: + +1) Are there any syntactic or parsing differences between Turbo + Debugger's C expression evaluation and Turbo C++ for Windows'? + + You can't pass constant-string arguments when evaluating + functions. + + OK: myfunc(123) myfunc(string_variable) + + BAD: myfunc("constant") + +2) What should I be aware of when I am debugging multilanguage + programs with Turbo Debugger? + + Turbo Debugger's default source language is "Source," which + means it chooses the expression language based on the current + source module. This can cause some confusion if your program + has source modules written in different languages (like C + and assembler). Since you are actually entering a language + expression any time Turbo Debugger prompts you for a value + or an address, this can cause some unexpected results: + + a. Even if you are in a CPU window or a Dump window, you + must still enter addresses in the source language, + despite the fact that the window is displaying in hex. + For example, to display the contents of memory address + 1234:5678, you must type one of the following + expressions, depending on your current source language: + + C 0x1234:0x5678 + Pascal $1234:$5678 + Assembler 1234H:5678H + + b. When your current language is assembler, you must be + careful when entering hex numbers, since they are + interpreted EXACTLY as they would be in an assembler + source file. This means that if you want to enter a + number that starts with one of the hex digits A - F, you + must first precede the letter with a 0 so Turbo Debugger + knows you are entering a number. Likewise, if your number + ends in B or D (indicating a binary or decimal number), you + must add an H to indicate that you really want a hex number: + + OK: 0aaaa 123dh 89abh + + BAD: aaaa 123d 89ab + +3) Why does the text "Cannot be changed" come up when I do an + assignment in the Data/Evaluate/Modify "New value" pane? + + If you use the Data/Evaluate/Modify command (Ctrl-F4) to + change a variable by direct assignment, the "New value" pane + will say "Cannot be changed." This doesn't mean the + assignment didn't take effect. What it does mean is that the + assignment expression as a whole is not a memory-referencing + expression whose value you can change by moving to the + bottom pane. Here are some examples of direct assignment + expressions: + + C x = 4 + Pascal ratio := 1.234 + Assembler wval = 4 shl 2 + + If you had typed just "x," "ratio," or "wval" into the top + pane, then you would be able to move to the bottom pane and + enter a new value. The direct assignment method using the + "=" or ":=" assignment operator is quicker and more + convenient if you don't care about examining the value of + the variable before modifying it. + + +4) What could happen when global breakpoints are set on local + variables? + + When you set global breakpoints using local variables, make + sure the breakpoints are cleared before you exit the + procedure or function that the variables are defined in. The + best way to do this is to put a breakpoint on the last line + of the procedure or function. If you do not clear the + breakpoints, your program will break unexpectedly and may + even hang on some machines because the breakpoints are being + set in memory that is not currently being used by the + procedure or function. + +5) Why is execution slower when tracing (F7) than when stepping + (F8) through my programs? + + TDW can do reverse execution, which means that when you are + tracing through your program, TDW could be saving all the + information about each source line you trace over. TDW only + saves this information in the Module window if you have chosen + View|Execution History and toggled the Full History local menu + command to 'Yes'. + + If you want faster execution you can step over (F8) the instruction + or toggle the Full History option to 'No' in the Execution History + window. (Although reverse execution is always available in the + CPU view, you must toggle this option to 'Yes' for it to work + in the Module view. The default setting in the Module view is 'No'.) + +6) What are some of the syntactic and parsing differences + between Turbo Debugger's built-in assembler and the + standalone Turbo Assembler? + + A discussion follows this short example program: + + .model small + .data + + abc struc + mem1 dd ? + mem2 db ? + mem3 db " " + abc ends + + align 16 + a abc <1,2,"xyz"> + + msg1 db "testing 1 2 3", 0 + msg2 db "hello world", 0 + nmptr dw msg1 + fmptr dd msg1,msg2 + nfmptr dw fmptr + xx dw seg a + + .code + + push cs + pop ds + mov bx,offset a + mov bx,nmptr + les si,fmptr + mov ah,4ch + int 21h + end + + Because the assembler expression parser does not accept all legal + TASM instruction operands, Turbo Debugger assembler expressions + can be more general than those of TASM and can use multiple levels + of memory-referencing, much like C and Pascal. However, there are a + few constructs that you may be used to that you'll have to specify + differently for the Turbo Debugger assembler expression parser to + accept them: + + a. Size overrides should always appear inside the + brackets; PTR is optional after the size. Also, when + referring to a structure, you must use the name of the + structure, not the name of the variable: + + OK: [byte ptr bx] [dword si] [abc bx] + + BAD: byte ptr[bx] [struc abc bx] [a bx] + + b. You must specify a structure name when accessing the + members of a structure with a register pointer. + + OK: [abc ptr bx].mem1 [abc bx].mem3 + 1 + + BAD: [bx].mem1 + + c. You can't use multiple instances of brackets ([]) unless they are + adjacent, and you can only follow a bracketed expression with + a dot and a structure member name or another bracketed + expression: + + OK: 4[bx][si] [abc bx].mem2 + + BAD: [bx]4[si] [bx]+4 + + d. If you use a register as part of a memory expression + and you don't specify a size, WORD is assumed: + + [bx] is the same as [word bx] + + e. You can use any register you want between brackets ([]), + not just the combinations of BX, BP, SI, and DI allowed in + instruction operands. For example, + + [ax+bx] + [bx+sp] + + f. You can use multiple levels of brackets to follow chains of + pointers. For example, + + [byte [[nfmptr]+4]] + + g. Be careful with using registers to access memory locations. + You might get unexpected results if your segment + registers are not set up properly. If you don't + explicitly specify a segment register, Turbo Debugger + uses the DS register to reference memory. + + h. When you do specify a segment register, make sure you + follow the same rule for size overrides: put it + INSIDE the brackets, as follows: + + OK: [byte es:di] [es:fmptr] + + BAD: es:[byte di] + + i. Use the OFFSET operator to get the address of a + variable or structure. Turbo Debugger automatically + supplies the brackets around a variable name if you just type + the variable name alone. + + a contents of structure a + [a] contents of structure a + offset a address of structure a + + j. You can use the type overrides and the format control + count to examine any area of memory displayed as you wish. + + [byte es:bx],10 10 bytes pointed to by es:bx + [dword ds:si],4 4 dwords pointed to by ds:si + + This is very useful when specifying watch expressions. + + k. Sometimes you use a word memory location or register to + point to a paragraph in memory that contains a data + structure. Access the structure with expressions like + + [abc [xx]:0].mem1 + [abc es:0].mem3 + +/************************* END OF FILE *****************************/ + diff --git a/BORLAND/BC45/DOC/TD_RDME.TXT b/BORLAND/BC45/DOC/TD_RDME.TXT new file mode 100644 index 00000000..edd1a537 --- /dev/null +++ b/BORLAND/BC45/DOC/TD_RDME.TXT @@ -0,0 +1,327 @@ +/*************************************************************************/ + TURBO DEBUGGER + Turbo Debugger Readme file + +This file discusses the following Turbo Debugger related topics: + + 1. Just-In-Time debugging with TD32 + 2. New tools + 3. Debugging throw calls + 4. Debugging under Win32s + 5. Corrupt session state files + 6. Using TD.EXE in a Windows DOS box + 7. Debugging multiple applications using TDW + 8. TDW and + 9. TDW and TD32s' Icons + 10. Resetting an application that's running under TDW + 11. Resetting a process that's attached to TD32 + 12. Network messages and TDW and TD32 + 13. Debugging DLL's via LoadLibrary under Windows + 14. PENDING activity indicator + 15. TDW Video Support with Resource intensive applications + 16. TDW & The Integrated Debugger with PC Tools for Windows version 1.0. + 17. Using TDW with Borland C++ and Borland Pascal + 18. C++ exception handling + + +1. Just-In-Time debugging with TD32 +----------------------------------- +Windows NT gives TD32 the ability to trap application exceptions, +even when TD32 is not running. If your application encounters an exception, +the Windows NT Program Registry can automatically launch TD32. TD32 then +displays the source line where the exception occurred. + +To set up Just-In-Time debugging, you must specify a debugger in the +Windows NT program registry. Once set up, Windows NT starts the registered +debugger in the event of an application error. This mechanism lets you +connect TD32 to any process that fails. + +Windows NT displays an Application Error dialog box when an unhandled +exception occurs. The dialog box provides an OK button, which you can +choose to terminate the application. However, if you register a debugger +in the Windows NT program registry, the dialog box will also contain a +CANCEL button. Choosing CANCEL invokes the registered debugger. + +To add TD32 to the program registry: + 1) Run the program JITIME.EXE (located in your Borland C++ BIN directory) + from Windows NT. + + 2) Check one of the following: + TD32 -- Registers TD32.EXE as the default debugger + Dr. Watson -- Registers WinSpector as the default debugger + None -- Does not register any debugger + Other -- Registers the debugger of your choice + + 3) Select Confirm Invocation if you want the Application Error dialog + box to display a CANCEL button. If Confirm Invocation is not checked, + Windows NT automatically starts the selected debugger when any + application error occurs. + + +2. New tools +------------ +The 16-bit linker now handles symbol tables larger than 64K in the +debug information for an .EXE file. This change required a modification +to the format of the debug information generated by the linker. As a +result, the following tools have been updated to correspond to this +TLINK modification: + + TDW, TDUMP, the IDE Debugger, the IDE Browser + +If you attempt to use any of the new tools with old executable files, +they will output an error message and refuse to run. To work around this +condition, relink your application using the new TLINK.EXE. However, if you +use an old version of TDUMP it checks for version 4.0 and later. +If TDUMP generates garbage when dumping an executable file, check the symbolic +debug version number contained in the header. If it is version 4.01, make sure +that you are using the correct version of TDUMP (TDUMP prints out "Version 4.1" +in the banner when you run it). + + +3. Debugging throw calls +------------------------ +If you step over or into a throw() call, the application will run until it +reaches a breakpoint or program termination instead of stopping at the +appropriate catch() function. To debug catch() functions, set breakpoints +within the functions. + + +4. Debugging under Win32s +------------------------- +a) To use TD32 under Windows 3.1, you must have Win32s installed. Win32s +is usually installed at the same time you install BC45. If Win32s is not +properly installed, TD32 will not run under Windows 3.1. To verify that +Win32s is properly installed, run the Freecell application supplied with +Win32s. + +b) Because Win32s does not run under Windows 3.0, TD32 is not compatible +with Windows 3.0. + +c) TD32 can support dual monitor debugging under Win32s. Ensure that +a monochrome adapter is installed in your machine and set the +[VideoOptions] section of TDW.INI to the following setting: + + [VideoOptions] + MONO=yes + +This operation can be performed automatically by using the TDWINI.EXE Video +Configuration Utility and selecting the Mono option in the SVGA.DLL Settings +Dialog. + +d) You cannot trace into Windows kernel code when you debug with TD32 under +Win32s. TD32 steps over any call that steps into the kernel code. If you +attempt to step into a statement that does not have debug information, and +that statement calls the kernel code, TD32 will not perform a Screen Swap +unless Display Options are set to Always or unless you are using the +TDWGUI.DLL video driver. + +e) See the online text file TD_HELP.TXT for more information on +using TD32 and TDW. + + +5. Corrupt session state files +------------------------------ +If your machine locks up while you are debugging a Windows application, +it is best to delete any session state files before restarting the debugger. +This can be done by either deleting the session state files or by starting +the debugger with the -jn command-line option. + + +6. Using TD.EXE in a Windows DOS box +------------------------------------ +The TD.PIF file included with the BC45 installation insures the proper +settings for running the DOS based Turbo Debugger (TD.EXE) in a Windows +DOS box. If need be, you can create this .PIF file using Window's Pif +editor, and setting the following values: + + Program Filename: TD.EXE + Window Title: Turbo Debugger for DOS + Video Memory: Text + Memory Requirements: 128 -1 + EMS: 0 -1 + XMS Memory 0 3096 + Execution: Background & Exclusive enabled + ( required for Dual Monitor debugging ) + + Close Window on Exit. + + Advanced Options: + Memory Options: Lock Application Memory. + Display Options: Retain Video Memory. + +TD.EXE running in a DOS Box results in heavy use of the GDI resources. +Running a high resolution video driver on some video adapters while +running multiple applications can result in an inability to display +High Resolution Graphics. If this is the case, close one or more of the +Windows applications that are currently running. + + +7. Debugging multiple applications using TDW +-------------------------------------------- +You can debug multiple applications under TDW as follows: + + 1. Load the first program to be debugged into TDW. + + 2. Once the application is loaded, press the F3 key to + display the Load Module Source or DLL Symbols dialog box. + + 3. In the DLL Name text entry box, enter the name of the + .EXE or DLL to add. If the .EXE or DLL resides in + another directory, you need to provide the full path. + + 4. Press . TDW adds the program name to the + DLLs & Programs list box and puts the !! symbol after it. + + 5. Close the Load Module Source or DLL dialog box, return to + the Module window, and set any necessary breakpoints in + the first program. + + 6. Press F9 to run the first program. + + 7. Switch to the Windows Program Manager while the first + program is running and run the second program in the + usual way. + + 8. You see the display switch back to TDW with the CPU + window showing the start-up information of the second + application. Close the CPU window. + + 9. In the Module window, set any necessary breakpoints in + the second application, then press the F9 key to run it. + + This method is useful for debugging DDE conversations or any + other inter-program communication in the Windows environment + (such as OLE 2 applications). + + +8. TDW and +------------------------------ +When you're debugging with TDW, you can press to +interrupt the application being debugged and to return control to TDW. +However, the behavior in TDW 4.0 has changed slightly to accommodate the +use of Microsoft's TOOLHELP.DLL. If your application is idle when you +interrupt its execution, TDW posts a WM_NULL message to the application +to "wake it up" so it can respond to the interrupt. Because of this, you +may need to press a number of times before you get a +response from the application being debugged. + + +9. TDW and TD32s' Icons +----------------------- +The Working Directory settings in the Turbo Debugger icons have been slightly +changed. To accommodate for DLLs in the working directory of the application +being debugged, TDW & TD32 set the working directory to the directory used +in the Command Line input box. Because of this, TDW and TD32 ignores any +directories input into the Working Directory input box. You can work around +this by using the -t command line option without supplying a path. For example + + TDW -t MYAPP.EXE + +In this case, the debugger uses the icon property's working directory, but it +will not be able to find the applications .DLL files. + + +10. Resetting an application that's running under TDW +----------------------------------------------------- +If you reset TDW before running the application you're debugged runs to +completion, Windows will not free the applications resources. To prevent +this from occurring, run the application being debugged to completion +before restating it. Resources are freed by Windows only when an application +has been terminated via a WM_QUIT message. + + +11. Resetting a process that's attached to TD32 +----------------------------------------------- +TD32 cannot reset a process which you have attached to using the File|Attach +command. If you reset or terminate a process that you attached to, you must +start a new debugging session. + + +12. Network messages and TDW and TD32 +------------------------------------- +Network message broadcasts must be disabled when you run either TDW or TD32. +It is recommended that you disable message broadcasts from your Windows +Network dialog in the Control Panel. + + +13. Debugging DLL's via LoadLibrary under Windows +------------------------------------------------- +If you are debugging a .DLL inside TDW, and the source for the .DLL resides +in a different directory, make sure that TDW's