kgreen@pro-angmar.UUCP (Kevin Green) (08/24/90)
Apparently me first post didn't get through so I'll try this again. Could someone help me in converting the new style record returning in SFPutFile2 into a GSOS string that I can use to make GSOS calls. I've tried most everything I can think of and can't figure it out. If you are interested in helping me, I can Email my code to you. It is Orca/Pascal code. Thanks for any help you guys/gals can give. Kevin S. Green 566 Washington St. #2 Brighton,MA,USA 02135 BIX: Keving America Online: Gargoth Proline: Kgreen@Pro-Angmar InterNET:...!pro-angmar!kgreen@alphalpha.com UUCP: kgreen@pro-angmar.UUCP
joshuat@pro-sol.cts.com (Joshua M. Thompson) (08/27/90)
In-Reply-To: message from kgreen@pro-angmar.UUCP Are you giving Standard File the signal to allocate handles for you? If so, when the handles are returned to you in your reply rec, the first two bytes are the buffer length, followed by the actual class_1 string. So move the whole thing down two bytes in memory (starting at the +2 byte in the handle) and you'll have a normal class_1 string that can be passed to GS/OS.
bkahn@dg-rtp.dg.com (Bruce Kahn) (08/28/90)
In article <4134@crash.cts.com>, joshuat@pro-sol.cts.com (Joshua M. Thompson) writes: |> In-Reply-To: message from kgreen@pro-angmar.UUCP |> |> Are you giving Standard File the signal to allocate handles for you? If so, |> when the handles are returned to you in your reply rec, the first two bytes |> are the buffer length, followed by the actual class_1 string. So move the |> whole thing down two bytes in memory (starting at the +2 byte in the handle) |> and you'll have a normal class_1 string that can be passed to GS/OS. Dont forget to save the first 2 bytes first and then after you shift down the string 2 bytes, stuff a NULL into the location calculated by Start_of_String + value_from_1st_2_bytes This effectively converts a Pascal string to a C string... If you dont put the NULL in there, you MAY just walk past the end of the string you want right off into memory somewhere (or over something that comes after the end of the string in memory). Remember, C string functions mostly use the terminating NULL to signify End_of_String... -- Bruce (bkahn@archive.rtp.dg.com or kahn@adam.dg.com) Standard disclaimers apply, except where prohibited by law...