[Asterisk-Dev] RE: [Iaxclient-devel] IAX Help

Youssef Sayed youssef.sayed at atsint.com
Sun Oct 9 22:44:09 MST 2005


I removed the "Entry point"  and I got errors "Object reference not set to an instance of an object."

This is the Code:

[DllImport("iaxclient.dll")]	public extern static int			iaxc_register([MarshalAs(UnmanagedType.LPStr)]string iaxc_user,
			[MarshalAs(UnmanagedType.LPStr)]string iaxc_pass,
			[MarshalAs(UnmanagedType.LPStr)]string iaxc_host);
		
private void button1_Click(object sender, System.EventArgs e)
	{
		iaxc_register("1807","1807","82.201.196.147");			
			
	}

 
	 	
  Advanced Technology Solutions International	
________________________________

www.ATSInt.com
 Youssef Sayed Youssef
 System Integration Manager	
 Tel	 : 	 +202 - 6078917 ext: 807	
 GSM	 :	 +2010 16 35 600	
 Fax	 : 	 +202 - 6079178	
 Email	 : 	  youssef.sayed at atsint.com
 
 	 	
-----Original Message-----
From: iaxclient at j.howard.fm [mailto:iaxclient at j.howard.fm] 
Sent: Sunday, October 09, 2005 11:43 PM
To: Youssef Sayed
Cc: asterisk-dev at lists.digium.com
Subject: RE: [Iaxclient-devel] IAX Help

On Sun, 9 Oct 2005 13:07:11 +0200, "Youssef Sayed"
<youssef.sayed at atsint.com> said:
> Thanks for the file, it is unmanaged com object and I have wrote this in
> the code
> 
> [DllImport("iaxclient.dll", EntryPoint = "iax_register <at> 12")]
> 		public extern static int
> 			iaxc_register([MarshalAs(UnmanagedType.LPStr)]string iaxc_user,
> 			[MarshalAs(UnmanagedType.LPStr)]string iaxc_pass,
> 			[MarshalAs(UnmanagedType.LPStr)]string iaxc_host);
> 
> But I always got this error 
> 
> Unable to find an entry point named iax_register <at> 12 in DLL
> iaxclient.dll
> 
Remove the 'EntryPoint=' section from your DllImport attribute.

Note that the DLL is not an "unmanaged com object". It is a plain win32
library.






More information about the asterisk-dev mailing list