Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
0
Answer
Null function pointer... how do I do this in C#?
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
Henry Jones
18y
1.6k
1
Reply
Hi Friends.......
OSINT OSFNDEF x25xcall
(
OSINT OSDTPTR cid,
OSINT waitmode,
OSINT port,
OSINT info,
struct x25data OSDTPTR facility,
struct x25data OSDTPTR udata,
char OSDTPTR remote,
char OSDTPTR local,
void (OSFNPTR post)(struct x25doneinfo *)
);
I beleive I have almost got it... but not quite. I find the last part
(the void (OSFNPTR post)(struct x25doneinfo *) ) confusing...
So far, I have:
[DllImport("ex25.dll")]
public static extern int x25xcall
(
ref int cid,
int waitmode,
int port,
int info,
ref x25data facility,
ref x25data udata,
ref char remote,
ref char local,
???????
)
plz tell me how to convert the last parameter which is null function pointer which takes struct object as a parameter.
I write The Delegate for the same
The delehgate is
public struct x25doneinfo
{
public int xi_len;
public string xi_buf;
public int xi_cid;
public int xi_cmd;
public int xi_info;
public int xi_retcode;
public PostDelgate post;
//[MarshalAs(UnmanagedType.AsAny)] object xi_ref;
};
x25doneinfo doneinfo = new x25doneinfo() ;
public delegate void PostDelgate(ref x25doneinfo doneInfo );
But when i Call The function x25xcall it gives Error
Object Reference Not Set.....
intCall =x25xcall( 0, 0, 1 , 0,
ref
sFacil ,
ref
sUdata ,
null
,
null
, post) ;
Plz Help
Henry.......
Post
Reset
Cancel
Answers (
0
)
Next Recommended Forum
How to save Logon Credentials when browsing through different pages of the same site
how can i transfer the function?