[futurebasic] Re: [FB] External File Resources

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : August 2001 : Group Archive : Group : All Groups

From: Jay Reeve <jktr@...>
Date: Thu, 16 Aug 01 09:03:53 -0500
>But... suppose I need to search resources of different types, how can I,
>using the same function, convert rsrcType$ to _"XXXX"?
>
>This must be easy!
>
Bernie,

The value you want is a long integer. By getting a pointer to the string, 
you can read the long integer directly from bytes 1-4. This does about 
the same thing Alain suggested, but looks a bit neater to me.
>
>
>N.B. tempTextHolder is dim'd as container
>
>//LOCAL FN searchExtRes(fileName$,fileVol,rsrcType$,rsrcID,searchStr$)
>                                          ^^^^^^^^^
   LOCAL FN searchExtRes(fileName$,fileVol,@rsrcType as 
ptr,rsrcID,searchStr$)
'                                          ^^^^^^^^^^^^^^^^
>    extResFileRef% = FN OPENRFPERM(fileName$,fileVol,_fsRdPerm)
>    LONG IF extResFileRef% <> -1
>//        dataResH& = FN GET1RESOURCE(_"DATA",rsrcID)
>                                      ^^^^^^^
           dataResH& = FN GET1RESOURCE(rsrcType.1&,rsrcID)
'                                      ^^^^^^^^^^^

 0"0
 =J= a  y
  "