Passing Arrays to a .NET COM object from Visual FoxPro

Posted by: Rick Strahls WebLog, on 07 Jun 2005 | View original

A number of people have asked me about passing arrays to .NET functions from Visual FoxPro applications. The problem here is that Visual FoxPro arrays are not formatted the right way to just be called to a .NET COM object by default. VFP arrays are 1 based while in general COM objects expect arrays to be 0 based so you need to fix up arrays to make this happen. .NET arrays are always 0 based unless explicitly declared otherwise.   Assume you have a method in a .NET COM object that looks like...

Advertisement
The leading UI suite for ASP.NET - Telerik radControls
Outstanding performance. Full ASP.NET AJAX support. Nearly codeless development.

Similar Posts

  • Deployments made easy more
  • Add-in Comparison: VSFileFinder 2005 vs. SonicFileFinder more
  • No Fluff Just Stuff panel discussion - level 100 more
  • Functional Programming via Anonymous Delegates and Script# more
  • Introducing CaptainHook - A Subversion Hook Framework For .NET more
  • Passing Arrays between FoxPro and .NET with COM Interop more
  • Recycling messages (or how not to be responsible for translating error messages). more
  • CS Dev Guide: User Roles more
  • Web Service Proxy Objects and COM Interop Problems more
  • How to authenticate against Active Directory from Cisco IOS more

News Categories

.NET | ADO.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Community Server | dasBlog | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD