-----------------------------------------------------------

New Message on MumbaiUserGroup

-----------------------------------------------------------
From: monu_091
Message 3 in Discussion

Hi everybody.    I am working with Eicon's X.25 Development tools. The
tools come with a "Ex25.dll" that I need to interact with, from my C#
code.  I have been marginally succesfull in getting some of the method
calls to work. For example:

the Ex25.dll has this:

OSEXTERN OSINT OSFNDEF x25init(message,uMsg)
OSINT        message;    /* message flag for request completion */
unsigned int     uMsg;        /* Identifies message if using messaging */

and in C# I can call it by doing this:

[DllImport("Ex25.dll")]
public static extern int x25init(int message, int uMsg);

So far so good.

There is also a struct:

struct x25doneinfo
{
OSINT xi_len; /* xi_buf length in bytes */
char OSSDTPTR xi_buf; /* Buffer address */
OSINT xi_cid; /* Connection id */
OSINT xi_cmd; /* Command code */
OSINT xi_info; /* X-bit field */
OSINT xi_retcode; /* Return code */
    void     *xi_ref;         /* user reference pointer */    
};
whose C# equivalent is (I think):

struct x25doneinfo            
{
    int xi_len;
    [MarshalAs(UnmanagedType.LPStr)] public string xi_buf;        
    int xi_cid;
    int xi_cmd;
    int xi_info;
    int xi_retcode;    
    [MarshalAs(UnmanagedType.AsAny)] object xi_ref;            
};

The problem I am having come here, when in the ".h" file, they have
this:

/* Null post routine */

#define X25NULLFN (void (OSFNPTR)(struct x25doneinfo *))0 /*
NULL function pointer */

I have no idea how to "convert" this to a C# equivalent. Any help /
tips / pointers that anyone could give me on this would be greatly
appreciated.

Thanks in advance,
Hemant


-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/mumbaiusergroup/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member 
Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you 
received this message by mistake, please click the "Remove" link below. On the 
pre-addressed e-mail message that opens, simply click "Send". Your e-mail 
address will be deleted from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to