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: Tue, 10 Jul 2007 21:38:08 +0200,    posted on: microsoft.public.dotnet.framework.interop        back       

Thread Index
  1    Christian Schmidt


Excel 2000 interop: manifest and COM-error   
Hi all,
I'm trying to add functions to Excel 2000 via VBA's Declare. I have 
declared the interface in VBA and the C++/CLI-dll ("Excel-AddIn.dll") 
works normally, if I use standard types and SAFEARRAY, __stdcall and a .def.

After adding a reference to Excel9.olb (creates Interop.Excel.1.3.dll, 
Office.dll and VBIDE.dll) and using Excel::Range within a procedure, I 
have problems loading the Excel-AddIn.dll, because Interop.Excel.1.3.dll 
or one of it's descendants cannot be found. If I copy the interop-dlls 
to the Excel directory, the dll can be loaded.

Question 1:
I assume I have to modify the Excel-AddIn.dll.manifest file to give the 
correct location of the interop-dlls. How?

If my Dll exports a function with Excel::Range^ as an argument (no more 
__stdcall possible) I get a 0x80004005 COM-error.

Question2:
What's the problem here?


Thanks for any ideas,
Christian


Example
=======
VBA:
Public Declare Function SumMe Lib "Debug\Excel-AddIn.dll" Alias "SumMe" 
(ByRef r As Range) As Double

Private Sub Workbook_Open()
     ChDrive Me.Path
     ChDir Me.Path
End Sub


C++/CLI:
extern "C" {
   double SumMe(Excel::Range^ r) {
     ..
   }
Date:Tue, 10 Jul 2007 21:38:08 +0200   Author:  

Google
 
Web dotnetnewsgroup.com


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