Guidance
指路人
g.yi.org
Guidance Forums / Rapid-Q Basic / $Resource to array- possible?

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. $Resource to array- possible?
#677
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?
#678
Posted by: guidance 2002-11-28 21:26:00
Does QResourceStream help?
http://g.slyip.com/_scripts/file.php?f=2795&r=2330
Message3. Re: QResourceStream?
#679
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
#680
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-3-29  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0