473,407 Members | 2,312 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,407 software developers and data experts.

Writing ActiveX DLL in VB 2005

Hello,

I have an application that exposes a VB 6 ActiveX API. I can write
DLLs that plug into the application and add functionality to the
application. I write these DLLs by implementing an interface.

I have been doing this in VB 6. On initial review, it appears that it
should be possible to do it in VB 2005. I have actually successfully
implemented the interface and compiled a DLL. However, my application
fails to initialize the DLL.

I added a simple "on error goto" in order to try to get an error
written to the event log, but it does not fire.

Despite quite a bit of time spent googling, I can't get a clear
picture of what actually is necessary to get the COM API to interact
successfully with my "interop" code. In fact, I'm not even sure I'm
proceeding in the correct manner.

I implemented the interface in a class library, using a simple method
that just writes a log entry. I checked the box to make the class
library COM-visible. I strong-named the DLL. I compiled and copied
all the resulting files from the bin/Release directory to the
designated "plugins" directory of my application. I made the
necessary configuration modification to the application for it to
recognize the plugin.

I registered the DLL with regasm.

I also tried adding the DLL itself to the GAC. This failed with an
"unidentified error" using the gacutil.

All I'm getting from my application is "failed to initialize the
plugin."

I would appreciate some guidance as to how to achieve my goal, if it
even is possible. To restate: I want to write an ActiveX DLL in VB
2005 (using Express Edition) that will plug into my COM-based
application running on WinXP Pro.

Thanks for any help.

mp

--
'cat' is not recognized as an internal or external command,
operable program or batch file.
Jun 30 '06 #1
3 2267
Michael,

Did you set a reference to it using Project->Path->Com and select the dll?

Cor

"Michael Powe" <mi**********@trollope.org> schreef in bericht
news:ur***********@trollope.org...
Hello,

I have an application that exposes a VB 6 ActiveX API. I can write
DLLs that plug into the application and add functionality to the
application. I write these DLLs by implementing an interface.

I have been doing this in VB 6. On initial review, it appears that it
should be possible to do it in VB 2005. I have actually successfully
implemented the interface and compiled a DLL. However, my application
fails to initialize the DLL.

I added a simple "on error goto" in order to try to get an error
written to the event log, but it does not fire.

Despite quite a bit of time spent googling, I can't get a clear
picture of what actually is necessary to get the COM API to interact
successfully with my "interop" code. In fact, I'm not even sure I'm
proceeding in the correct manner.

I implemented the interface in a class library, using a simple method
that just writes a log entry. I checked the box to make the class
library COM-visible. I strong-named the DLL. I compiled and copied
all the resulting files from the bin/Release directory to the
designated "plugins" directory of my application. I made the
necessary configuration modification to the application for it to
recognize the plugin.

I registered the DLL with regasm.

I also tried adding the DLL itself to the GAC. This failed with an
"unidentified error" using the gacutil.

All I'm getting from my application is "failed to initialize the
plugin."

I would appreciate some guidance as to how to achieve my goal, if it
even is possible. To restate: I want to write an ActiveX DLL in VB
2005 (using Express Edition) that will plug into my COM-based
application running on WinXP Pro.

Thanks for any help.

mp

--
'cat' is not recognized as an internal or external command,
operable program or batch file.

Jun 30 '06 #2
"Michael Powe" <mi**********@trollope.org> schrieb:
I have an application that exposes a VB 6 ActiveX API. I can write
DLLs that plug into the application and add functionality to the
application. I write these DLLs by implementing an interface.

I have been doing this in VB 6. On initial review, it appears that it
should be possible to do it in VB 2005. I have actually successfully
implemented the interface and compiled a DLL. However, my application
fails to initialize the DLL.

I added a simple "on error goto" in order to try to get an error
written to the event log, but it does not fire.

Despite quite a bit of time spent googling, I can't get a clear
picture of what actually is necessary to get the COM API to interact
successfully with my "interop" code. In fact, I'm not even sure I'm
proceeding in the correct manner.

