TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Henry Jones
NA
2
0
Null function pointer... how do I do this in C#?
Nov 25 2005 12:05 AM
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.......
Reply
Answers (
0
)
How to save Logon Credentials when browsing through different pages of the same site
how can i transfer the function?