|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Writing ActiveX DLL in VB 2005I 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. Michael,
Did you set a reference to it using Project->Path->Com and select the dll? Cor Show quoteHide quote "Michael Powe" <michael+g***@trollope.org> schreef in bericht news:ur71747o7.fsf@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.
Show quote
Hide quote
"Michael Powe" <michael+g***@trollope.org> schrieb: Did you reference the DLL file or the TLB file from within your VB6 > 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. application? -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/> 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] Show quoteHide quote "Michael Powe" <michael+g***@trollope.org> schreef in bericht news:ur71747o7.fsf@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.
String and int Issue
MDI Form loading Late Binding Return Value Weirdness Visual Basic 6.0, Enterprise Edition ASP.NET: VSNET2003 to VSNET2005 Global.asax.vb in Visual Studio .NET 2005 Question on XMLSerialization Comparing recordsets in VB2005 Datefield from variable into a datefield in an access b Getting the text from a bound combobox. |
|||||||||||||||||||||||