473,385 Members | 1,983 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

"Using" DirectX class libraries- newbie question

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

Jun 27 '08 #1
2 2059
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
Jun 27 '08 #2

"Peter Webb" <we********@DIESPAMDIEoptusnet.com.auwrote in message
news:48***********************@news.optusnet.com.a u...
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
Jun 27 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: SPG | last post by:
Hi, I am new to C# moving from Java. I was wondering if there is a way to automatically add a using statement when attempting to use a class that is not yet referenced by your code? JBuilder...
17
by: beliavsky | last post by:
Many of my C++ programs have the line using namespace std; but the "Accelerated C++" book of Koenig and Moo has many examples where the library names are included one at a time, for example ...
8
by: Douglas | last post by:
**** Post for FREE via your newsreader at post.usenet.com **** Hello, The following code does not compile if line 3 is uncommented "using namespace std". I do not understand it. Could...
13
by: Squid Seven | last post by:
This is just bizarre. for the following snippet of code: #include <string> using std::string; I get the error message:
10
by: eyh5 | last post by:
Hi, My C code (running on Soalris Unix) has some "segmentation fault" that I wish to use purify to do it. I poked around the web, and found some information about adding some lines in a Makefile...
7
by: Willem van Rumpt | last post by:
Hi all, coming from an unmanaged programming background, I took my time to sort out the IDisposable and finalizer patterns. Just when I thought I had it all conceptually neatly arranged, the...
8
by: Geri Reshef | last post by:
Many times I find code examples in the internet which don't have the "using" statements needed to run them, and without it the compilation fails. Is there a way to find the correct "using" statement...
5
by: charliewest | last post by:
I've implemented the USING statement to ensure that my newly created sql connection closes when my method is finished using it. The USING statement is wrapped in try/catch error handling statement....
6
by: AlexD_UK | last post by:
When I create a new C++ project of type "Class Library (.NET)", I am unable to then add the following line of code : using namespace std If I do, I get the following error on compilation :...
0
by: Andreas Schmitt | last post by:
I wrote a small timer class for use in a graphics engine I am working on for teaching myself. The small time based animations I tried with it seem to work fine but displaying the frame rate I...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.