On 08/04/2013, at 20:59, Rob Laveaux wrote:
>
> On 8 apr. 2013, at 18:34, Jorge <
jo...@jorgechamorro.com> wrote:
>
>> I'm using it just right now to dump the rsrcs of my structure to .hex text files but API Get Resource Type List() is giving me some strange rsrc types which are *not* 4 bytes long, such as "l" and "f" and "m" and "x", ISTM that the conversion from the longint rsrc type to str is somehow broken, is this a bug in API Pack?
>
> Maybe :-)
>
> Resource types are 32-bit long integers which can be transferred to a 4 character string for easier readability.
> In this case, the remaining characters are NULL bytes, which indicate the end of a string in both C and 4D.
>
> So yes, the resource type as a string can be 1 to 4 characters.
I forgot to say before that API Get Resource Type List() is giving me not one but several "l" (or "m" of "f" or "x", I'm not sure) types, does that mean that there's more than one type that begins with "l\x00" ? Say "l\x00pq" and "l\x0rs", for example ?
>> Needless to say, API Get Resource ID List() returns empty arrays for these...
>
> The true issue is likely here, where the plugin needs to convert a 4 character string back to a longint value.
> Apparently something goes wrong here. I'll have to investigate that further.
If I were you, as I'm quite lazy, I would have used the raw longints in the rsrcs types' APIs :-)
Thank you again: your API Pack plugin is a jewel.