I thought it could be useful to alls. Here it is a way to access a RAW Data resource. I use it to store compressed data (it's better than IncludeBinary as a resource is loaded into memory just when needed). As you can see, I pass the buffer to UnPackMemory and it works well.
Code: Select all
nris.l=1 ;-> number of resource
hr=FindResource_(#Null,nris.l,#RT_RCDATA)
If hr
hg=LoadResource_(#Null, hr)
If hg
lpData=LockResource_(hg)
If lpData
*Buffer = AllocateMemory(8000) ;-> your needed size
;decomlu=UncompressMemory(lpData,*Buffer)
;...
;...
EndIf
EndIf
EndIf
Code: Select all
1 RCDATA
BEGIN
#include "test.txt"
END
Code: Select all
@echo off
bin2txt test.pack test.txt
rc yourprogram.rc
pause