THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 16/09/2010 at 03:41, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R12
Platform: Windows ; Mac ; Mac OSX ;
Language(s) : C++ ;
---------
Hi,
for some reason openig a hyperfile does not work anymore, even though the file positively exists.
Maybe I'm doinf sth wrong, I'm also not 100% sure how to use the new 'LONG ident' argument of HyperFile::Open(..)
Here's the code, that worked fine with previous SDK's :
.
.
if(!GeFExist(fn)){
GePrint("specified preset does not exist, falling back to 'default.win'");
fn.SetDirectory(GeGetPluginPath()+ Filename("presets")+Filename("windows"));
fn.SetSuffix("win"); fn.SetFile(Filename(defaultWindow));
}
else{
GePrint(fn.GetString()+" exists!");
}
AutoAlloc<HyperFile> hf;
#if API_VERSION > API_R11
LONG ident = 1L; // not sure how to use this ..
if (hf->Open(ident,fn,FILEOPEN_READ,FILEDIALOG_ANY)) // fails ´-(
#else
if (hf->Open(fn,FILEOPEN_READ,'temp')) // works :-)
#endif
{
Bool success = hf->ReadContainer(&data,TRUE);
.
.
.
thx,
Daniel