Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

"Using" DirectX class libraries- newbie question

0 views
Skip to first unread message

Peter Webb

unread,
May 11, 2008, 1:45:33 AM5/11/08
to
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

Carl Daniel [VC++ MVP]

unread,
May 11, 2008, 2:28:58 AM5/11/08
to
Peter Webb wrote:
> 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


Rob Lancaster

unread,
May 11, 2008, 5:47:23 AM5/11/08
to

"Peter Webb" <webbf...@DIESPAMDIEoptusnet.com.au> wrote in message
news:4826880c$0$30462$afc3...@news.optusnet.com.au...

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

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

Rob


0 new messages