Hello gretl users!
I'm trying to open a ".gdt" file calling gretl_read_native_data (system
info's: "gretl 1.9.6 - build date 2011-10-17" on "Windows 7 Ultimate -
Service Pack 1") from a C# class: the result is always an error code 12 (it
seems that something is wrong into the file path name ...).
Follows a significant excerpt of my code
[Start C# code]
...
IntPtr dset;
[DllImport(@"C:\Program Files (x86)\gretl\libgretl.dll")]
internal static extern void libgretl_init();
[DllImport(@"C:\Program Files (x86)\gretl\libgretl.dll")]
internal static extern IntPtr create_new_dataset(IntPtr pZ, int nvar, int
nobs, int markers);
[DllImport(@"C:\Program Files (x86)\gretl\libgretl.dll", CharSet =
CharSet.Unicode)]
internal static extern int gretl_read_native_data(string fname, IntPtr
pdset);
...
int err;
string fname = @"C:\Program Files (x86)\gretl\data\misc\australia.gdt";
libgretl_init();
dset = datainfo_new();
err = gretl_read_native_data(fname, dset);
...
[End C# code]
Where am I wrong?
Regards, Filippo.