-
January 15th, 2014, 04:23 PM
#1
Instantiating and using Opaque struct in C Sharp
Hello....
I have the below limited info provided from some 3rd party. Due to security reasons no more info will be available.
I am trying to use this info in C# and I am not sure how to use it. I have tried allocating memory but that did not help.
Can someone provide inputs on this?
I am new to C# and have only few hours worth of experience with it.
********************************************************
/* Opaque function */
typedef struct _Opaque_Func *Opaque_Func;
// main function
int
main(int argc, char* argv[])
{
Opaque_Func abc = NULL;
/* Function 1 */
err = Function1 (&abc, &xyz);
if (err) {
fprintf(print error here);
}
/* Function2 */
err = Function2(abc, 0);
if (err) {
fprintf(print error here);
}
}
********************************************************
-
January 16th, 2014, 12:45 PM
#2
Re: Instantiating and using Opaque struct in C Sharp
You state that you want to do this in C#, but the code snippet you provided is in C++. So are you coding in C# or in C++?
-
January 16th, 2014, 02:16 PM
#3
Re: Instantiating and using Opaque struct in C Sharp
Originally Posted by Arjay
You state that you want to do this in C#, but the code snippet you provided is in C++. So are you coding in C# or in C++?
Hi Arjay,
The snippet I provided is from C++ and I want to replicate that in C#.
Basically I am trying to create a .NET DLL by writing wrappers around the C++ code.
-
January 16th, 2014, 02:31 PM
#4
Re: Instantiating and using Opaque struct in C Sharp
Hi Arjay,
Yes the code snippet is from C++ and I want to mimic this in C#.
I am the process of creating .NET DLL for teh C++ code by writing wrappers around it in C#.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|