hi,
we are creating the .net com dll in VS 2008 facing the error R0035(Error Calling external object function GetPriceSheet() ) while using it in Powerbuilder 11.0
Steps followed in vs2008
1.created a new visual C# project with classlibrary
2.created a class and function GetPriceSheet()
3.check box true on options make assembly com visble and register for com interop
4. release
on other (client) Machine registered it successfully using regasm utility.
only hello function working properly and GetPriceSheet() Function throws error R0035!
<---------------------------------------------------->
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using System.Collections.Specialized;
using System.IO;
namespace EasyRP
{
public class EasyRP
{
public string Result1 = string.Empty;
public string Result2 = string.Empty;
public string URL1 = string.Empty;
public string URL2 = string.Empty;
public string GetPriceSheet(string as_username, string as_password, string as_path)
{
string URL1 = "https://technet.rapaport.com/HTTP/Prices/CSV2_Round.aspx";
string URL2 = "https://technet.rapaport.com/HTTP/Prices/CSV2_Pear.aspx";
WebClient webClient = new WebClient();
NameValueCollection formData = new NameValueCollection();
formData["Username"] = as_username;
formData["Password"] = as_password;
byte[] responseBytes1 = webClient.UploadValues(URL1, "POST", formData);
byte[] responseBytes2 = webClient.UploadValues(URL2, "POST", formData);
Result1 = Encoding.UTF8.GetString(responseBytes1);
Result2 = Encoding.UTF8.GetString(responseBytes2);
using (TextWriter tw = new StreamWriter(as_path, true))
{
tw.Write(Result1);
}
using (TextWriter tw = new StreamWriter(as_path, true))
{
tw.Write(Result2);
}
return "XXXXXX";
}
public string Hello()
{
return "Hello";
}
}
}
Any help will be greatly appreciated.
Thank you
Arun Pal