Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

VincentLascaux

Error loading an x-file

This topic is 6235 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I get the error DXFILEERROR_PARSEERROR, trying to read an x-file HRESULT LoadFromXFile(char* FileName) { HRESULT hr; IDirectXFile* File; DirectXFileCreate(&File); IDirectXFileEnumObject* Enum; if(FAILED(hr=File->CreateEnumObject(FileName,DXFILELOAD_FROMFILE,&Enum))) return hr; IDirectXFileData* Data=NULL; while(!FAILED(hr=Enum->GetNextDataObject(&Data))) /* I get the error here, from the GetNextDataObject function */ { // Work with Data here } if(hr!=DXFILEERR_NOMOREOBJECTS) return hr; Enum->Release(); File->Release(); return S_OK; } Do you have any idea of the meaning of this error, and what I do wrong ? Thanks

Share this post


Link to post
Share on other sites
Advertisement
Just an idea: did you try it with different x-files? Maybe the one you used is corrupt.
As far as I know, some 3d modeller don''t export the modells created properly.
Maybe you should try an x-file that came with the sdk.

Share this post


Link to post
Share on other sites
Funny remarque ! I just thought about it sending my original post. I told me : "Hey, maybe the cube you exported is corrupted !". So I tried a x-file from the SDK and I still have the same boring error...

Hum... English is not my native language ; when you say "parse", you mean "read", dont you ?

Share this post


Link to post
Share on other sites
It sounds as if the templates are not registered. They need to be included in the .X file or add a call to IDirectXFile::RegisterTemplates with the standard real-mode templates (check the SDK example for exact lines).



Jim Adams
home.att.net/~rpgbook
Programming Role-Playing Games with DirectX 8

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!