"Using" DirectX class libraries- newbie question

P

Peter Webb

Sorry, stupid newbie question.

I have VS2008, and I downloaded and installed the DirectX SDK.

I want to access the DirectX classes from C#, but I can't see how to make C#
aware of them.

using Microsoft.DirectX.Direct3DX;

says the namespace doesn't exist.

How do I link so a C# program has access?

Thanks, Peter Webb
 
C

Carl Daniel [VC++ MVP]

Peter said:
Sorry, stupid newbie question.

I have VS2008, and I downloaded and installed the DirectX SDK.

I want to access the DirectX classes from C#, but I can't see how to
make C# aware of them.

using Microsoft.DirectX.Direct3DX;

says the namespace doesn't exist.

You need to add reference(s) to the DirectX assembly(ies) - they've got
names like microsoft.directx.*.dll. The documention for the DirectX SDK
should tell you which assembly(ies) you need to reference for any given
DirectX feature.

-cd
 
R

Rob Lancaster

Peter Webb said:
Sorry, stupid newbie question.

I have VS2008, and I downloaded and installed the DirectX SDK.

I want to access the DirectX classes from C#, but I can't see how to make
C# aware of them.

using Microsoft.DirectX.Direct3DX;

says the namespace doesn't exist.

How do I link so a C# program has access?

Thanks, Peter Webb

In addition to adding the references as Carl said, the above line should be

using Microsoft.DirectX.Direct3D; //No X at the end.

Rob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Is DirectX obsolete? 11
DirectX 4
Newbie DirectX 9 7
Directx namespace 2
DirectX SDK 2
directX 9.0 sdk... 4
using directx8 and c# 5
[Newbie] vb.net and directX 2

Top