none
How do you acquire DirectX and add it to the program references? RRS feed

  • Question

  • I downloaded DirectX from some source I didn't know well and it installed DirectX on my computer. But I don't know WHERE it installed it, and searching for "directx" didn't find it. Later I tried to download it again, but it wouldn't install because it said it was already installed. But I can't find a way to add it to my program's references.

    Robert Homes

    Sunday, August 27, 2017 10:05 PM

All replies

  • I downloaded DirectX from some source I didn't know well and it installed DirectX on my computer. But I don't know WHERE it installed it, and searching for "directx" didn't find it. Later I tried to download it again, but it wouldn't install because it said it was already installed. But I can't find a way to add it to my program's references.

    You should start by confirming that you have acquired DirectX correctly. For project development you should have the SDK, but from your description it appears that you may have downloaded the runtime.   The best place to find out about what you need and how to get it is;
    http://xboxforums.create.msdn.com/forums/default.aspx?GroupID=7

    Sunday, August 27, 2017 10:50 PM
  • DirectX9c is in this folder on windows 7 and up:

      C:\Windows\Microsoft.NET\DirectX for Managed Code\1.0.2902.0  

    Use the Browse button on the Project Reference Manager dialog.

    Monday, August 28, 2017 12:29 AM
  • I have that stuff on my machine and added both DirectX and DirectX.AudioVisual ... etc. to my program's References. Then when I call any of the DirectX stuff, my program hangs. It displays no errors, it just "stalls" and doesn't do anything. (I'm running the latest version of Windows 10.)

    Robert Homes


    • Edited by Robert Homes Monday, August 28, 2017 4:35 PM clarify
    Monday, August 28, 2017 4:29 PM
  • I have that stuff on my machine and added both DirectX and DirectX.AudioVisual ... etc. to my program's References. Then when I call any of the DirectX stuff, my program hangs. It displays no errors, it just "stalls" and doesn't do anything. (I'm running the latest version of Windows 10.)

    Robert Homes


    Robert,

    So you want to use Directx version 9c right? What version Visual Studio and Windows do you have?

    1. Set your project to  .net 3.5 on the Project Properties Application Tab.

    2. Set to target x86 on the Compile tab.

    3. Turn on exception handling to break on errors for Common Lang Runtime errors on the menu Debug - (window) - Exceptions (varies with VS version) to get the exceptions dialog. Make sure CLR errors is checked fully.

    4. While you are there turn of the Managed Debug Assistant for Loader Lock.

    Now you should at least get an error message from VS. Don't use any other error handlers in your code at this point like try/catch.

    The first thing you need is to get an error message.

    • Proposed as answer by Cor Ligthert Monday, August 28, 2017 6:27 PM
    Monday, August 28, 2017 5:11 PM