Unable to create DirectX device on some computers. The error code is D3DERR_NOTAVAILABLE.

I'm sorry if this post is not in the right place, or if it is a duplicate. I couldn't find help anywhere for the problem that I am facing.

I worked for a few days now trying to get a DirectX control to load on some computers in my organization. The code we have written works fine on some machines (perhaps 50%), but fails to initialize DirectX during the creation of the unit on others machines with an exception containing the code of error D3DERR_NOTAVAILABLE. We use the DirectX 9 SDK for development. We did ensure that the DirectX (version 10) runtime is installed on the computers of problem as well (we believe that the runtime must be backward compatible). I wrote the code to attempt to create a device using all possible combinations of the available settings and still no device can be created! The code I used to try to find any working device is less. I'm doing something wrong? Code (written in c#) starts in the InitializeGraphics() function and calls the GetAcceptableDevice() function. The GetAcceptableDevice() function returns zero on our computers of problem:

private GetAcceptableDevice device (DeviceType deviceTypes, Format [] backBufferFormats, DepthFormat [] depthStencilFormats []) {}
List acceptableAdapterFormats As new List();
{foreach (adapter AdapterInformation in Manager.Adapters)
{foreach (DeviceType deviceType in deviceTypes)
{foreach (backBufferFormat in backBufferFormats Format)
Now, make sure that the depth buffer meets one of the required formats.
{foreach (DepthFormat depthStencilFormat in depthStencilFormats)
PresentParameters pp = new PresentParameters();
pp. AutoDepthStencilFormat = depthStencilFormat;
pp. BackBufferCount = 1;
pp. BackBufferFormat = backBufferFormat;
pp. BackBufferHeight is this. Height;
pp. BackBufferWidth is this. Width;
pp. FullScreenRefreshRateInHz = 0; Must be 0 in windowed mode.
pp. DeviceWindow = this;
pp. DeviceWindowHandle is this. Handle;
pp. EnableAutoDepthStencil = true;
pp. ForceNoMultiThreadedFlag = false;
pp. MultiSample=MultiSampleType.None;//Anti-alias settings
pp. MultiSampleQuality = 0;
pp. PresentationInterval = PresentInterval.Default;
pp. PresentFlag = PresentFlag.None;
pp. SwapEffect=SwapEffect.Discard;//Required to be scrapped for anti-aliasing.
pp. windowed = true; Must set to true for the controls.
Treatment of vertex createFlags=CreateFlags.SoftwareVertexProcessing;//Software CreateFlags should always work.
Device functionalDevice = null;
try {}
functionalDevice = new device (adapter. Adapter, deviceType, createFlags, pp);
Return functionalDevice;
} catch {}
Just skip it and try the following.
}
}
}
}
}
Returns a null value.
}

public void InitializeGraphics() {}
Device = MakeBasicDevice ();
{if(Device==null)}
Device = GetAcceptableDevice)
DeviceType.Software is rarely used. DeviceType.NullReference produced a device, on which you can not attract.
New DeviceType [] {DeviceType.Hardware, DeviceType.Reference},
All display formats listed on in the case where we want to try them all (for the exhaustive tests).
New Format [] {Format.A16B16G16R16, Format.A16B16G16R16F, Format.A1R5G5B5, Format.A2B10G10R10, Format.A2R10G10B10, Format.A2W10V10U10,
Format.A32B32G32R32F, Format.A4L4, Format.A4R4G4B4, Format.A8, Format.A8B8G8R8, Format.A8L8, Format.A8P8, Format.A8R3G3B2,
Format.A8R8G8B8, Format.CxV8U8, Format.D15S1, Format.D16, Format.D16Lockable, Format.D24S8, Format.D24SingleS8, Format.D24X4S4,
Format.D24X8, Format.D32, Format.D32SingleLockable, Format.Dxt1, Format.Dxt2, Format.Dxt3, Format.Dxt4, Format.Dxt5,
Format.G16R16, Format.G16R16F, Format.G32R32F, Format.G8R8G8B8, Format.L16, Format.L6V5U5, Format.L8, Format.Multi2Argb8,
Format.P8, Format.Q16W16V16U16, Format.Q8W8V8U8, Format.R16F, Format.R32F, Format.R3G3B2, Format.R5G6B5, Format.R8G8B8, Format.R8G8B8G8,
Format.Unknown, Format.Uyvy, Format.V16U16, Format.V8U8, Format.VertexData, Format.X1R5G5B5, Format.X4R4G4B4, Format.X8B8G8R8, Format.X8L8V8U8,
Format.X8R8G8B8, Format.Yuy2},
All depth formats listed on in the case where we want to try them all (for the exhaustive tests).
new DepthFormat [] {DepthFormat.D15S1, DepthFormat.D16, DepthFormat.D16Lockable, DepthFormat.D24S8, DepthFormat.D24SingleS8, DepthFormat.D24X4S4,
DepthFormat.D24X8, DepthFormat.D32, DepthFormat.D32SingleLockable, DepthFormat.L16, DepthFormat.Unknown}
);
{if(Device==null)}
throw new Exception ("could not get an acceptable DirectX graphics adapter. Your graphics card may not support DirectX. ») ;
}
}
}

