• TI Thinks Resolved

Problem with Bq80xRW instantiation in C#,urgently!

Prodigy 110 points

Replies: 22

Views: 569

Development environment: windows10, 64-bit
According to the "EV2300 Customer Kit" information, the VB6.0 version of the EV2300 communication program has been written and tested and determined to be usable.
But in the same way that VB6.0 was developed using vs.net2015 C#, I encountered several problems:
1. After adding the COM component to the toolbox, the vs crash crashes directly when dragging to the Form form, and is also the same in vs2012.
2, BQ80XRWLib.Bq80xRW Bq80xRW1=new BQ80XRWLib.Bq80xRW (); such instantiation is an error
3, view online information, such as: AxBQ80XRWLib.AxBq80xRW Bq80xRW1 = new AxBQ80XRWLib.AxBq80xRW ();
Instantiation succeeded, but execution exception, bq80xrwName.GetFreeBoards(1, ref nReturn, ref dev_name);
prompt:
"An exception of type 'System.Windows.Forms.AxHost+InvalidActiveXStateException' was thrown."
Added this code,
System.Windows.Forms.Integration.WindowsFormsHost host = new System.Windows.Forms.Integration.WindowsFormsHost();
host.Child = Bq80xRW1;
Gd_Main.Children.Add(host);

Or this way of writing:

((System.ComponentModel.ISupportInitialize)(this.Bq80xRW1)).BeginInit();
this.Controls.Add(Bq80xRW1);
((System.ComponentModel.ISupportInitialize)(this.Bq80xRW1)).EndInit();

Error reporting when running to Gd_Main.Children.Add(host):
An unhandled exception of type "System.AccessViolationException" occurred in System.Windows.Forms.dll
Additional Information: An attempt was made to read or write to protected memory. This usually indicates that other memory is corrupted

I have tried a lot of methods, I have been working for a few days, there has been a problem with the instantiation of Bq80xRW in C#.

I am very anxious, please provide specific feasible methods or sample code DEMO, thank you!

  • Hi,

    Your post has been referred to our tools engineers. One of them should reply back here soon.

    Regards,

    Batt.

  • In reply to Batt:

    It's similar to the question and situation in the post below, but I don't have any solution to it.

    e2e.ti.com/.../1240056

  • In reply to Batt:

    It has been two days, but I have not received any valid reply, please arrange for the engineer to support, thank you!

  • In reply to user6122185:

    We have referred it to our tools engineers who were on vacation. You should get a reply in the next 2 days.

    Regards,

    Batt.

  • In reply to Batt:

    After so many big days, I haven’t received any reply, I hope you can hurry and talk about it.

  • In reply to user6122185:

    Hi,

    Our tools engineers have checked. This combination of tools does not work. Our old toolset used the ev2300 and and ocx file with Win XP. This does not work on Windows 10.

    Regards,

    Batt.

  • In reply to Batt:

    I finally waited for your reply, thank you. But this does not solve my problem, why is VB available on win10?
    If I want to develop EV2300 communication in win10 64 bit (or win7 64 bit), vs.net2015 environment, what advice do you have? Or is there any sample DEMO reference?

  • In reply to user6122185:

    Please use this link for the updated SDK. This has not been tested and is supposed to be test code. 

    However, this SDK should help you communicate.

    Regards,

    Batt.

  • In reply to Batt:

    First of all, thank you, I don't know why I can't download this file. If it is convenient, please send me an email: 6017328@qq.com. Is this file DLL or simple code, is there any documentation? This is convenient for my programming implementation.

  • In reply to user6122185:

    Sorry, I won't be able to email you the file. The link works outside ti.com The package has the api and documentation.

    Regards,

    Batt.