Wednesday, June 9, 2010

Installing and Including the DirectX SDK

In more complex multimedia applications, for example in games, DirectX nowadays is most essential.
Luckily .Net provides also for this topic extended librariers.
For C++ and .Net languages there is the DirectX SDK.
With this definitely many cool applications can be created, in the future I will write some posts about it.
On Udo's Blogs you can find 2 interesting posts, describing how to use DirectSound and how to use Joysticks in C#.
But for today, as the title already says, I will just describe the installation and inclusion of the DirectX SDK, which can cause some problems (at least for me it did not work directly).
The newest version of this SDK is availale for download here. With Windows XP and .Net framework 4.0 I could though not use that file, I took the version of March.
After installation the SDK can be used, but in every project, where DirectX functions are to be used, references have to be set to the right DLL files, which can be added via Project - Add Reference. According to the documentation the corresponding files (e.g. Microsoft.DirectX) should be available in Add Reference in the tab .Net. For me though this was not the case, I had to include them manually.
To search references you want to include manually, you have to switch to the tab Browse and then select the corresponding files.
In my case the DLLs were placed in C:\WINDOWS\Microsoft.NET\DirectX for Managed Code. If you do not find them, just do a search for the file "Microsoft.DirectX.dll".
Okay, now you should be able to use the SDK, in the internet there are cool tutorials explaining its use and also saying which references are needed when.

No comments:

Post a Comment