I also read on various places on the Internet that a type of software with the software vertex processing will work always, even if it's slow. I also wrote code to try to create a unique feature of software with the software vertex processing and apparently not worked either. The code is as follows:

private MakeBasicDevice() {} device
try {}
PresentParameters pp = new PresentParameters();
pp. AutoDepthStencilFormat = DepthFormat.D16;
pp. BackBufferCount = 1;
pp. BackBufferFormat = Manager .Adapters .default .CurrentDisplayMode .format.
pp. BackBufferHeight is this. Height;
pp. BackBufferWidth is this. Width;
pp. FullScreenRefreshRateInHz = 0; Must be 0 in windowed mode.
pp. DeviceWindow = this;
pp. DeviceWindowHandle is this. Handle;
pp. EnableAutoDepthStencil = true;
pp. ForceNoMultiThreadedFlag = false;
pp. MultiSample = MultiSampleType.None;
pp. MultiSampleQuality = 0;
pp. PresentationInterval = PresentInterval.Default;
pp. PresentFlag = PresentFlag.None;
pp. SwapEffect = SwapEffect.Discard;
pp. windowed = true; Must set to true for the controls.
DefaultDevice device = new Device(Manager.Adapters.Default.Adapter,DeviceType.Reference,this,CreateFlags.SoftwareVertexProcessing,pp);
DefaultDevice return;
} catch {}
}
Returns a null value.
}

One might think that DirectX may run on any graphics card, even if it ran slowly on the low-end cards. Is it possible that DirectX does not work on some graphics cards? It is somewhat disturbing, because about half of our computers will not initialize our DirectX control and our control of OpenGL works fine on these machines. Is there something else we can try, perhaps related to some system settings that are more fundamental than the initialization code? Any help is appreciated. Thanks in advance.

Hi grahamde,

Thanks for posting in Microsoft Answers.

The question you posted would be better suited to the community Microsoft Developer Network (MSDN). Please visit the link below to find a community that will provide the best support.

http://msdn.Microsoft.com/en-us/default.aspx

Kind regards

Arona - Microsoft technical support engineer
Visit our Microsoft answers feedback Forum and let us know what you think

Tags: Windows

