473,387 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Problem with using created COM object with C#.NET 2005 under Excel2003 (Framework 2.0)

This is part of my assembly:

[assembly: ComVisible(true)]

[assembly: ClassInterfaceAttribute(ClassInterfaceType.None)]

// The following GUID is for the ID of the typelib if this project is
exposed to COM
[assembly: Guid("cd099def-f9fb-407f-b793-9db68f6b8a0b")]

This is my code:

using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
using System.Globalization;
namespace ExtraStuff
{
[Guid("4E3BBC1B-625F-47bf-BE80-DAB84F1934BE"),
InterfaceType(ComInterfaceType.InterfaceIsIDispatc h),
ComVisible(true)]
public interface IExtraStuff
{
[DispId(1)]
double F2C(double val);
}

[Guid("F88DAD68-578A-4e23-BCFF-0FBBEC1C4B55"),
ClassInterface(ClassInterfaceType.None),
ComSourceInterfaces(typeof(IExtraStuff)),
ComVisible(true)]
public class ExtraStuffClass : IExtraStuff
{
public ExtraStuffClass()
{
}

public double F2C(double val)
{
return ((5.0/9.0) * (val - 32.0));
}
}
}
and excel vb code:

Option Explicit

Public Function F2C(val As Double) As Double
Dim ccw As ExtraStuff.IExtraStuff
Set ccw = New ExtraStuffClass
F2C = ccw.F2C(val)
End Function

I put my dll to C:\Program Files\Microsoft Office\OFFICE11\ and I registered
that by:

regasm /tlb /codebase ExtraStuff.dll

And when I'm trying use it I get error:

'Run-time error '-2147024894 (80070002)'
In oleview.exe raport everything seems to be OK. Can anyone solve my problem
?
Mar 23 '07 #1
0 893

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Ankit Aneja | last post by:
I put the code for url rewrite in my Application_BeginRequest on global.ascx some .aspx pages are in root ,some in folder named admin and some in folder named user aspx pages which are in user...
3
by: Ankit Aneja | last post by:
I have a strange situation and I have no idea how to solve this. Its a Recruitment Search Page,in the Admin Page, for every button click event the Admin Person has to create a checkbox on the users...
16
by: Dany | last post by:
Our web service was working fine until we installed .net Framework 1.1 service pack 1. Uninstalling SP1 is not an option because our largest customer says service packs marked as "critical" by...
3
by: Mike | last post by:
I have created a web service for a client to consume. The element I am having trouble with is, as described in their WSDL: <xsd:element minOccurs="0" ref="LocalData" maxOccurs="1" /> ...
5
by: Dany C. | last post by:
We have install a valid SSL certificate issued to www.mycompany.com on our web server running IIS 6.0 / win2003 SP1. Then we have created a sub domain pointing to the same server for our web...
2
by: John | last post by:
Hi I was working fine with create user wizard and the default membership provider. I have now customised the membership provider as per attached web.config. The create user wizard picks up the...
1
by: Igor | last post by:
Hi everyone! I have a problem with calling .NET assembly dll function from VB6 program. I created an assembly in Visual studio .Net 2003 with framework v1.1.4322 installed, exported type...
0
by: Al Fatykhov | last post by:
Using MABLE logic engine with existing .NET applications. MABLE web services provide an interface to MABLE business objects and logic. Let us review some technical details of the MABLE web...
0
by: =?ISO-8859-2?B?UmFmYbMgR2llemdhs2E=?= | last post by:
This is part of my assembly: // The following GUID is for the ID of the typelib if this project is exposed to COM
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.