[comp.sys.apple] ORCA/C and returning GSString's...

sysop@pro-generic.cts.com (Matthew Montano) (10/19/89)

Ok you netters..

After a call to the GS/OS DInfo call, I can pull everything I need out and
place in my own convinient variables, EXCEPT the name of the device.

What way can I take the pointer "DInfoRec.devName" and manage to pull the name
(stored in GSString32.text) into my own string... in a simple few steps.

Help?


UUCP: crash!pro-generic!sysop
ARPA: crash!pro-generic!sysop@nosc.mil
INET: sysop@pro-generic.cts.com

dlyons@Apple.COM (David Lyons) (10/27/89)

In article <8910190700.AA14927@trout.nosc.mil> sysop@pro-generic.cts.com (Matthew Montano) writes:
>Ok you netters..
>
>After a call to the GS/OS DInfo call, I can pull everything I need out and
>place in my own convinient variables, EXCEPT the name of the device.
>
>What way can I take the pointer "DInfoRec.devName" and manage to pull the name
>(stored in GSString32.text) into my own string... in a simple few steps.

I don't know if the ORCA library has a better routine for this, but you could
certainly use the BlockMove routine (in the Memory Manager) to copy the
class-1 string, or you could use a C-library routine like memcpy().  (If
you use BlockMove, be sure to cast the last parameter to a long.)
-- 

 --Dave Lyons, Apple Computer, Inc.          |   DAL Systems
   AppleLink--Apple Edition: DAVE.LYONS      |   P.O. Box 875
   America Online: Dave Lyons                |   Cupertino, CA 95015-0875
   GEnie: D.LYONS2 or DAVE.LYONS         CompuServe: 72177,3233
   Internet/BITNET:  dlyons@apple.com    UUCP:  ...!ames!apple!dlyons

   My opinions are my own, not Apple's.