>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 "