advr.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
StringAddress Routine Details
  Summary  Details  Example                Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
 far-address = StringAddress(string-descriptor%);
 
 Usage Notes
   ■ The StringAddress syntax is for the C language.
 
   ■ If you are not doing mixed-language programming, there is usually no
     reason to use StringAddress. In Visual Basic, you can use SSEGADD to
     find the far address of a variable-length string.
     See: SSEGADD Function
 
   ■ Calls to the StringAddress routine are always made from a non-Basic
     routine to find the address of a string that was transferred to Visual
     Basic from the non-Basic routine.
 
     For example, assume that you have passed a string from a MASM routine
     to Visual Basic's string space using StringAssign. The descriptor for
     the string exists at offset descriptor. MASM can find the far address of
     the string data by using the following code:
 
         .model
          extrn        stringaddress: far
 
         .code
          lea          ax, descriptor        ; offset of descriptor
          push         ax
          call         stringaddress
 
     The far address is returned in DX:AX. DX holds the segment and AX
     holds the offset.