Hi All,
How to refere my c++ code in C#.net. Here i my C++ code
#pragma once
using namespace System;
using namespace System::Windows::Forms;
namespace OpenDialogBoxVC {
public ref class Form1
{
public:
void OpenDialog(void)
{
System::Windows::Forms::OpenFileDialog^ OP = (gcnew System::Windows::Forms::OpenFileDialog());
OP->ShowDialog();
}
};
}
I have right the solution and complied using VS2008. after compiling i did the below steps
1) Open new project and created WindowsApplication using vs2008.
2) Right click the reference and add reference of "OpenDialogBoxVC.dll"
3) added the below code in the WindowsApplication
OpenDialogBoxVC.Form1 f = new OpenDialogBoxVC.Form1();
f.OpenDialog();
4) while running the application, i am getting the error like
Could not load file or assembly 'OpenDialogBoxVC, Version=1.0.4155.21996, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.
Please help me