PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Problem with extracting from a package

Hi,

I am discovering Edge and I am trying to use packages. I have created a new package with the editor and I am trying to extract a file from it like it is explained on the website here http://www.edgelib.com/index.php?node=140.

Code:
ClassEFile ef;
if (ef.Open("package.epk"))
{
if (ef.PackAuthorize(0))
ef.PackExtractFile(ecd.dat->currentpath, "image.gif");
ef.Close();
}

But I have problems when building:
error C2664: 'long __cdecl ClassEFile::PackExtractFile(char *,unsigned long,bool)' : cannot convert parameter 1 from 'unsigned short [512]' to 'char *'

It looks like it is not recognizing a WCHAR* as a char*, but I cannot understand why WCHAR can be accepted as an unsigned short, even if my program is not correct.
Hi Maxime,

Since recent Edge releases, the current path don't have to passed as an argument.

The following code will work and won't generate a compiler error:
Code:

ef.PackExtractFile("", "image.gif");
Ok it works now, thank you :)