Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ActiveX
Hello,
 
I have this .NET library class that inherits an abstract class. I found several tutorials on how to make the class/methods and properties visible as a COM object. Also, I was able to register the Active X on the system.
 
 
[ProgId("Class1")]
[ClassInterface(ClassInterfaceType.None)]
[Guid("11EABF82-A840-48AE-B11A-A05DCAFCD0D4")]
[ComVisible(true)] 
public class Class1 : BaseClass {
....
}
 
For my javascript, I was able to call methods and parameters in the class that are not defined in the abstract class. However, when I try to call methods and parameters defined in my the abstract class, I get "Object method or property not supported"
 
Ex.
[ComVisible(true)] 
protected override string Method1() { ... }
 
Is there any way to fix this? Any help would be appreciated.
 
Thanks in Advance
Posted 4-Jan-13 9:13am
dbzx734466
Edited 4-Jan-13 9:14am
v2

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

ActiveX used on the client size is evil, really. First of all, this is proprietary technology, so browsers are not obliged to support it and often don't or do via some plug-ins which many user's won't install. Especially on non-Microsoft platforms. What, developing application only for the users of Internet Explorer (basically)? I would not call it Web.
 
Also, this is notoriously unsafe. The literate users will deny using your application if they learn that you use ActiveX on client side. Using it violates isolation and privacy of local systems, as, in principle, ActiveX component can get the same access as the current user. In contrast, standard Web technologies are safe; they are designed to isolate local systems from Web application to guarantee safety.
 
So, I see no sense in using it, but a lot of potential harm. I would advise to avoid it, by all means.
 
—SA
  Permalink  
Comments
Member 9546601 at 4-Jan-13 18:33pm
   
How else would I be able to call the functiosn from my Library class using javascript?
Sergey Alexandrovich Kryukov at 4-Jan-13 19:05pm
   
The question is: why? You cannot. The idea of a Web application is that is fully executed by a browser. It's limiting, but safe.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 George Jonsson 215
1 Kornfeld Eliyahu Peter 169
2 Zoltán Zörgő 139
3 PIEBALDconsult 130
4 OriginalGriff 120
0 OriginalGriff 6,165
1 DamithSL 4,658
2 Maciej Los 4,107
3 Kornfeld Eliyahu Peter 3,649
4 Sergey Alexandrovich Kryukov 3,342


Advertise | Privacy | Mobile
Web01 | 2.8.141220.1 | Last Updated 4 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100