DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Thu, 19 Jul 2007 01:00:30 +0200,    posted on: microsoft.public.dotnet.framework.interop        back       

Thread Index
  1    Armin Zingler
          2    Armin Zingler


Tlbimp: unexpected conversion of SAFEARRAY in structure   
Hi,        (.Net 2.0)

an AX-DLL written in VB6 is imported by tlbimp.

VB6 code:

    Public Type SAKomplexRecord
    ....
    End Type

    Public Type SAKomplex
       Records() As SAKomplexRecord
    End Type


IDL: (from original VB6 DLL)
    typedef [uuid(.....), version(1.0)]
    struct tagSAKomplex {
        [helpstring("Records")
    ]
        SAFEARRAY(SAKomplexRecord) Records;
    } SAKomplex;


    typedef [uuid(.....), version(1.0)]
    struct tagSAKomplexRecord {
    .....
    } SAKomplexRecord;


Problem:
    In VB.Net, referencing the imported file, the declaration of
    SAKomplex.Records is
        "Public Records As System.Array".
    I expect it to be
        "Public Records() As Projectname.SAKomplexRecord".

Why is this? In the same library, there is another structure containing an 
array of structures. There it works.


Armin
Date:Thu, 19 Jul 2007 01:00:30 +0200   Author:  

Re: Tlbimp: unexpected conversion of SAFEARRAY in structure   
"Armin Zingler"  schrieb

> Hi,        (.Net 2.0)
>
> an AX-DLL written in VB6 is imported by tlbimp.


I assumed that the Upgrade wizard that converts a VB6 project to VB.Net, 
internally only calls tlbimp.exe. That's why I asked for tlbimp.exe. In 
reality, I used the upgrade wizard (and not tlbimp), which obviously 
internally uses "/sysarray" to create the interop assemblies.

If I manually call tlbimp.exe, the result is fine, so this problem is 
solved. Anyway thx for reading.


Armin
Date:Thu, 19 Jul 2007 02:01:50 +0200   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us