The Artima Developer Community
Sponsored Link

.NET Buzz Forum
DirectX will throw an InvalidDataException if file is not found

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Darrell Norton

Posts: 876
Nickname: dnorton
Registered: Mar, 2004

Darrell Norton is a consultant for CapTech Ventures.
DirectX will throw an InvalidDataException if file is not found Posted: Nov 8, 2005 11:48 AM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by Darrell Norton.
Original Post: DirectX will throw an InvalidDataException if file is not found
Feed Title: Darrell Norton's Blog
Feed URL: /error.htm?aspxerrorpath=/blogs/darrell.norton/Rss.aspx
Feed Description: Agile Software Development: Scrum, XP, et al with .NET
Latest .NET Buzz Posts
Latest .NET Buzz Posts by Darrell Norton
Latest Posts From Darrell Norton's Blog

Advertisement

Using Managed DirectX I was getting the following error:

An unhandled exception of type 'Microsoft.DirectX.Direct3D.InvalidDataException' occurred in System.Windows.Forms.dll
Unhandled Exception: Error in the application.

On a very simple TextureLoader.FromFile(device, filePath) operation.

Now an exception like InvalidDataException made me double-check that TextureLoader.FromFile can open tga files, which it can. It turns out, though, that DirectX will throw an InvalidDataException if it CANNOT find the file. I would have expected a FileNotFoundException, but I guess not. And this is from the latest DirectX SDK (October 2005). So double-check your filePath to make sure there's a file there!

Hey DirectX team, WTF were you thinking?

Read: DirectX will throw an InvalidDataException if file is not found

Topic: Visual Studio 2005 Product Launch - My Fan Club Attendees Previous Topic   Next Topic Topic: Conversion Successful

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use