Call C++ Functions in C# (.NET 4.5)

Posted by Vuyiswamb under C# on 6/23/2013 | Points: 10 | Views : 1279 | Status : [Member] [MVP] [Administrator] | Replies : 1
Good Day

I have a C++ Dll that has the following functions

void DisplayError( HWND hDlg, WPARAM wParam )
HRESULT ValidateI2CDeviceEx( HWND hDlg, ULONG i2cBase, PULONG pAccessBytes )
BOOL ValidateSetValue( HWND hDlg, char *str )
BOOL ValidateIdxValue( HWND hDlg, char *str )
ULONG atox( LPSTR s )
EnableGroupBoxes( HWND hDlg )
LRESULT CALLBACK EM2800PropProc( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam )
LRESULT CALLBACK About( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam )
LRESULT CALLBACK WndProc( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam )
VOID DestroyEM2800Prop()
VOID InitEM2800Prop()
ATOM MyRegisterClass( HINSTANCE hInstance )
BOOL InitInstance( HINSTANCE hInstance, int nCmdShow )
int APIENTRY WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow )


i would like to use this non-com dll in C#

Thanks

Thank you for posting at Dotnetfunda
[Administrator]



Responses

Posted by: Bageshkumarbagi on: 6/24/2013 [Member] Starter | Points: 25

Up
0
Down
Hi,

Refer this link

http://www.codeproject.com/Articles/27298/Dynamic-Invoke-C-DLL-function-in-C


Thanks,
Bagesh Kumar Singh

Thanks,
Bagesh Kumar Singh
Mark as answer if you have been satisfied

Vuyiswamb, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response