I implemented the interface in a class library, using a simple method
that just writes a log entry. I checked the box to make the class
library COM-visible. I strong-named the DLL. I compiled and copied
all the resulting files from the bin/Release directory to the
designated "plugins" directory of my application. I made the
necessary configuration modification to the application for it to
recognize the plugin.

I registered the DLL with regasm.


Did you reference the DLL file or the TLB file from within your VB6
application?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Jun 30 '06 #3

Michael

first of all i set all the attribute flags myself and do not rely on the IDE
doing this for me as my experience is that this sometimes goes wrong
but to get back to your problem a COM class must have a default constructor
without parameters

public sub new()
mybase.new
end sub

you probably forgot that ,, if you did you can see the interface but can`t
start it from VB6
regards

Michel Posseth [MCP]
"Michael Powe" <mi**********@trollope.org> schreef in bericht
news:ur***********@trollope.org...
Hello,

I have an application that exposes a VB 6 ActiveX API. I can write
DLLs that plug into the application and add functionality to the
application. I write these DLLs by implementing an interface.

I have been doing this in VB 6. On initial review, it appears that it
should be possible to do it in VB 2005. I have actually successfully
implemented the interface and compiled a DLL. However, my application
fails to initialize the DLL.

I added a simple "on error goto" in order to try to get an error
written to the event log, but it does not fire.

Despite quite a bit of time spent googling, I can't get a clear
picture of what actually is necessary to get the COM API to interact
successfully with my "interop" code. In fact, I'm not even sure I'm
proceeding in the correct manner.

I implemented the interface in a class library, using a simple method
that just writes a log entry. I checked the box to make the class
library COM-visible. I strong-named the DLL. I compiled and copied
all the resulting files from the bin/Release directory to the
designated "plugins" directory of my application. I made the
necessary configuration modification to the application for it to
recognize the plugin.

I registered the DLL with regasm.

I also tried adding the DLL itself to the GAC. This failed with an
"unidentified error" using the gacutil.

All I'm getting from my application is "failed to initialize the
plugin."

I would appreciate some guidance as to how to achieve my goal, if it
even is possible. To restate: I want to write an ActiveX DLL in VB
2005 (using Express Edition) that will plug into my COM-based
application running on WinXP Pro.

Thanks for any help.

mp

--
'cat' is not recognized as an internal or external command,
operable program or batch file.

Jul 1 '06 #4

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

Similar topics

18
by: DartmanX | last post by:
Is there a simple way to determine if someone using Internet Explorer has completely disabled ActiveX controls? Jason
3
by: adam | last post by:
hi is it possible to write activeX controls in C# and if so any suggestions of links to sample code would be appreciated? thanks Adam
0
by: Gazelle | last post by:
I have a dilemma, that I am hopping I can find some help with. He is the back story so everyone sort of understands what it is that I am trying to accomplish. My problem: I have multiple...
3
by: Jeffery Franzen | last post by:
Anyone know where the documentation is regarding Activex controls in asp web forms? I'm using VS.NET 2002 enterprise and am trying to use Activex controls in vb.net web form app. I do the add...
7
by: Jarod_24 | last post by:
I just downloaded a activex control that was written in C# and tried to view it on my PDA's Internet Explorer. At my regular PC it displayed just fine, but nothing showed up on the pda. Do...
15
by: Michael Tissington | last post by:
I have a Visual Basic 6.0 ActiveX Control. It seems there is no way with VS 2005 to create a similar control for containers that host ActiverX controls, is this correct ? I'm thinking of...
3
by: =?Utf-8?B?R3JlZyBN?= | last post by:
Hello, I'm running an asp.net, intranet web application using .net framework 1.1 on IIS5.1 / 6.0. Through the web application, I would like to press a button on the web page, have another window...
4
by: mmedved | last post by:
I ran into a problem using a custom ActiveX I wrote in VB 2005. It has a property that is "indexed" - that is, it has a parameter and needs to be addressed as (Index) - kinda like this: ...
2
by: deccio | last post by:
I have create an activex Control with Visual studio 2005 and framework 2.0 in c# to add drag & drop functionality to upload multi file. When I use it in a windows form it work fine. Infact if I...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.