473,388 Members | 1,346 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,388 software developers and data experts.

void **ppImageBuffer

Hi Experts,

I am trying to use a C++ dll from my VB .NET program, but I don't know how
to handle things like void **ppImageBuffer. Please see the following and help
me out.

Thanks.

//C++ dll
int WINAPI CameraSetValue(short nParameter, void *pValue);

int WINAPI CameraGetImages(int nNumImages, void **ppImageBuffer);

'VB .NET
<DllImport("Camera.dll")>
Public shared Function SpotSetValue(ByVal nParameter As Short,
????What_to_put_here????) As Integer
End Function

<DllImport("Camera.dll")>
Public shared Function CameraGetImages(int nNumImages,
????What_to_put_here????) As Integer
End Function

Mar 28 '07 #1
1 980
>//C++ dll
>int WINAPI CameraSetValue(short nParameter, void *pValue);

int WINAPI CameraGetImages(int nNumImages, void **ppImageBuffer);

'VB .NET
<DllImport("Camera.dll")>
Public shared Function SpotSetValue(ByVal nParameter As Short,
????What_to_put_here????) As Integer
End Function

<DllImport("Camera.dll")>
Public shared Function CameraGetImages(int nNumImages,
????What_to_put_here????) As Integer
End Function
In the most general form

Public shared Function SpotSetValue(ByVal nParameter As Short,
ByVal pValue As IntPtr) As Integer

and

Public shared Function CameraGetImages(int nNumImages, ByRef
ppImageBuffer As IntPtr) As Integer

But if you acually know what tyoe of data you're going to pass in and
get back, there's a good chance you can save some work by using a more
specific parameter type.
Mattias

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Mar 28 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Stig Brautaset | last post by:
Hi group, I'm playing with a little generic linked list/stack library, and have a little problem with the interface of the pop() function. If I used a struct like this it would be simple: ...
188
by: infobahn | last post by:
printf("%p\n", (void *)0); /* UB, or not? Please explain your answer. */
5
by: Stijn van Dongen | last post by:
A question about void*. I have a hash library where the hash create function accepts functions unsigned (*hash)(const void *a) int (*cmp) (const void *a, const void *b) The insert function...
27
by: Erik de Castro Lopo | last post by:
Hi all, The GNU C compiler allows a void pointer to be incremented and the behaviour is equivalent to incrementing a char pointer. Is this legal C99 or is this a GNU C extention? Thanks in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.