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

by reference call to unsafe void** argument

Context: C# wrapper around Tivoli LDAP C library.

I understand that something like

"public static unsafe void init(void** LDAPObj)"

has to do with a byref call.

Question: How do I have to wrap or call this function?

Note: the init function is a DllImport with the same parameter(s).
Thank you for any help, F.
Nov 15 '05 #1
1 1754
Francois,

What is LDAPObj?

If I wanted to get around the unsafe call, I would do the following:

public static extern void init(IntPtr LDAPObj)

And then work from there. However, depending on what LDAPObj is, you
might be able to make a more type-safe definition.

Also, if this returns pointers to regular C++ objects, then you won't be
able to use those objects, unless you are doing something else (like
wrapping them in managed code, exposing them through COM, etc, etc).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- ni**************@exisconsulting.com

"Francois Vanderseypen" <ne***********@hotmail.com> wrote in message
news:40*************************@posting.google.co m...
Context: C# wrapper around Tivoli LDAP C library.

I understand that something like

"public static unsafe void init(void** LDAPObj)"

has to do with a byref call.

Question: How do I have to wrap or call this function?

Note: the init function is a DllImport with the same parameter(s).
Thank you for any help, F.

Nov 15 '05 #2

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

Similar topics

36
by: Riccardo Rossi | last post by:
Hi all! How does Python pass arguments to a function? By value or by reference? Thanks, Riccardo Rossi.
15
by: David Fisher | last post by:
I have been encouraged by someone else to use a reference rather than a pointer as an "out" parameter to a function, eg. void doStuff(Thing &out1, Thing &out2) as opposed to: void...
4
by: mangi03 | last post by:
Hi, I came acrosss g++ compile errors whenever I make a function call by reference and found out from the test program that compiler is treating the function argument differently when another...
1
by: Tobias | last post by:
Hi! I have a problem which is quite tricky. I need to pass a struct from .NET to a native Win32 DLL. But i just need to pass the pointer to a reference of that struct. With my first struct this...
3
by: Ann Huxtable | last post by:
I wrote a method that accepted a form. The signature was as ff: void foo(ref Form frm) ; I had to remove the ref keyword to get it to compile. Any idea why? I though forms would be passed by...
29
by: shuisheng | last post by:
Dear All, The problem of choosing pointer or reference is always confusing me. Would you please give me some suggestion on it. I appreciate your kind help. For example, I'd like to convert a...
10
by: Robert Dailey | last post by:
Hi, I noticed in Python all function parameters seem to be passed by reference. This means that when I modify the value of a variable of a function, the value of the variable externally from the...
2
by: =?Utf-8?B?TWlrZQ==?= | last post by:
Anyone know of any way to get a reference to the argument to the left (lvalue I believe it is called) of the assignment operator? I realize you can't overload the assignment operator in C#, but...
275
by: Astley Le Jasper | last post by:
Sorry for the numpty question ... How do you find the reference name of an object? So if i have this bob = modulename.objectname() how do i find that the name is 'bob'
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
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: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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
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.