[futurebasic] Re: [FB] Alternate method for fill by reference

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : May 2013 : Group Archive : Group : All Groups

From: Bernie <fblist.bw@...>
Date: Wed, 1 May 2013 17:02:50 +0100
Brian wrote:

> Wave wrote:
>> I seem to recall there is a possible issue using the ".nil&" syntax, having to do with byte order.
>> Maybe I'm wrong about that.
> Apple encourages use of Core Foundation as a replacement when possible because CF handles all endian issues automatically.


I haven't a clue where FillByReference is leading, but a couple of CF functions that may (or may not) be of interest:

include "ConsoleWindow"
include "Tlbx UTType.incl"

dim as CFStringRef string
dim as OSType type

string = fn UTCreateStringForOSType( _"WAVE" )
type = fn UTGetOSTypeFromString( string )
print type,
fn ConsolePrintCFString( string )
CFRelease( string )