Author |
|
bmwragtop Newbie
Joined: March 30 2008 Location: United States
Online Status: Offline Posts: 27
|
Posted: April 19 2009 at 18:09 | IP Logged
|
|
|
Hi All,
I'm working my way through learning how to create a Power-Home plugin using Visual Studio 2008 (C++, using MFC). I am using the skeleton plugin as a simple starting point.
I have managed to get the plugin to behave the same as the pre-packaged skeleton plugin from within the "ActiveX Control Test Container" provided by Microsoft.
However, when I attempt to load my plugin into Power-Home, I am still getting an error with a value of -2 returned.
The plug-in has been registered.
I am not sure where to go from here, as everything seems to be working outside of Power-Home.
I suspect my issue may have to do with the way Strings are passed (type of string and using by reference or by value).
Are there any debug tips people have for debugging the issues when loading a new plug-in into Power-Home?
Thanks!
Tom
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: April 20 2009 at 20:59 | IP Logged
|
|
|
Tom,
I'll look through my server for a .Net version of the PowerHome Skeleton plugin that my wife put together for me. As soon as I find it, I'll put it on the downloads page and post back here.
Dave.
|
Back to Top |
|
|
bmwragtop Newbie
Joined: March 30 2008 Location: United States
Online Status: Offline Posts: 27
|
Posted: April 20 2009 at 21:12 | IP Logged
|
|
|
Hi Dave,
Thanks! That would help.
I'm sure there is just one small thing I'm missing in the configuration that is not playing well with Power-Home.
-Tom
|
Back to Top |
|
|
bmwragtop Newbie
Joined: March 30 2008 Location: United States
Online Status: Offline Posts: 27
|
Posted: April 28 2009 at 19:01 | IP Logged
|
|
|
Hi Dave,
Have you had any luck finding the .NET plugin code on your server?
Normally, I would not be in a rush, but I am creating a plugin to webcamXP, and I want to make sure it will work before I buy webcamXP. I have about 3 weeks left on my trial period, and I would like to get the plugin up and running in that period.
Thanks in advance, and thanks for your great support!
-Tom
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: May 02 2009 at 21:17 | IP Logged
|
|
|
Tom,
Sorry to take so long, but Ive found it. Its more or less the PH Skeleton Plugin that has been converted to C# by my wife. You can get it here: http://power-home.com/download/ph_plugin_net.zip
Let me know if you need it in VB.net or another language.
Dave.
|
Back to Top |
|
|
bmwragtop Newbie
Joined: March 30 2008 Location: United States
Online Status: Offline Posts: 27
|
Posted: May 02 2009 at 22:55 | IP Logged
|
|
|
Hi Dave,
Thanks!!! I'm away from home tonight, but I'll download and try it out tomorrow.
No need to apologize, though. You're a busy guy!
-Tom
|
Back to Top |
|
|
patrickm Senior Member
Joined: February 22 2007 Location: United States
Online Status: Offline Posts: 188
|
Posted: December 23 2010 at 05:03 | IP Logged
|
|
|
I tried the C# plugin and it would not register as it was in the zip file. I rebuilt the VS2008 project with COM interop checked and it registered successfully in 64 bit Win7.
However the plugin initialization returns an error of -2.
I can't find anything describing the init error codes. Anybody got a plugin working with VS2008?
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: December 23 2010 at 20:54 | IP Logged
|
|
|
The -2 during initialization means that the classname could not be found. This is most likely the result of not properly registering the .net COM object.
After compiling the project in .net, you must run the following command to "register" the COM object and type library:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\regasm.exe "C:\your_devel_directory\phplugin_net\bin\release\ph_plugin_ net.dll" /tlb /codebase
See where this gets you and let me know.
Dave.
|
Back to Top |
|
|
patrickm Senior Member
Joined: February 22 2007 Location: United States
Online Status: Offline Posts: 188
|
Posted: December 24 2010 at 12:14 | IP Logged
|
|
|
I successfully ran regasm prior to the error without the /tlb /codebase switches.
I ran it again with /tlb and /codebase switches and it generated a warning.
I then reinitialized PH and it generated the same -2 error.
I ran a DLL Viewer and saw that no functions were exported. DOes this DLL work for anyone else on other platforms? I'm trying this on 64bit Win7 Ultimate.
Edited by patrickm - December 26 2010 at 23:58
|
Back to Top |
|
|
mertfg Newbie
Joined: January 25 2011 Location: United States
Online Status: Offline Posts: 5
|
Posted: February 03 2011 at 23:32 | IP Logged
|
|
|
I would request bmwragtop to let me know whether he has succeeded in solving the issue related to Power-Home plugin. I am having a similar problem at the moment and I am also seriously thinking of making use of .NET plugin. I hope that bmwragtop will provide information in this regard soon.
__________________ magnetic messenger
|
Back to Top |
|
|
Carbin Newbie
Joined: April 19 2011 Location: Byelorussian SSR
Online Status: Offline Posts: 1
|
Posted: April 19 2011 at 04:09 | IP Logged
|
|
|
bmwragtop wrote:
Hi All,
I'm working my way through learning how to create a
Power-Home plugin using Visual Studio 2008 (C++, using
MFC). I am using the skeleton plugin as a simple starting
point.
iphone4 cases
ipad2 Sleeves
ipad2 Screen Protector
I have managed to get the plugin to behave the same as
the pre-packaged skeleton plugin from within the "ActiveX
Control Test Container" provided by Microsoft.
However, when I attempt to load my plugin into Power-
Home, I am still getting an error with a value of -2
returned.
The plug-in has been registered.
I am not sure where to go from here, as everything seems
to be working outside of Power-Home.
I suspect my issue may have to do with the way Strings
are passed (type of string and using by reference or by
value).
Are there any debug tips people have for debugging the
issues when loading a new plug-in into Power-Home?
Thanks!
Tom |
|
|
\
I'm sure there is just one small thing I'm missing in the
configuration that is not playing well with Power-Home.
Edited by Carbin - April 19 2011 at 04:12
|
Back to Top |
|
|
patrickm Senior Member
Joined: February 22 2007 Location: United States
Online Status: Offline Posts: 188
|
Posted: April 19 2011 at 10:06 | IP Logged
|
|
|
I am in the same situation. I can generate and use ActiveX plugins with other applications but I get the same -2 error on PH startup.
|
Back to Top |
|
|
billy77 Newbie
Joined: April 27 2011
Online Status: Offline Posts: 1
|
Posted: May 09 2011 at 00:55 | IP Logged
|
|
|
Carbin wrote:
bmwragtop wrote:
Hi All,
I'm working my way through learning how to create a
Power-Home plugin using Visual Studio 2008 (C++, using
MFC). I am using the skeleton plugin as a simple starting
point.
iPhone case
I have managed to get the plugin to behave the same as
the pre-packaged skeleton plugin from within the "ActiveX
Control Test Container" provided by Microsoft.
However, when I attempt to load my plugin into Power-
Home, I am still getting an error with a value of -2
returned.
The plug-in has been registered.
I am not sure where to go from here, as everything seems
to be working outside of Power-Home.
I suspect my issue may have to do with the way Strings
are passed (type of string and using by reference or by
value).
Are there any debug tips people have for debugging the
issues when loading a new plug-in into Power-Home?
Thanks!
Tom |
|
|
\
I'm sure there is just one small thing I'm missing in the
configuration that is not playing well with Power-Home. |
|
|
yes. it can be a config issue. my fren was able to solve it for me. but i din follow his steps.
|
Back to Top |
|
|