C++ Support News Volume 1 Number 1








  PRODUCT  :  Borland C++                           NUMBER  :  8500
  VERSION  :  All
       OS  :  All
     DATE  :  July 31, 1993                            PAGE  :  1/7

    TITLE  :  C++ Support News Volume 1 Number 1




                          _C++ Support News_
  ----------------------------------------------------------------
             volume 1, number 1           April 19, 1993
  ----------------------------------------------------------------
  +--------------------------------------------------------------+
  | Welcome to the first issue of the Language Technical Support |
  | newsletter _C++ Support News_!                               |
  |                                                              |
  | The world of application development continues to grow in    |
  | complexity every day.  The introduction of new operating en- |
  | vironments like Windows, OS/2, Win32s, and Windows NT, new   |
  | paradigms like OOP, and the introduction of application      |
  | frameworks all challenge the software developer.  Now more   |
  | than ever, it is important that you have timely access to    |
  | critical information that can help you meet your project     |
  | milestones.                                                  |
  |                                                              |
  | The Borland Language Technical Support Group is the world-   |
  | wide information center for Borland language products.  Ev-  |
  | ery week we are contacted by thousands of Borland language   |
  | customers!  In the process of working with our Research &    |
  | Development and Quality Assurance teams, our products, and   |
  | our customers, we generate a huge amount of information!     |
  |                                                              |
  | With the newsletter _C++ Support News_, we have distilled    |
  | that information down to what we consider the most interest- |
  | ing and important information from the previous week.  Here  |
  | you'll find out about the latest Technical Information docu- |
  | ments, patches, workarounds, tips, compatibility issues,     |
  | utilities, programming examples, DLL's, etc.                 |
  |                                                              |
  | Every Monday, by 3:00pm PST, _C++ Support News_ will be a-   |
  | vailable via CompuServe, BIX, Genie, the Borland DLBBS, the  |
  | Borland OAS, and TechFAX.  Don't miss an issue!  Make sure   |
  | you get your copy of the Borland Languages Technical Support |
  | _C++ Support News_ and keep your projects on track!          |
  |                                                              |
  | Jim Fitzgerald                                               |
  | Manager of Borland Language Support                          |
  |                                                              |
  +--------------------------------------------------------------+















  PRODUCT  :  Borland C++                           NUMBER  :  8500
  VERSION  :  All
       OS  :  All
     DATE  :  July 31, 1993                            PAGE  :  2/7

    TITLE  :  C++ Support News Volume 1 Number 1




  WELCOME!

  This newsletter is an extension of what previously was available
  internally to all support engineers at Borland, but we felt that
  much of the information and expertise that we have developed and
  are continuing to develop can benefit you, the customer, to cre-
  ate more effective applications using our Borland C++ and Turbo
  C++ compilers.  This newsletter's main purpose is to serve as
  yet another means of disseminating information in a timely fas-
  hion about common uses and issues brought to our attention.
  Coupled with our other electronic services for information re-
  trieval (TechFAX at (800)822-4269, OAS (Online Automated System)
  at (408)431-5250, our bulletin board (BBS) at (408)439-9096),
  and the numerous forums available via CompuServe, C++ Technical
  Support is expanding its means of providing technical informa-
  tion to developers beyond the services already available by
  calling us directly via our Programmer's Advisor service at
  (900)555-1002 or standard support at (408)461-9133.

  The format of this newsletter will concentrate on common issues
  and idiosyncrasies we are aware of in applying the C++ program-
  ming language to the DOS, OS/2, and Windows platforms.  We will
  also offer tips on using the various libraries available from
  Borland -- ObjectWindows, Turbo Vision, and the Paradox Engine.

  So welcome to our first newsletter!  We will be adjusting the
  format in these first issues, but our goal will always be the
  same in attempting to provide key information which will aid you
  in developing applications more quickly and effectively.


  DOS

  1.  Most general protection faults experienced during compila-
      tion with Borland C++ or Turbo C++ 3.0 for DOS can be rem-
      edied by booting a truly minimal (clean) system and changing
      into the compiler's \BIN directory before running DPMIINST.
      DPMIINST analyses various motherboard parameters to deter-
      mine the exact way to switch between real and protected mode
      which is imperative since the compiler is running in pro-
      tected mode except for those times when DOS interrupts have
      to be called necessitating dropping down to real mode.  GP
      faults result in the DPMI server finding that a process is













  PRODUCT  :  Borland C++                           NUMBER  :  8500
  VERSION  :  All
       OS  :  All
     DATE  :  July 31, 1993                            PAGE  :  3/7

    TITLE  :  C++ Support News Volume 1 Number 1




      attempting to access memory that has not been allocated to
      it.  This can occur due to inconsistencies in switching
      modes.


  OS/2

  1.  When writing DLL's with Borland C++ for OS/2 which are to
      be used with executables created elsewhere, be sure to set
      the _multidll global variable to zero.  eg.

            extern int _multidll = 0;

      Only one instance of the run-time library is needed with ap-
      plications created with the compiler, such that setting
      _multidll to zero instructs the DLL to load the run-time
      library itself.

  2.  Context-sensitive help within the IDE does not support the
      various functions found within the OS/2 API.  The reason
      for this is that the IBM OS/2 API help files are in the INF
      format where the Windows help files are in HLP format.
      The Borland C++ for OS/2 IDE uses the HLP format which is
      incompatible with INF indexing.  Users attempting to in-
      voke context-sensitive help with OS/2 API function calls
      will experience a "Link not found" message.  If the GASP
      Service Pack is installed, two "Link not found" messages
      will be generated when attempting to use context-sensitive
      help on the standard runtime library functions.

  3.  The DOS versions of Borland C++ 3.1 and Turbo C++ 3.0 can
      each be run within DOS windows under OS/2 2.0 as long as
      the DPMI_DOS_API switch found within DOS Settings is
      changed from its default, Auto, to Enabled.  OS/2 will
      thus be aware that memory accesses will comply to the
      DPMI standard.


  WINDOWS

  1.  The ExitWindows() function is used when you are writing a
      replacement for Program Manager.  It sends the
      WM_QUERYENDSESSION message to all applications which init-













  PRODUCT  :  Borland C++                           NUMBER  :  8500
  VERSION  :  All
       OS  :  All
     DATE  :  July 31, 1993                            PAGE  :  4/7

    TITLE  :  C++ Support News Volume 1 Number 1




      iates system shutdown.  If all applications will shut down,
      a WM_ENDSESSION message is sent to all applications before
      exiting Windows.  This function is necessary if you are
      writing your own shell.

  2.  If you are using Borland's custom controls, and your appli-
      cation runs correctly within the IDE, but you get an error
      message of -5 when executing outside of the IDE, this indi-
      cates that the program could not find its resource.  Most
      likely, BWCC.LIB was not included in the project.  If you
      have already done this, and you still get the -5 message,
      use the BWCCGetVersion() function to ensure that BWCC.DLL
      is loaded.  The rationale is that the BWCC.DLL is already
      loaded by the IDE.  As soon as the IDE is out of the pic-
      ture, the DLL is not found, and error message is generated.

  3.  The copy of BWCC.DLL shipped with Paradox for Windows 1.0
      revealed certain problems within Resource Workshop.  These
      have been fixed with a newer version of BWCC.DLL which can
      be found on the DLBBS, CompuServe, Genie, and BIX as
      BWCC.ZIP.  Included in this archive is a newer copy of
      BWCC.H which resolves common problems in the Resource Work-
      shop such as "Expression not found".


  TURBO VISION

  1.  To stop the mouse from disappearing off the bottom of the
      screen after switching back from 43/50 line mode in TVFORMS,
      add the following after line 193 of TVFORMS.CPP of the
      handle event:

       setScreenMode(newMode);       // line 193 of TVFORMS.CPP
       TRect r = getExtent();
       TMouse::setRange(rb.x - 1, rb.y - 1);

  2.  Modifying resource files can be tricky;  the reason for this
      is that you have to read information from the stream before
      you can write anything out, and the resource file is general-
      ly only opened in output mode (ios::out).  This is alright
      the first time that data is written to the resource file,
      but it will not work if you are modifying an existing re-
      source file.  No error message will be generated, and what













  PRODUCT  :  Borland C++                           NUMBER  :  8500
  VERSION  :  All
       OS  :  All
     DATE  :  July 31, 1993                            PAGE  :  5/7

    TITLE  :  C++ Support News Volume 1 Number 1




      is read may not be valid.  To correct this, open the
      fpstream with the parameters --

       ios::in | ios::out | ios::binary

      in order to modify a resource file.


  PARADOX ENGINE

  1.  Paradox Engine 3.01 is now available to users of version 3.0
      of the Paradox Engine for $15.00 (shipping & handling). Con-
      tact Customer Service at (408)461-9000 or GO BORCS for Compu-
      Serve users.  This maintenance release fixes problems with
      PXSrchFld() and several lesser problems including "Internal
      Error 248" and running out of file handles.

  2.  PXErrMsg() is not in the library by design for the Paradox
      Engine 3.0.  You must include PXMSG.C in your project in or-
      der to access this function.

  3.  To use the dynamic version of the Paradox Engine 3.0 Data-
      base Framework for Windows, use the following to compile.
      Leaving out an option will cause undefined symbols -- e-
      specially BCURSOR, BRECORD, BDATABASE, and ostream operator
      symbols.  In the PXENG30\C\SOURCE directory, use the fol-
      lowing to build DBFENG.LIB:

       make -B -DMDL=L -DDYNAMIC -DWINDOWS -fmakefile.bc

      and then use the following to compile your application:

       bcc -W -ml -IC -D_CLASSDLL mine.cpp pxengwin.lib
              dbfeng.lib crtdll.lib

      or in the IDE, set the following options:

       1.  switch to large memory model in Options|Compiler|
              Code Generation
       2.  in the Defines area, add _CLASSDLL
              (ie. STRICT;_CLASSDLL)
       3.  turn on case sensitive link and case sensitive
              exports under Options|Linker|Settings.













  PRODUCT  :  Borland C++                           NUMBER  :  8500
  VERSION  :  All
       OS  :  All
     DATE  :  July 31, 1993                            PAGE  :  6/7

    TITLE  :  C++ Support News Volume 1 Number 1




       4.  use the dynamic version of the Run Time Library
              under Options|Linker|Libraries.


  QUIZ

  Which code fragment runs the fastest?  Given the definitions --

      int i, c;

  a.  if (i & 0x01)
        c = 5;
      else
        c = 7;

  b.  c = 7;
      if (i & 0x01)
        c = 5;

  c.  c = (i & 0x01) ? 5 : 7;

  The answer will be given in the next issue of the _C++ Support
  News_.


  NEW TECHNICAL INFORMATION DOCUMENTS AVAILABLE

  Technical Support is making a concerted effort to increase the
  number of technical documents available to customers.  Some of
  the newer titles (and a few old ones too) include --

       TI864     Understanding "Undefined Symbol" Error Messages
       TI738     Memory Corruption
       TI1006    Overlaying Turbo Vision
       TI1011    Modeless Dialog Boxes Using Turbo Vision
       TI1037    Configuring/Using Turbo Debugger for Windows
       TI1045    The Borland Paradox Engine & Database Frame-
                      works 3.0
       TI1054    Resolving OWL Error Codes -5 and -1
       TI1157    Determining the Total Amount of Extended Mem-
                      ory from CMOS
       TI1060    Modifying Turbo Vision Menus at Run-time
       TI1320    Understanding MAP files Generated by the Borland













  PRODUCT  :  Borland C++                           NUMBER  :  8500
  VERSION  :  All
       OS  :  All
     DATE  :  July 31, 1993                            PAGE  :  7/7

    TITLE  :  C++ Support News Volume 1 Number 1




                      Linker

  These are only a few of what can be found in LIB-2 of either
  BCPPDOS and BCPPWIN under CompuServe, our download BBS, Tech-
  FAX, and OAS.


  MISCELLANEOUS

  With the standardization of the C programming language, Techni-
  cal Support periodically gets questions concerning the port-
  ability issues of old code to our newer compilers -- namely
  questions as to what changes are needed to compile older syn-
  tax.  The best reference for definitive information on this
  subject is the ANSI/ISO Standard for the C Programming Lang-
  uage.  The American National Standards Institute (ANSI) is
  the parent organization responsible for the creation of the
  X3J11 Technical committee back in 1983 which formulated the
  draft which was eventually accepted by both ANSI itself and
  later by the International Standards Organization (ISO).
  The C Standard can be ordered from ANSI at the following
  address for $130.00 + 7% shipping and handling.

       American National Standards Institute
       ATTN:  Customer Service
       11 W. 42nd Street
       New York, NY  10036
       (212)642-4900



  DISCLAIMER: You have the right to use this technical information
  subject to the terms of the No-Nonsense License Statement that
  you received with the Borland product to which this information
  pertains.














Comments

Popular posts from this blog

WHAT THE WATCH TOWER BIBLE AND TRACT SOCIETY OF PENNSYLVANIA HAD TO SAY ABOUT WHAT WERE SUPPOSED TO HAVE HAPPENED in 1874

Uninterruptable Power Source (UPS) FAQ

Blade Runner FAQ