I have developed .NET COM dll. Inside there is a class (BarKodPodaciCl) which have attribute (barKodPodaci ) which is list of another class (BarKodStruktCl) :
public class BarKodStruktCl
{
public int sifrap = 0;
public int artikl = 0;
public string vrsta = string.Empty;
public string kod = string.Empty;
public string sisKorisnik = string.Empty;
}
public class BarKodPodaciCl
{
public List<BarKodStruktCl> barKodPodaci = new List<BarKodStruktCl>();
}
I have procedure which returns object of BarKodPodaciCl
When I create COM object in VFP there is no error but when I try to do something with that object like wait window COMobject.barKodPodaci.sifrap i get an error :
ole error code 0x8007000e: Not enough storage is available to complete this operation
Is it possible for VFP to consume object with List attribute ?
VFP does not support access generics in .NET. Actually COM can't deal with generic types, because they are dynamic and COM requires strict typing.
You can access these using wwDotnetBridge:
http://west-wind.com/wwDotnetBridge.aspx
You can take a look at the white paper which explains why you might want to use wwDotnetBridge to call your .NET components in detail.
You can get wwDotnetBridge as part of the West Wind Client Tools or from our open source library on Github...
+++ Rick ---
+++ Rick ---
Hi.
I have developed .NET COM dll. Inside there is a class (BarKodPodaciCl) which have attribute (barKodPodaci ) which is list of another class (BarKodStruktCl) :
public class BarKodStruktCl
{
public int sifrap = 0;
public int artikl = 0;
public string vrsta = string.Empty;
public string kod = string.Empty;
public string sisKorisnik = string.Empty;
}
public class BarKodPodaciCl
{
public List<BarKodStruktCl> barKodPodaci = new List<BarKodStruktCl>();
}
I have procedure which returns object of BarKodPodaciCl
When I create COM object in VFP there is no error but when I try to do something with that object like wait window COMobject.barKodPodaci.sifrap i get an error :
ole error code 0x8007000e: Not enough storage is available to complete this operation
Is it possible for VFP to consume object with List attribute ?
West Wind Technologies
Making waves on the Web
from Maui
VFP does not support access generics in .NET. Actually COM can't deal with generic types, because they are dynamic and COM requires strict typing.
You can access these using wwDotnetBridge:
http://west-wind.com/wwDotnetBridge.aspx
You can take a look at the white paper which explains why you might want to use wwDotnetBridge to call your .NET components in detail.
You can get wwDotnetBridge as part of the West Wind Client Tools or from our open source library on Github...
+++ Rick ---
+++ Rick ---
Hi.
I have developed .NET COM dll. Inside there is a class (BarKodPodaciCl) which have attribute (barKodPodaci ) which is list of another class (BarKodStruktCl) :
public class BarKodStruktCl
{
public int sifrap = 0;
public int artikl = 0;
public string vrsta = string.Empty;
public string kod = string.Empty;
public string sisKorisnik = string.Empty;
}
public class BarKodPodaciCl
{
public List<BarKodStruktCl> barKodPodaci = new List<BarKodStruktCl>();
}
I have procedure which returns object of BarKodPodaciCl
When I create COM object in VFP there is no error but when I try to do something with that object like wait window COMobject.barKodPodaci.sifrap i get an error :
ole error code 0x8007000e: Not enough storage is available to complete this operation
Is it possible for VFP to consume object with List attribute ?
wwDotnetBridge lets you access just about all of .NET's features directly from FoxPro so you could have done what you wanted with only minor code changes.
+++ Rick ---
Thanks for the answer. It is so good that you exist. With your posts you opened my mind. I have found another way to accomplish that and that is I am making xml of that list object because the final goal is that I need it in cursor and it works fine for me. I started with COM because of comunication with WCF service and there I have a return object which have one tree attribute (another object which holds information about success,hasdata... and exception object on WCF service) and one attribute which is list of object (data from database) and when i do regular call to wcf servise I cant access that second object in first object. That nodelist when you say item(0) returns all tree structure like it is one tag.
VFP does not support access generics in .NET. Actually COM can't deal with generic types, because they are dynamic and COM requires strict typing.
You can access these using wwDotnetBridge:
http://west-wind.com/wwDotnetBridge.aspx
You can take a look at the white paper which explains why you might want to use wwDotnetBridge to call your .NET components in detail.
You can get wwDotnetBridge as part of the West Wind Client Tools or from our open source library on Github...
+++ Rick ---
+++ Rick ---
Hi.
I have developed .NET COM dll. Inside there is a class (BarKodPodaciCl) which have attribute (barKodPodaci ) which is list of another class (BarKodStruktCl) :
public class BarKodStruktCl
{
public int sifrap = 0;
public int artikl = 0;
public string vrsta = string.Empty;
public string kod = string.Empty;
public string sisKorisnik = string.Empty;
}
public class BarKodPodaciCl
{
public List<BarKodStruktCl> barKodPodaci = new List<BarKodStruktCl>();
}
I have procedure which returns object of BarKodPodaciCl
When I create COM object in VFP there is no error but when I try to do something with that object like wait window COMobject.barKodPodaci.sifrap i get an error :
ole error code 0x8007000e: Not enough storage is available to complete this operation
Is it possible for VFP to consume object with List attribute ?
West Wind Technologies
Making waves on the Web
from Maui