× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi Buck.
Thanks for you quick reply.  I'm not really sure what loads
bufferdtafld.  I got this code from an example and modified to output to
a file.  I really have not used pointers in the past, and while
understand the underlying principal, it is still a little fuzzy.  Here
is all the code:

 D BufferHdl       S             10I 0
 D BufferSize      S             10I 0 Inz( 1920 )
 D BufferIncr      S             10I 0 Inz( 1920 )
 D NbrBytesRead    S             10I 0
 D BufferPtr       S               *
 D BufferDtaFld    S          32767    Based( BufferPtr )
 D BufferDta       S          32767
 D BufferPos       S             10I 0 Inz( 1 )
 D NoAPIError      C                   Const( *Zero )
 D APIErrorPassed  S              1N
 D Status          S              1N
 D APIErrorDS      DS
 D  BytesProvided                10I 0 Inz( %Size( APIErrorDS ) )
 D  BytesAvail                   10I 0 Inz( *Zero )
 D  MsgID                         7    Inz( *Blanks )
 D  Reserved                      1    Inz( X'00' )
 D  MsgDta                      256    Inz( *Blanks )
  *  -------------------------------------------------------------------

 *  -------------------------------------------------------------------
 *  - Determine whether API error parameter was passed                -
 *  -------------------------------------------------------------------
C                   If        %Parms > *Zero
C                   Eval      APIErrorPassed = *On
C                   EndIf
 *  -------------------------------------------------------------------
 *  - Create input buffer                                             -
 *  -------------------------------------------------------------------
C                   Reset                   APIErrorDS
C                   Eval      BufferHdl = CrtInputBuffer(
C                                                         BufferSize :
C                                                         BufferIncr :
C                                                         *Omit      :
C                                                         *Omit      :
C                                                         APIErrorDS
C                                                       )
C                   If        BytesAvail <> NoAPIError
C                   ExSr      ReturnError
C                   EndIf
  *  ------------------------------------------------------------------
  *  - Read screen image
  *  ------------------------------------------------------------------
 C                   Reset                   APIErrorDS
 C                   Eval      NbrBytesRead = ReadScreen(
 C                                                        *Omit      :
 C                                                        BufferHdl  :
 C                                                        *Omit      :
 C                                                        *Omit      :
 C                                                        APIErrorDS
 C                                                      )
 C                   If        BytesAvail <> NoAPIError
 C                   ExSr      ReturnError
 C                   EndIf
  *  ------------------------------------------------------------------
  *  - Retrieve pointer to buffer data
  *  ------------------------------------------------------------------
 C                   Reset                   APIErrorDS
 C                   Eval      BufferPtr = RtvBufferPtr(
 C                                                       BufferHdl  :
 C                                                       *Omit      :
 C                                                       APIErrorDS
 C                                                     )
 C                   If        BytesAvail <> NoAPIError
 C                   ExSr      ReturnError
 C                   EndIf
  *  -------------------------------------------------------------------

  *  - Retrieve input buffer data and print screen image               -

  *  -------------------------------------------------------------------

 C                   Eval      BufferDta = BufferDtaFld
(errors here)
 C                   DoW       BufferPos <= NbrBytesRead
 C                   Eval      ScrnData = %Subst(
 C                                                BufferDta        :
 C                                                BufferPos        :
 C                                                %Size(ScrnData )
 C                                              )
 C                   Open      ScrnImg
 C                   Write     fScrnimg
 C                   Close     ScrnImg
 C                   Eval      BufferPos = BufferPos + %Size( ScrnData )

 C                   EndDo
  *  -------------------------------------------------------------------

I have compared V4R4 to V4R5 API's and they look the same to me.
Thanks again.
Alison




As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.