Guidance Forums / Rapid-Q Basic / $Resource to array- possible?

Search 搜索
Home Home

Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. $Resource to array- possible?
Posted by: 2002-11-28 21:18:51
Is it possible to pass a $Resource to an array without saving it as a file first?  If so how do I do it?  I have saved an array from one program as a txt file and want to include it as a $resource in another program and load it into an array again but saving it to disc seems messy.  I have tried loading it via QMemoryStream but get an array full of 1's (but the correct lemgth!).  I may just be handling the QMemoryStream wrongly (I'm a beginner) but don't want to waste more time trying to do something which is impossible in the first place.
Message2. QResourceStream?
Posted by: guidance 2002-11-28 21:26:00
Does QResourceStream help?
Message3. Re: QResourceStream?
Posted by: 2002-11-29 09:16:00
I had a look, couldn't work out what it was doing.  If I include it, as I understand it, it has RapidQ included in it so I end up with it twice in my program. an unnecessary overhead of 300K or have I missed something?
Message4. temp file
Posted by: guidance 2002-11-30 10:26:32
I think it won't.
How about extract to a temparory file created by GetTempFileName?

DECLARE FUNCTION GetTempFileName LIB "kernel32" ALIAS "GetTempFileNameA" (ByVal lpszPath AS STRING, ByVal lpPrefixString AS STRING, ByVal wUnique AS LONG, ByVal lpTempFileName AS STRING) AS LONG

This should not be too messy.
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
© Fri 2024-6-14  Guidance Laboratory Inc. Hits:0