Home › Forums › Software Development › [Solved] Use EyeX SDK to write visual c++ 2012 windows form programs? › Reply To: [Solved] Use EyeX SDK to write visual c++ 2012 windows form programs?
08/01/2016 at 14:02 #4044
Participant
Hi,
Could you please provide the message of the exception?
I can reproduce an exception which states “0xC0020001: The string binding is invalid.” when creating a minimal test using VC++ WinForms. The solution is to call delete
on the EyeXHost member when you are closing the program. Here is one small example:
public ref class MyForm : public System::Windows::Forms::Form {
public:
MyForm(void) {
// Create EyeXHost
this->host = gcnew EyeXFramework::EyeXHost();
this->host->Start();
}
protected:
~MyForm() {
// Delete EyeXHost to avoid exception
delete this->host;
}
private:
EyeXFramework::EyeXHost^ host;
};
Best regards,
Eddie