SDK Error when running (Debugging) application

Howdy All,

Upfront Info : Windows XP Pro SP2, DirectX 9.0c (w /August SDK)
C# 2005 Express IDE

I have created a simple little DX app using the MS tutorials and other information that I have found on the internet.

All works well until I add a Dialog to the app.

private Dialog myDialog = null;
myDialog = new Dialog(framework)

There are no controls added to the Dialog only the creation of the initial instance.

The app compiles without complaint, but when I start debugging to see it run,
I receive the following error.
"Could not find required media. Ensure that the DirectX SDK is correctly installed."

I'll admit I am stumped. The error does not give enough information to even begin to try to fathom what is, perhaps, not installed correctly, if that is even the case.

Any assistance would be greatly appreciated.

Thanks in advance
Dean



Answer this question

SDK Error when running (Debugging) application

  • Dan Prudhoe

    I'm trying, I'm trying...
    And nothing works. I created new solution, I added all of the common files. I copied Media/UI directory into my solution folder by hand. The error message keeps appearing.
    I used "Add->Existing item", but still, the error message keeps appearing.
    What am I doing wrong


  • Jacquemin

    Hey thanks a lot for providing the solution to this problem, but I was wondering if you could explain how you added the directory to the project.  I did a search for the file and found it under Samples\Media\UI, and I'm just a bit confused as to how the sample finds it.  Thanks in advance.


  • Borelord

    I'm getting the same error you are but I think I'm getting it for different reasons. I had my project working fine, I could build and run it regularly but then I added another texture file to the directory /Media/Textures in my project directory and I get the error. I take the file out and everything works again.

  • Absolute_Zero

    One thing that I do when using the sample framework is to create a media directory, with a UI directory under that. Once done copy the files from the samples media directory/UI to the directory that I just created.

    If you are using the Newer VS2005 IDE Systems you can add these folders to the solution and then change the properties of this files so that they copy to the executing directory at build time. This makes sure that the newer files are always transferred each time you build.

  • xp

    You will have to but some breakpoint in and step through and see which particular file it is trying to locate and where it is looking.

    There's only 3 media files the framework cares about, the em[ty .fx file that it tries to load, the .dds textures for the UI elements (though if you don't use the UI it won't load this) and a .x direction widget which is only used by thte samples.

    So my guess is that you are missing the empty.fx file.



  • Jerry-liu

    Ok, nevermind ... I found the problem. 

    In the dxmutgui.cs the Dialog class is defined.

    The constructor of the Dialog class makes a call to "InitializeDefaultElements()".

    The first line of the method is "SetTexture(0, "UI\\DXUTControls.dds");"

    I did not have this directory/file added to my project.

    Funny how it seems that I pound my head against the wall for a couple of days,
    and two minutes after making a post I find the answer.  DOH !!

    Well, back to key whacking....

    Dean

  • Ron Swank

    Thanks. You're right. I solved the problem right after I posted the message. But thanks for replying!!


  • chinimimita

    Hi  Yoway,

    Using the Visual IDE, in the solution explorer, select the location (either the project name or a sub directory of it) where you would like to add the file.  Right click and when the menu drops, select add->existing item. Then browse for the file that you would like to add to the project.

    Hope that help !


  • SDK Error when running (Debugging) application