I_R_Lee Posted January 28, 2003 Posted January 28, 2003 I am trying to something in DX9 in Managed C++, but I have just one tiny question, here it is: What do you put in the #using <Whatever.dll>? I've tried #using <Microsoft.DirectX.dll> and that didn't work, so what does it? Quote
I_R_Lee Posted January 28, 2003 Author Posted January 28, 2003 Ok, I just got that bit, but another problem has risen: Now that I have included (?) the DirectX dll, how do I actually use any of it's functions? When I put: using namespace Microsoft, DirectX isn't there. How do I deal with this one? Quote
Guest mutant Posted January 28, 2003 Posted January 28, 2003 The basic declaration for DX is: (that what worked for me) #include <d3dx9.h> Thats basically it for all the basic DX operations. For more advanced things i think you need to copy some headers from the sdk to your folder. Quote
Smurfwow Posted February 4, 2003 Posted February 4, 2003 I think including the header files only exposes the UNMANAGED com interfaces/functions. to use the managed assemblies, afaik you just include them in the project, and code away. Quote
I_R_Lee Posted February 6, 2003 Author Posted February 6, 2003 How do you include the managed assemblies in the project? Quote
Smurfwow Posted March 3, 2003 Posted March 3, 2003 #include <mscorlib.dll> #include <System.dll> #include <System.Drawing.dll> just add .dll to the managed namespace(as seen above) you want to use. Quote
Morpheus_3074 Posted March 10, 2003 Posted March 10, 2003 (edited) Greetings fellow C++.NET junkies!!! I am Morpheus and I have been searching for you all my life...... It is the question that drives you ..... #using <FreeYourMind> How do I get Managed DirectX9 to work with VC++.NET Standard? ....................................................................................................... Wise man once said "Simplicity will be the most difficult thing to master." -- ME (2003) ............................................................................. ##--- After Installing DirectX9 SDK ---## Managed DirectX Framework Default Installation Location: %system%\Microsot.NET\Managed DirectX\v4.09.00.0900\ Goto Tools -> Options Expand the Projects folder Select VC++ Directories Under "Show Directories For" Select Reference Files Create a newline and add the path to the Managed DirectX dll's. .............................. That's All Folks!! Don't try to bend the spoon....It is impossible!!! Rather it is your mind that bends.. .............................. Now calls to #using <microsoft.directx.dll> and other Managed DirectX dll's are valid and their respective namespace usages are 100% functional. PLEASE BE ADVISED!! VC++ will not provide you with class info when using scope operator :: . Just refer to Managed DirectX documentation for class info and namespace information. Example: The following code is only intended to test directx namespace usage by fully compliling and linking. //usage.h #using <mscorlib.dll> #using <microsoft.directx.direct3D.dll> using namespace microsoft::directx::direct3d; namespace TestUsage { public __gc class Usage { protected: PresentParameter __nogc* PParams; public: Usage() { PParams = new PresentParams; }; ~Usage(){}; }; } //Source file usage.cpp #include "usage.h" int main() { TestUsage* UTest = new TestUsage; return 0; } Hope this was helpful. If you still have problems...post a message and we will enter the Matrix so I can show you!!! Continue the Journey and Remember to.... Follow the White Wabbit. hehe [edit]No need to make Size=1 for the entire post, simply use tags [/ cs] arround your code.[/edit][/color] Edited March 11, 2003 by Morpheus_3074 Quote
thumper Posted March 17, 2003 Posted March 17, 2003 Morpheus you are a champion. I spent ages trying to find where to add a library :/ Quote
Raist3d Posted June 8, 2003 Posted June 8, 2003 A couple of things... Ok, Thanks and kudos to Morpheous for making simple what Microsoft apaprently has to royally up. Or maybe it's just my understanding of the IDE.. but I thought under projects, the #using directory would have done the trick, referecing the global assembly directory. So, I am using Visual C++ .NET 2003 standard, and I am pleasently surprised that it did automatically pick up on the namespaces shortly after doing what morpheous suggested. So hence my question now: what's the difference then between the assemblies in the global assembly cache, which have the whole direct3d managed enchilada and the .dll's? Are the .dll's just "hooks" into the assemblies from Managed C++? Morpheus, can you shed light on the issue! thanks! - Raist Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.