Simple Handler.vi error ignores the error code?

I'm trying to understand the behavior of Simple Error Handler.vi, and it confuses me because it seems not be properly error code I give.

According to the documentation, if I have an error code, then:

If error in indicates an error, the VI ignores the error code. If this is not the case, the VI it tests. A nonzero value means a mistake.

But my observation is that when the error indicates an error, the VI always shows a dialog even when given an error code. Instead, I use the Handler.vi to General error and providing an exception action (cancel error on match) and an exception code to get the behavior I want.

What am I misunderstanding?

MacNorth wrote:

I'm trying to understand the behavior of Simple Error Handler.vi, and it confuses me because it seems not be properly error code I give.

According to the documentation, if I have an error code, then:

If error in indicates an error, the VI ignores the error code. If this is not the case, the VI it tests. A nonzero value means a mistake.

But my observation is that when the error indicates an error, the VI always shows a dialog even when given an error code.

There are two ways of interpreting unaware them in the sentence: "If the error indicates an error, ignore them error codeVI."

    1. (the intention) If the error indicates an error, the VI does not use the error code.

    2. (my point) If the error indicates an error, the VI deletes all corresponding to the error code.

Tags: NI Software

Similar Questions

  • FPGA horribly Simple producers of error Code (-61003)

    Can someone tell me why this piece of code produces error-61003?

    I am trying to write code for a new FPGA, and the troublesome thing doesn't compile. The draft code has absolutely nothing to do with the project, but it is the simplest code that produces the same error when I try to compile it. I have two theories about why they do not compile: 1. the FPGA cannot physically shuttle data around the way I would like 2. I found an edge case that the compiler is not prepared to deal with. If there is a simple reason for this error I can work around, please let me know. This is by far the worst time I've ever had trying to find the source of an error.

    To reach the error: download the two files in the same directory, open FPGA2.lvproj, expand target FPGA, build specifications (under the target FPGA), click with the right button on WhyDoesThisError, select generate.

    That's what I get for guessing. The thing of arbitration apply to multiple accessors in the same loop.

    What seems to work on my machine is getting rid of the dowry of constraint on the business exit tunnel structure. It looks like loop analysis drop-get fired upwards by his presence, perhaps in conjunction with the selector being a source of control (?).  This looks like a bug to me, because your other VI runs. At the very least, it needs a better error message. If you can check that you see the same thing, I will submit a request for corrective action on this.

    Jim

  • error code: win32 error code returned by the print processor: 6. the handle is not valid.

    When I try to print to a network printer, the print job does not print anI getting the error code: win32 error code returned by the print processor: 6. the handle is not valid. All ideas

    Hello

    In this case seems to be with the corrupted printer drivers.

    Follow the steps below to reinstall the driver.

    1. click on the "Start" button, type PRINTERS in the start search box and press ENTER.

    2. find the icons that are associated with the printer, and then remove them.

    3. right click on the blank part of the window and choose "Run as Administrator"-> "Server Properties".

    4. on the tab drivers, select the printer listed and click Remove. Please, select Remove driver and driver package.

    5. open the start menu, enter APPWIZ. CPL in the search box and press ENTER to launch the "programs and features".

    6. try to remove all related printer software.

    7. then download the latest driver from the printer manufacturer's Web site.

    8 install the driver.

    All the best!

  • How to handle the error code 80070246?

    This code does not seem to be addressed in the FAQ section.  Ideas?

    Hi GaryRansom,

    Without knowing for sure if you get this error during the installation of a program or Windows Update. There is a thread here: http://answers.microsoft.com/en-us/windows/forum/windows_other-windows_update/windows-update-error-code-80070246/12eebb16-f81a-4873-8439-efecface8b43 which gives a few things to try if it was a Windows Update code error you have found.

  • HELP the extensions 6.0.7 handler update installation failed. Error code: U44M1P7

    I can't update my Photoshop. M

    the images are now printing FUZZY. I use photoshop for my job, it's not OK. It's a VERY expensive program!

    Help. Help. Help.

    Please do not make me reinstall again - it has not worked in the past.

    Thank you.

    This is my error I get:

    Update the extensions 6.0.7 Manager

    Failed installation. Error code: U44M1P7

    See the following help documents:

    U44M1P7 - updates:

    http://helpx.Adobe.com/Creative-Suite/KB/error-u44m1p7-installing-updates-CCM.html

    U44M1P7, U44M2P7 - CC help / cannot apply the extensions 6.0.2 update manager | Mac OS:

    http://helpx.Adobe.com/Creative-Suite/KB/unable-apply-Extension-Manager-Update.html

  • Ignore the digital error, with the EXCEPTION

    Hello

    I have a PROC that reads all of the records from one table and INSERT them into another table, quite simple. The only thing is I want to IGNORE digital errors. So, if a get a (digital) mistake, I want Oracle to IGNORE the error and continue in my FOR LOOP (Selecting records) and the insertion in the table. What seems to happen, is that if I get a DIGITAL error, it exits the for... Here is the Code:
      PROCEDURE Insert_Current_Data(
       p_create_date                 IN         DATE,
       p_StatusId                      OUT      NUMBER
    ) IS
     e_constraint_error               EXCEPTION;
     e_numeric_error                 EXCEPTION;
       PRAGMA EXCEPTION_INIT (e_constraint_error, -2291);
       PRAGMA EXCEPTION_INIT (e_numeric_error, -1722);   
    /*   to_number(NOC_CODE) NOC_CODE,
                      to_number(ECONOMIC_REGION_CODE) ECONOMIC_REGION_CODE, */
    CURSOR ei_claimant_ext_cur
          IS
          SELECT NOC_CODE,
                      ECONOMIC_REGION_CODE,
                      CASE EI_PROV_CODE
                        WHEN '00' THEN 1
                        WHEN '01' THEN 4
                        WHEN '02' THEN 2
                        WHEN '03' THEN 3
                        WHEN '04' THEN 5
                        WHEN '05' THEN 6
                        WHEN '06' THEN 7
                        WHEN '07' THEN 8
                        WHEN '08' THEN 9
                        WHEN '09' THEN 10
                        WHEN '10' THEN 11
                        WHEN '11' THEN 12
                        ELSE 13
                      END EI_PROV_CODE,
                      POSTAL_CODE
            FROM ei_claimant_external
            WHERE ei_prov_code <> 12
            AND     economic_region_code <> 99
            AND     postal_code is NOT NULL;
    --        AND     ROWNUM < 1000;
            
            ei_claimant_ext_rec ei_claimant_ext_cur%ROWTYPE;
            
            v_create_date       VARCHAR2(20);
            
            v_econ_reg_prov     NUMBER;
            
        BEGIN
               
         dbms_output.put_line('Date passed: '||p_create_date);  
         dbms_output.put_line('INSERT Current Data '); 
    
    --        p_StatusId := 0;
    
            FOR claimant_row IN ei_claimant_ext_cur LOOP
    
    /*        OPEN ei_claimant_ext_cur;
            
            LOOP
      
                FETCH ei_claimant_ext_cur 
                INTO ei_claimant_ext_rec;
        
                -- v_staging_count := v_staging_count + 1;
                
                EXIT WHEN ei_claimant_ext_cur%NOTFOUND;      */
                
                BEGIN
                
                    --- Get Econ Region Province
                    SELECT PROVINCE_ID
                    INTO     v_econ_reg_prov
                    FROM    cd_econ_regions
                    WHERE  ECONOMIC_REGION_ID = ei_claimant_ext_rec.ECONOMIC_REGION_CODE;
                    
                EXCEPTION
                    WHEN NO_DATA_FOUND THEN v_econ_reg_prov := 0;
                END;
                
                
                BEGIN
                              
                    IF v_econ_reg_prov = ei_claimant_ext_rec.EI_PROV_CODE
                    THEN 
                        INSERT INTO ei_claimant_curr_year
                        VALUES  (EI_SEQ.nextval,
                                ei_claimant_ext_rec.noc_code,
                                ei_claimant_ext_rec.EI_PROV_CODE,                            
                                ei_claimant_ext_rec.ECONOMIC_REGION_CODE,
                                p_create_date, --- CURRENT Month 
                                ei_claimant_ext_rec.POSTAL_CODE
                                );
                                COMMIT;
                    END IF;                                                          
    
                EXCEPTION
                    WHEN e_constraint_error THEN dbms_output.put_line('CONSTRAINT Error '); 
                            fwutil_pkg.logerror (SQLERRM||' '||ei_claimant_ext_rec.noc_code||' Prov Code: '||ei_claimant_ext_rec.EI_PROV_CODE||'  Econ Region: '||ei_claimant_ext_rec.ECONOMIC_REGION_CODE||
                            ' Postal Code: '||ei_claimant_ext_rec.POSTAL_CODE||' Date: '||p_create_date,
                                  SQLCODE,
                                  NULL,
                                  'Populate_EI_Claimant_Main -- Insert into EI_Claimant_curr_year '
                                 );
                    WHEN e_numeric_error THEN dbms_output.put_line('NUMERIC Error On INSERT'); 
                            fwutil_pkg.logerror (SQLERRM||' '||ei_claimant_ext_rec.noc_code||' Prov Code: '||ei_claimant_ext_rec.EI_PROV_CODE||'  Econ Region: '||ei_claimant_ext_rec.ECONOMIC_REGION_CODE||
                            ' Postal Code: '||ei_claimant_ext_rec.POSTAL_CODE||' Date: '||p_create_date,
                                  SQLCODE,
                                  NULL,
                                  'Populate_EI_Claimant_Main -- Insert into EI_Claimant_curr_year '
                                 );                                   
                    WHEN OTHERS
                        THEN
    
                            fwutil_pkg.logerror (SQLERRM||' '||ei_claimant_ext_rec.noc_code||' Prov Code: '||ei_claimant_ext_rec.EI_PROV_CODE||'  Econ Region: '||ei_claimant_ext_rec.ECONOMIC_REGION_CODE||
                            ' Postal Code: '||ei_claimant_ext_rec.POSTAL_CODE||' Date: '||p_create_date,
                                  SQLCODE,
                                  NULL,
                                  'Populate_EI_Claimant_Main -- Insert into EI_Claimant_curr_year '
                                 );          
                END;
                
            END LOOP;
        
    --        CLOSE ei_claimant_ext_cur;        
    
        EXCEPTION
                        WHEN e_constraint_error THEN dbms_output.put_line('CONSTRAINT Error '); 
                            fwutil_pkg.logerror (SQLERRM||' '||ei_claimant_ext_rec.noc_code||' Prov Code: '||ei_claimant_ext_rec.EI_PROV_CODE||'  Econ Region: '||ei_claimant_ext_rec.ECONOMIC_REGION_CODE||
                            ' Postal Code: '||ei_claimant_ext_rec.POSTAL_CODE||' Date: '||p_create_date,
                                  SQLCODE,
                                  NULL,
                                  'Populate_EI_Claimant_Main -- Insert into EI_Claimant_curr_year '
                                 );
                        WHEN e_numeric_error THEN dbms_output.put_line('NUMERIC Error ON Cursor'); 
                            fwutil_pkg.logerror (SQLERRM||' '||ei_claimant_ext_rec.noc_code||' Prov Code: '||ei_claimant_ext_rec.EI_PROV_CODE||'  Econ Region: '||ei_claimant_ext_rec.ECONOMIC_REGION_CODE||
                            ' Postal Code: '||ei_claimant_ext_rec.POSTAL_CODE||' Date: '||p_create_date,
                                  SQLCODE,
                                  NULL,
                                  'Populate_EI_Claimant_Main -- Insert into EI_Claimant_curr_year '
                                 );               
                                         
        END Insert_Current_Data;
    Here are reports that it is currently reading:
    00094440903E4P1T5
    00000000000000000
    00066230703E1E1G4
    AAAAAAAAAAAAAAAAA
    00012210903E4K2K8
    00082620803E5V1L3
    99999999999999999
    00084410803E5G2J3
    00074120903E4N2E3
    -----------------
    00094630903E4N1B7
    00082620903E4N2J6
    )))))))))))))))))
    00082620903E4M2C4
    It inserts the first 2 records, ignoring the record with "0" (which is good). Then, he leaves the LOOP for when it happens to registration with a bunch of "A."


    Help, please!

    Thanks in advance.

    First fix your code... FOR THE LOOP has not been implemented correctly... I think that u first tried with SLIDER OPEN... LOOP... PICK UP... WHEN THE OUTPUT... END OF LOOP... CLOSE THE CURSOR... then the same LOOP FOR converted... END LOOP and I forgot to change the code like
    -WHERE ECONOMIC_REGION_ID is ei_claimant_ext_rec. ECONOMIC_REGION_CODE;.

    Try this type of code...

    DECLARE
    Mixed_typ TYPE IS a TABLE OF VARCHAR2 (1)
    INDEX BY PLS_INTEGER;

    mixed_ty mixed_typ;
    e_numeric_error EXCEPTION;
    PRAGMA EXCEPTION_INIT (e_numeric_error,-6502);
    v_num NUMBER;
    BEGIN
    mixed_ty (1): = '1';
    mixed_ty (2): = 'A ';
    mixed_ty (3): = '2';
    mixed_ty (4): = '3';
    BECAUSE me in 1... mixed_ty. COUNTING LOOP
    BEGIN
    v_num: = TO_NUMBER ('11' | mixed_ty (i));
    DBMS_OUTPUT. Put_line (v_num);
    EXCEPTION
    WHEN e_numeric_error THEN
    DBMS_OUTPUT. Put_line (' ignore ' |) SQLERRM);
    END;
    END LOOP;
    EXCEPTION
    WHILE OTHERS THEN
    DBMS_OUTPUT. PUT_LINE (SQLERRM);
    END;

  • Set the error code for the exception qualified using the pragma exception_init

    Hello

    I did experiments on exception management in oracle plsql. In my experiments, I did the following anonymous plsql block.


    + < < outer_block > > +.
    declare
    + exceptions.    +
    Start
    + < < inner_block > > +.
    + State +.
    + exceptions.        +
    + start +.
    + recovery outer_block.exc +;
    + exception +.
    + What then outer_block.exc +.
    + dbms_output.put_line ("' outdoor Exception caught"); +
    + What then inner_block.exc +.
    + dbms_output.put_line ("'Inner Exception caught"); +
    + end; +
    end;


    When I run the code, I got the output "external Exception caught".

    ------------------------------------------------- PLSQL Block 2 -------------------------------------------

    I changed the code a little differently by assigning exceptions error codes.

    + < < outer_block > > +.
    declare
    + exception exc; +
    + pragma exception_init (exc,-20001); +
    Start
    + < < inner_block > > +.
    + State +.
    + exception exc; +
    + pragma exception_init (exc,-20001); +
    + start +.
    + raise_application_error (-20001, "Error"); +
    + exception +.
    + What then outer_block.exc +.
    + dbms_output.put_line ("' outdoor Exception caught"); +
    + What then inner_block.exc +.
    + dbms_output.put_line ("'Inner Exception caught"); +
    + end; +
    end;

    When I run the above code, I got the following error.

    Error on line 1
    ORA-06550: line 15, column 9:
    PLS-00484: exceptions redundant "EXC" and "EXC" must appear in the same exception handler
    ORA-06550: line 5, column 1:
    PL/SQL: Statement ignored

    Script done on line 21.

    ------------------------------------------------- PLSQL Block 3 -------------------------------------------


    To avoid this error, I changed the code again by qualifying exceptions with their block names. This time, I got a different error.

    + < < outer_block > > +.
    declare
    + exception exc; +
    + pragma exception_init (outer_block.exc,-20001); +
    Start
    + < < inner_block > > +.
    + State +.
    + exception exc; +
    + pragma exception_init (inner_block.exc,-20001); +
    + start +.
    + raise_application_error (-20001, "Error"); +
    + exception +.
    + What then outer_block.exc +.
    + dbms_output.put_line ("' outdoor Exception caught"); +
    + What then inner_block.exc +.
    + dbms_output.put_line ("'Inner Exception caught"); +
    + end; +
    end;


    Error on line 1
    ORA-06550: line 4, column 38:
    PLS-00103: encountered the symbol ". «» When expecting one of the following values:

    ), = >
    The symbol"were replaced by". "to continue.
    ORA-06550: line 9, column 42:
    PLS-00103: encountered the symbol ". «» When expecting one of the following values:

    ), = >
    The symbol"were replaced by". "to continue.



    Question:
    Pourraient several exceptions with the same name of the exception defined in the set of nested blocks plsql assign error codes using the pragma EXCEPTION_INIT? If there are errors in the PLSQL 2 blocks and 3, please suggest.
    If the same thing could be accomplished by other methods, please explain.

    The problem in your code block 2 is that you have not only used the same name of the exception, but you have assigned them with the same exception code. If the code is different so it will work...

    SQL> set serverout on
    SQL> ed
    Wrote file afiedt.buf
    
      1  <>
      2  declare
      3      exc exception;
      4      pragma exception_init(exc,-20001);
      5  begin
      6      <>
      7      declare
      8          exc exception;
      9          pragma exception_init(exc,-20002);
     10      begin
     11          raise_application_error(-20002,'Error raised');
     12      exception
     13          when outer_block.exc then
     14              dbms_output.put_line('outer Exception caught ' );
     15          when inner_block.exc then
     16              dbms_output.put_line('Inner Exception caught ' );
     17      end;
     18* end;
    SQL> /
    Inner Exception caught
    
    PL/SQL procedure successfully completed.
    
    SQL> ed
    Wrote file afiedt.buf
    
      1  <>
      2  declare
      3      exc exception;
      4      pragma exception_init(exc,-20001);
      5  begin
      6      <>
      7      declare
      8          exc exception;
      9          pragma exception_init(exc,-20002);
     10      begin
     11          raise_application_error(-20001,'Error raised');
     12      exception
     13          when outer_block.exc then
     14              dbms_output.put_line('outer Exception caught ' );
     15          when inner_block.exc then
     16              dbms_output.put_line('Inner Exception caught ' );
     17      end;
     18* end;
    SQL> /
    outer Exception caught
    
    PL/SQL procedure successfully completed.
    
  • Receive the "403 Forbidden" error code on a Web site, I've been accessing years. It is written "forbidden you don't have permission to access the/_cqr/login on that server." I can access this site (AOL) on other browsers. Help!

    Receive the "403 Forbidden" error code on a Web site, I've been accessing years. It is written "forbidden you don't have permission to access the/_cqr/login on that server." I can access this site (AOL) on other browsers.

    I emptied my cache.  I rebooted Firefox.  This is my email website - never had a problem before.  I am able to access it on Safari.  I even tried the simple address (rather then my bookmarked login address) - still got the same error message!
    

    I have the same problem: it is written ' forbidden you don't have permission to access the/_cqr/login on that server. " I can access this site (AOL) on other browsers. After that I connected to AOL, I get this message. then I go to the address line and delete everything after than the aol.com and her and then press ENTER. then, I'm registered and can read my emails. How can we solve this problem?

  • How to copy Step.Result.Error.Code in the local Variable

    How can I copy Step.Result.Error.Code to a stage in particulat to a local variable.

    I want to print the value of Step.Result.Error.Code in my test report.

    Help, please. Thanks in advance.

    Kind regards

    Sagar Joshi

    Yes of course!

    This is better handled by the recall of SequenceFilePostStepRuntimeError:

    (1) StepResultCode (number) is added FileGlobals

    (2) add SequenceFilePostStepRuntimeError callback to your movie file

    (3) the next stage of the declaration adds the recall of SequenceFilePostStepRuntimeError :

    FileGlobals.StepErrorCode = Parameters.Step.Result.Error.Code

    Here is an overview of the sequence:

    I hope this helps.

  • Error launching of the ' LabVIEW.Application [error Code:-18001]

    Hello
    I have a TS 3.4 mind sequence LabView 8.21 - Teststeps.
    The sequence is called from a Labview-OperatorInterface.
    In a step that run 100 times before without problem I receive all of a sudden the error message:

    ErrorMessage: Error running substep 'run '. Unable to launch the "LabVIEW.Application" ActiveX automation server [error Code:-18001]

    After a restart of the software al NOR-everything works normally again.
    What is this error, and what should I do with it?
    Should I ignore the error and try to execute the step again or not this average tht the ActiveX server has been lost forever?
    How can this problem occur?

    Thanks for your help


  • No update of the 80070bc9 Code error

    Windows Update is updated automatically and constantly update of an important update - update for Windows 7 for systems x 64 (KB976098) fails (details below)

    He returned with the error code 80070bc9


    Download size: 482 KB


    You may have to restart your computer for this update is taken into account.


    Update type: Important


    Install this update to resolve the problems caused by the laws revised in several countries time and time zone. This update enables your computer automatically adjust the clock of the computer on the correct date in 2009. After you install this item, you may have to restart your computer.


    More information:

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


    Help and Support:

    http://support.Microsoft.com

    Hello
     
    I suggest that you follow the steps below:
     
    1. disable the firewall, Antivirus.
    2 manually install the security update go to Microsoft Download Center and then click ignore when the error message appears.
    Download the stand-alone packages of these updates and install.
    Download the update for Windows 7 for x 64-based systems (KB976098) package now.
    3.Re - turn on the firewall, Antivirus, once the update is installed.

    Alternatively, you can try to reset the Windows Update components.
    To do this:
    1. click on the following link: http://support.microsoft.com/kb/971058
    2. click on run in the file download dialog box and follow the steps described in the fix it Wizard.
     
    Thank you, and in what concerns:
    Swati K - Microsoft support technician

  • running Windows 7 have seven important updates for microsoft office 2003 won't install because of the error code 646

    running Windows 7 to have seven important updates for microsoft office 2003 that none will install due to error 646 code can't find a simple forum solution... can anyone help?

    A KB was created for 646 error code that appears during the installation of the updates of Microsoft Office. The KB includes an automatic Microsoft Fix it 50461 that corrects the problem. Look at the following KB: http://support.microsoft.com/kb/2258121>

    Please let us know if that helps.

  • Get an "unknown error" so he was trying to make the Vista SP1 and the error code 800F081F

    I am running Vista Ultimate.

    I installed the hotfix for Windows (KB947821). I always get the "Windows has encountered an unknown error" with the code 800F081F.

    I am also having .net Framework questions (why focusing on my updates in the first place, I started). I have "fixed" but was lifting a msg of error at startup:

    > Unhandled exception has occurred in your application. If you click on > continue, the application will ignore this error and attempt to continue. If > you click on exit, the application closes immediately.

    > There is a parsing of the query error. [The line number of tokens = 2, token line > offset = 27, token s = error]. (I have more error msg if necessary.)

    After you install the hotfix, this error disappeared, but I can't yet download the update of the SP1 for Vista. It is a sine qua non for SP2.

    Help, please! Anyone? 8

    * Title *.
    I get an "unknown error" so he was trying to do the update to Vista SP1, even after the installation of "fix" and always error code 800F081F

    KonfusedKathy,
    I suggest that you do the following:
    Start by putting your system in a clean boot State.
    Run the disk error checking
    Run System File Checker
    Run the System Update tool
    If there are not only found problems that couldn't be fixed by one of them and then try to reinstall SP1.

    Post back with the results.

    Mike - Engineer Support Microsoft Answers
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Windows could not search for new updates of the fault codes found: Code80070490 Windows Update encountered an unknown error.

    I ran sfc/scannow, and the result read that some files cannot be repaired. I installed my Vista installation disc but the upgrade is disabled. I think that the upgrade is disabled because the latest version of Vista running on my laptop is at a higher level than the installation disc, so the only option is Vista, back to the factory. My question is, did a complete reinstall the only solution to 'Windows couldn't find the new updates? with the code 80070490 error?

    Please notify.

    in computer science

    0 X 80070490 - ERROR_NOT_FOUND
    Corrupted system file; You will need to perform an upgrade on the spot or reinstalling the operating system.

    The error you receive occurs if there is corruption in the manifest of component maintenance base.

    Ignore the title: the "Windows features" dialog box is empty in Windows 7 or Windows Vista, or you receive an error message that includes the following code when you try to use Windows Update: "0 x 80073712".
    http://support.Microsoft.com/kb/931712
    "Explains the SFC / Scannow.

    A repair install is the usual solution of SFC/scannow does not work. However, a repair installation (AKA In - Place Upgrade) will not solve the problem if it is due to a hijackware infection.

    You receive an error code "0 x 80070490" when you use Microsoft Update or Windows Update Web sites to install updates
    http://support.Microsoft.com/kb/958044

    NB: If you have installed SP1 or SP2 for Vistahttp://support.microsoft.com/kb/948537

    Step 7 (method for Windows Vista), the * UPGRADE option is not available because SP1 has been installed.

    Uninstall the SPs

    See also:

    How to overcome error 0 x 80070490 when installing updates in Windows Vista/Server 2008
    http://blogs.msdn.com/andrekl/archive/2008/09/29/how-to-overcome-error-0x80070490-when-installing-updates-in-Windows-Vista-Server-2008.aspx

    TaurArian [MVP] 2005-2010 - Update Services

  • 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

Maybe you are looking for