We can't figure out how to do the call or how to write the
function. We are already using functions from the windows
API, but we can't figure out how to set up the VS2005
functions. A trivial example (which we can not get to work
is)
C# Code:
using System;
using System.Runtime.InteropServices;
namespace Utility
{
public class ReadExcel
{
public string of_read_excel(string FileNameWithPath)
{
return "i am here!";
}
}
}
We have to be missing something like a particular attribute
setting in C#. We have tried putting the resulting dll in
many different places (including with the pb source code)
and it still fails.
In PB the set up is like:
This is the external function call:
FUNCTION string of_read_excel(string as_file_name) LIBRARY
"Utility.dll"
This is my code trying to use the external function call:
string ls_return, ls_file_name
ls_file_name = "c:\chs.xls"
ls_return = of_read_excel(ls_file_name)
mle_return.text += ls_return
Does someone know what we are doint wrong in c#?
Thanks
Charlie
http://msdn.microsoft.com/en-us/library/f07c8z1c.aspx
http://pbdj.sys-con.com/read/420516.htm
<Charlie Sherbow> wrote in message
news:48569be8.6bf...@sybase.com...