473,326 Members | 2,090 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Call C++ Dll in C#.net using dllImport

Please find the below Examples
1. void ExitLibrary(); // C++ function
I am able to covert to C# like below
[DllImport("VisualFOD.dll", CharSet = CharSet.Ansi)]
public static extern void ExitLibrary();

2. // This method will be used to start the live capturing
bool StartLive(DShowLib::Grabber* f_Grabber, HDC f_hHdc, RECT f_WindowRect);

// This method will be used to start the live capturing
[DllImport("TIS_UDSHL09_vc71.dll", CharSet = CharSet.Ansi)]
public static extern bool StartLive(IntPtr f_Grabber, IntPtr f_hHdc, Rectangle f_WindowRect);

I am not able to access the actual class DShowLib::Grabber as mentioned in the 2nd statement C++ function.

Do you have any idea how to declare and get the library class name.

This dll is not a COM/.Net dll to include as a reference to C# environment.

Any help will be greatly appreciated.
Apr 5 '12 #1
0 1359

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: CharitiesOnline.co.uk | last post by:
Can anyone tell me, what is the maximum functions that you can call using a form submit button with onSubmit ? I am using 2 at present but really need to use 3 , how can I do this? Thanks Joe.
2
by: Paul Duncan | last post by:
diggityduncs (Programmer) Nov 13, 2003 Hello, I'm tring to use a win32/api dll in c# The vendor I received the dll from doesn't know anything about .net I received two files ACGAPI.DLL +
5
by: Jason Bell | last post by:
I'm an experienced programmer, but a newbie to c#, so please be kind :) In a c++, unmanaged, DLL of my own making I have a function called void XGL_Core_SetCaption(XGL_Core * core, char *...
2
by: k | last post by:
Hiya, I'm hoping somebody can help me out here, I have searched for this problem but had no joy in finding a solution. I'm trying to use the DllImport attribute as follows: I have...
3
by: scott.sara.news | last post by:
I am having major problems accessing some API's and I believe the problem is a 16-bit app. I originally had an application written in Borland Builder C++ 6 (32-bit)that loaded some API's for a...
0
by: vidya pawar | last post by:
Hi, I have created a Asp.net Web Application. In this web application I want to use native VC++ dll . I have used "dllImport" atribute. This works fine in Asp.net console Application. While...
0
by: Pucca | last post by:
Hi, I got the following code in a project for creating dll but I'm getting compiling error. I copied the code (from Main()) from Ineternet but becuase I don't know how COM interop and how to code...
6
by: Bart Burkhardt | last post by:
Hi, I could use some help in setting a C# callback function that an external unmanaged dll will call on a event. Using a delegate and use the external callback set function doesn't work. The...
1
by: freesoft12 | last post by:
Folks, Anyone have any ideas of using an interposition agent to trap a C++ function call using an interposition agent and then printing out the function's arguments, for debugging purposes? I...
1
by: alag20 | last post by:
Hi guys, i am having trouble importing c++ unmanaged dll into C# . Can someone help? Basically i am just trying to create a safearray of strings in c++ and trying to send it to C#. Here is my...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.