Similar Questions

  • Unable to create DirectX device

    I used to play 'FREECELL' until I finished the game I left for a few hours and when I came back to my computer, there was an error that says error: unable to create DirectX device. I closed the error box and everything seems to work OK.

    Hello

    I had the same problem until I uninstalled a program to screen saver

    Hope this works

  • I'm unable to download illustrator CC.  This is the error code...

    Exit code: 7

    Please see specific errors below for troubleshooting. For example, ERROR: DF024...

    -------------------------------------- Summary --------------------------------------

    -0 fatal Error (s), 1 Error (s)

    -Payload: AdobeColorCommonSetCMYK CC 5.0.0.0 {C4196275-B11A-40A1-8727-3C145C8F7D95}.

    ERROR: DF024: unable to preserve the original file at "/ Library/ColorSync/Profiles/Profiles" (21 Seq)

    -------------------------------------------------------------------------------------

    Delete mentioned color profiles in the error message, run the cleanup tool and try again.

    Use the CC cleaning tool to resolve installation problems. CC, CS3 - CS6

    Mylenium

  • create DirectX device

    When I try to open the basic games, i.e., Solitaire, the message appears "unable to create DirectX device".  I checked the program on my computer and he says that he has no problem.  What should I do to correct this?

    How to determine the Version of DirectX using the DirectX Diagnostic tool

    http://support.Microsoft.com/kb/157730>

    Run the DirectX Diagnostic tool from this link. &, follow these steps:

    Diagnosing basic problems with DirectX

    Troubleshooting tools and strategies

    http://TechNet.Microsoft.com/en-us/library/cc938991.aspx>

    UTC/GMT is 16:07 Tuesday, may 1, 2012

  • Critical error "cannot create directx device.

    If I have a microsoft game open freecell, solitaire, etc. and play any other game such as modern warfare 2, Farcry2, (a directx9 and directx 10 game) etc when I quit the game a critical error message "unable to create directx device" is on the desk. When I click OK the game frecell closes.  This has happened just recently. I ran dxdiag in 32 and 64 bit modes.  Direct sampling, Direct3D, and AGP Texture acceleration are enabled.  I reinstalled directx 9 c on microsoft web sites. DirectX 10 to reinstall not found. I reinstalled the video card and sound drivers, nothing works. I can play microsoft 2 or 3 games at the same time and their closure does not create a problem.  All directx 9 and 10 games perform without problem. I ran regedit and directx by default reg_S2 (value not set), but I was told it's ok.  I was invited by Windows 7 free technical support of the Microsoft Tech Support market Place forum. I was told by the technology which offers on my case that Windows 7 is not supported and it blew me off the coast.  A lot of people on the web with the same problem, but no answers.  Previous posts on the forum gave rise to no response or a work around that is not open two programs.  I want to fix the problem. JohnnyBoyz
    CPU 920i7
    Nvidia gtx 285 video card
    6 GB 1600 RAM
    ASUS P6T Deluxe v2 motherboard

    Try this, it worked for me on my Windows7 machine where games microsoft kept crashing with a directx error.
    1 - Create a new folder on your desktop and name it 'games' or something else.
    2 - Go to c:/program files and double-click the microsoft Games folder
    3 - there are folders for all installed games. Open each folder, one at a time and copy the .exe file and paste it into the new folder 'games '. Do NOT use the shortcut of Media Center.
    Some of the games require that you also to copy their files .dll with them in the new folder 'games '. For me, it was chess, Mahjong and Minesweeper. The rest of them worked without copying the .dll file.
    Open the game by clicking on it in the new 'games' folder, or make new shortcuts using the files in the new folder.
    This bypasses somehow with the Media Center, which seems to be the problem with the crash of directx.
    I hope it works for you!

  • After a custom Windows 7 installed on a Toshiba Satellite P105-S6084, my audio device does not start. Error code: this device cannot start. (Code 10)

    I got driver Conexant speakers on my laptop. I tried to find a device driver updates, but have had no luck. After being in Control Panel, hardware and audio, Device Manager, sound, video and game controllers, under that is high definition Audio Device with a yellow triangle and!.

    After a right click and update driver, it says that the driver is up-to-date. In addition, the error code says this device cannot start (Code 10)

    In addition, this seems to be a driver of Microsoft when the original driver was Toshiba/Conexant. I looked on the support Web site of Toshiba for a driver updated for my laptop and Windows 7.

    Any suggestions?

    Umesh P,.

    Thank you for answering my question. I don't know that this forum allows you to stay busy. Thank you for taking the time to answer my question.

    To sum up, I checked the Windows Audio and Windows Audio EndPoint Builder according to your instructions. Both were running as usual and start automatically, so it wasn't the issue.

    I then visited Fix It. On the web page, since I am under Windows 7, the instructions on the provided web page to access the control panel and through system and security, to try to resolve the problem to fix common computer problems.

    This process led me through the same re-setup of the device through Windows 7 driver that failed previously. Also because it has detected Windows 7, the web page would allow me to run the Fix It program.

    When I visited the Support from Toshiba web page you provided, I was unable to find a sound driver for Windows 7. After filtering through my computer on their web page, the nearest driver was for Vista.

    Take a chance, I downloaded it anyway. What has been the worst that could happen? It does not work? Well, I was there already. In any case, the installation worked and I now the audio again.

    Moreover, this is the link for the driver, for anything that might be in a similar situation I've been:

    driver_audio_conexant_25636A.exe

    -or-

    http://cdgenp01.CSD.Toshiba.com/content/support/downloads/driver_audio_conexant_25636A.exe

    Also, Conexant offers no direct audio driver support and ask you to check with the manufacturer, which in my case is Toshiba. Toshiba not currently has an audio driver Windows 7 for my particular Satellite phone. Since this is an older, they can't come out with an updated driver.

    But, since the audio driver Vista download works, it is now a non-issue.

    Thank you!

    Jay

  • When you try to create a system image, receive the error code 0 x 81000019

    Get the error code when you try to create a system image on a 900 + GB hard drive with 900 GB of free space. Keeps telling me that there is not enough space to create the image of the shadow. I'm trying the disk image has only 40 GB of data. What is going on? Using Windows 7 64 bit Pro.

    Many hours of searching the Web for answers about a year ago, said that relatively few people have this problem and proposed solutions in the forums have been complex, machine dependent and seem to fail for most of the people who have tried a fix...

    So when I gave up and called Microsoft... they told me to take my problem to anyone assembled my computer...

    The man who built my machine told me not to worry, simply store all my files on the cloud, as he does...

    So now I store my important stuff on a spare drive, we have installed in the box, go to live with the inability to make appropriate backups and restore points...

    All my old computers is standard backups without any hassle... Just this new machine with Win7.

    (The only "new" thing was a disc SSD C... can't believe it would make one difference either, other than speed... and many people use them in 2011...)

  • Microsoft Assistant unable to resolve the error code library; Ox8007000b

    I talked to your Elroy B staff who took my PC remotely. It has rebooted my laptop but never came back. Unfortunately, he could not solve the problem. I'm unable to open the Photo Gallery and get the error code: OX8007000b want to go back to Elroy B to continue the repair as windows still under warranty. Soon Tom

    A lot of customers that has this problem. Did the free repair Essentials and fix it but no luck. Have tried command prompt and your Elroy tried B Command Promt-dism in line/cleanup-image version: 6.2.9200.16384

    I'm on Windows 8 Windows 7 using Samsung Notebook NP355V5CA03K update

    Please notify.
    Concerning
    Tom
    I talked to your Elroy B staff who took my PC remotely. It has rebooted my laptop but never came back. Unfortunately, he could not solve the problem. I'm unable to open the Photo Gallery and get the error code: OX8007000b want to go back to Elroy B to continue the repair as windows still under warranty. Soon Tom

    A lot of customers that has this problem. Did the free repair Essentials and fix it but no luck. Have tried command prompt and your Elroy tried B Command Promt-dism in line/cleanup-image version: 6.2.9200.16384

    I'm on Windows 8 Windows 7 using Samsung Notebook NP355V5CA03K update

    Please notify.
    Concerning
    Tom

    ========================================
    When you say 'your staff' I assume you mean Microsoft.

    To-peer forum consists mainly with volunteers.
    If you would like to contact Ms support staff... I have
    Guess it would be necessary to take the same measures
    as before.

    As to the question you are trying to solve... I don't see
    One possibility is maybe worth a try.

    Photo Gallery has an exclusive database that can
    corrupted. Uninstalling / reinstalling Photo
    Gallery does not affect the database.

    I suspect that your version of the database:
    Pictures.PD6 or Pictures.pd7.

    If you are looking for and rename this database to
    something like... OLDPictures.pd6... it forces
    Photo Gallery to create a new instance of the
    the database as soon as it is launched.

    If you decide to try this... know that you
    may lose a few inches and metadata... and your
    Photo gallery will need to be filled again.

    The following article is not about Windows 8
    but would better understand the issue.

    (944221) freezes Windows Live Photo Gallery
    or does not start
    http://support.Microsoft.com/kb/944221/en-us
    (according to version, database can be
    Pictures.PD4, Pictures.pd5 or Pictures.pd6)

    The fixit in the article is the one that you have already tried
    so it will be probably useful.

    Good luck...

  • When I try to create a new folder of file I get the error Code 0 x 80070570

    When I try to create a new folder of file I get the error Code 0 x 80070570

    Hello Denny,


    Thanks for the reply with the State of the question, sorry for the caused incontinence.
    I suggest you follow the suggestion of Babu V replied on 16 may 2013

    CHKDSK WARNING: Running chkdsk on the drive if bad sectors are found on the disk hard when chkdsk attempts to repair this area if all available on which data can be lost.

    Please respond with the State of the question of assistance in
    Windows.
  • In Safari, I get the error code BSO D 0 X 80060402, error code Windows defender in the available boot device. He told me to contact Microsoft certified technicians. I do not use Microsoft or windows.

    In Safari, I get the error code BSOD 0 X 80060402, error code Windows defender in the available boot device. He told me to contact Microsoft certified technicians. I do not use Microsoft or windows.

    You have utilities installed on the computer antivirus, cleanup, or other third party maintenance?

  • I try to install the update for Microsoft Works 8 (KB977304) security, but he has been unable to download. He said it failed because error code 646

    I try to install the update for Microsoft Works 8 (KB977304) security, but he has been unable to download. He said it failed because error code 646. If anyone can help me with this that would be great.

    Hello

    Do you work on your computer? Otherwise the control panel - Windows Updates - right
    Click on and HIDE.

    Try this 1st to see if it helps, and it should:

    Description of the Patch registration cleanup tool
    http://support.Microsoft.com/kb/976220/

    ------------------------------------------------------

    If necessary :

    Try this - Panel - Windows Updates - on every update that will not be installed - click on the important updates
    or the update itself - double click a view more information (or click top then discovers on the right)

    Those who will take you to a page where you can download the update.

    Or go here and the KBxxxxxx number to download it.

    Download Center - mount the KBxxxxxx.

    Microsoft Download Center
    http://www.Microsoft.com/downloads/en/default.aspx

    Download - SAVE - go to where you put them - click on - RUN AS ADMIN

    Then you can right click on the update in the updates Windows and HIDE.

    If you get an error Installer install this version:

    Windows install 4.5 Redistributable
    http://www.Microsoft.com/downloads/details.aspx?FamilyId=5A58B56F-60B6-4412-95B9-54D056D6F9F4&displaylang=en

    ----------------------------------------------------

    Then run this:

    How to reset the Windows Update components? -a Mr Fixit
    http://support.Microsoft.com/kb/971058

    Description of the system for Windows Vista, Windows Server 2008, update tool and
    for Windows 7
    http://support.Microsoft.com/kb/947821

    ------------------------------------------------------------
    Because these are all Office updates you might get more information if necessary in the Agency of those groups that
    may have experienced the same problem.

    Office newsgroups
    http://www.Microsoft.com/Office/Community/en-us/FlyoutOverview.mspx

    Microsoft.public.office.misc discussions
    http://www.Microsoft.com/communities/newsgroups/list/en-us/default.aspx?DG=Microsoft.public.Office.misc&cat=en_us_01cb749f-c998-4762-8099-df71793c11c7&lang=en&CR=us

    ------------------------------------------------------------

    If necessary you can incident free get reports however the above should take care of it for you.

    Windows updates - free Incident report

    Go here and click on-> Windows Update fails while searching, downloading or installation of updates
    http://support.Microsoft.com/GP/wusupport#tab3

    The security updates, you can get free support Incident report
    http://www.Microsoft.com/protect/resources/support.aspx

    I hope this helps.
    Rob - bicycle - Mark Twain said it is good.

  • Windows Media Player Vista when I try to play some videos, including some film my daughter loaded on a usb key that I encounter the error code cood11d1

    I presume that I have windows media version 11 of the drive and when I try to play some videos, including some film my daughter loaded on a usb key that I encounter the error code cood11d1. My attempts appear so far have confirmed that I have the latest updates available for my drive, and after you run the fix it program tell me no error or problems when identified. Appreciate any help that can be offered

    Hi at Rob Merci for the quick reply, but before that I followed one of your suggestions I confirm the error message I get when trying to play some movies is certainly cood11d1 so your thoughts before going further with thank you bob.

    ==========================================

    Followign links may be worth a visit:

    (935336) Windows Media Player 11 cannot
    read content protected by DRM on Windows Vista
    http://support.Microsoft.com/kb/935336

    (925705) when you try to use Windows Media
    Player 11 to play a digital rights management
    (DRM) - protected media file media cannot play
    http://support.Microsoft.com/kb/925705

    The security component upgrade
    http://drmlicense.one.Microsoft.com/Indivsite/en/indivit.asp

    Windows Media Player: Mini WMP FAQ
    http://zachd.com/PSS/PSS.html
    (scroll down a bit to the 3rd entry that said: Vista only)

    Windows Media Player error c00d11b1 resolved
    http://Strom.WordPress.com/2007/04/06/Windows-Media-Player-error-C00D11B1-solved/
    (it's a long discussion on the error 0XC00D11B1)

  • I get the error code 643 during the installation of the dates... I tried yesterday, some steps that have been put to me... they did not work... Please help

    I get the error code 643 during the installation of the dates... I tried yesterday, some steps that have been put to me... they did not work... Please help

    There are 2 updates will not install... Ive had this problem for the last 6 months

    See if this Microsoft Support will help you:

    http://support.Microsoft.com/kb/976982

    Note: there are 2 methods. If the August challenge it for me does not help, try a 2nd.

    Another article to number 643
    http://Windows.Microsoft.com/en-us/Windows7/Windows-Update-error-80070643

    .........................................................................................

    Take a look at this answer of MS Answers forums:

    http://answers.Microsoft.com/en-us/Windows/Forum/windows_vista-windows_update/what-is-error-code-643-Windows-vistaunable-to/4ab6dd4e-e9eb-4a0f-b822-ad976e2c33c6

  • Some updates were not installed, get the error code 646

    Some updates for windows vista, you receive the error code 646 were not installed and I tried to update manually by using registry files and still isn't updated do not know what is the problem, but when trying to install update, say, it's something on a restore point for the update

    Hi Lori,

    -What are the updates that fail to install?

    I suggest you try the steps in the following Microsoft Article.

    You receive the error code: 0 x 80070646, error code: 646 or error code: 1606 when using Windows Update or Microsoft Update

    http://support.Microsoft.com/kb/2258121

    See: http://windows.microsoft.com/en-XM/windows-vista/Windows-Update-error-for-80070646-or-646

  • I'm unable to load the microsoft KB 2378111 security update. I'm under Vist Home Premium. I get the error code 80070020

    I'm unable to load the microsoft KB 2378111 security update. I'm under Vist Home Premium. I get the error code 80070020. I tried safe mode, but no luck so far

    Hello

    You are supposed to try it in "Safe Mode with network"; not 'Safe Mode'.

    You need a cable connection; no wireless using this method.

    Start method 3, etc at this link if top is not solve:

    "Error 0 x 80070020 when you use the Windows Update Web site or the Microsoft Update Web site to install the updates.

    http://support.Microsoft.com/kb/883825

    {Moderator note: Thread is placed in the appropriate forum}

    See you soon.

Maybe you are looking for

  • I just upgraded my wood later from the Acer site. Now Windows 7 will not load.

    My computer is an Aspire X 3810. Is it possible to go back to my originaL BIOS?

  • Clock is not keeping time

    My clock stopped keep the correct time.  I tried to reset the time and date and to resync the time but it does not work.  Any suggestions?

  • printer scan works only with the new windows 7

    upgrade windows xp to windows 7 with the new HP Omni 220PC. Have a printer HP C309g-m. To scan from the printer to the computer xp, I had to use the HP Solution Center. The printer works very well with the new windows 7 program and new computer. I in

  • 1102 thanks to eprint paper type selection

    Hello I use a Laserjet 1102w and print DHL labels with it. It works so far but the barcodes are completely down to the leaf and sometimes numbers to go outside of the size of the paper. Is it possible to specify the size of paper (standard) when you

  • OfficeJet 7410 & WPA2

    I have a MAC wireless network and I can not connect my Officejet 7410.  The only options on the 7410 wireless are wep and wpa (not wpa2).  Y at - it a firmware update that will allow WPA2?  I am also unable to reach my printer when it is connected di