Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pc's on the web can't view my activex

Status
Not open for further replies.

tuzojazz

Programmer
Dec 26, 2005
58
MX
Hi:

I have programed an activex called "ActivexNet" in Visual C++.net

This activex just sends a message box "hello world" when it starts.

I have marked "ActivexNet" as safe for scripting and initialization by calling certain functions when the control registers itself but I haven't signed it.

I have created an .inf file called "activexnet.inf"

"ActivexNet.ocx" and "activexnet.inf" are stored in a .cab file called "activexnet.cab"

I programed a web page to view "ActivexNet" called "callActivexNet.htm"

My pc works as server and "callActivexNet.htm" can be viewed by other pc's on the same intranet only if enable all about activex controls on internet explorer security settings.

I have other web pages on my pc which can be viewed by other pc's on the web but they can't view "ActivexNet" even enabling all about activex controls on internet explorer security settings. The web page just displays a broken link (the red "x")


What could be wrong?
What can I do?

Thanks!!



This is the code of the web page "callActivexNet.htm"
------------------------------------------------------------
<HTML>
<HEAD>
<TITLE>New Page</TITLE>
</HEAD>
<BODY>

<OBJECT ID="ActivexNet1" WIDTH=100 HEIGHT=51
CLASSID="CLSID:81C8850E-E897-421F-A3DB-F863CB6E5863" codebase="activexnet.cab#version=2,0,0,0">
<PARAM NAME="_Version" VALUE="65536">
<PARAM NAME="_ExtentX" VALUE="2646">
<PARAM NAME="_ExtentY" VALUE="1341">
<PARAM NAME="_StockProps" VALUE="0">
</OBJECT>

</BODY>
</HTML>
------------------------------------------------------------------

This is the code of "activexnet.inf"
------------------------------------------------------------
[version]
signature="$CHICAGO$"
AdvancedINF=2.0
[Add.Code]
activexnet.ocx=activexnet.ocx
msvcrt.dll=msvcrt.dll
mfc70.dll=mfc70.dll
olepro32.dll=olepro32.dll
[activexnet.ocx]
file-win32-x86=thiscab
clsid={81C8850E-E897-421F-A3DB-F863CB6E5863}
FileVersion=2,0,0,0
RegisterServer=yes
[msvcrt.dll]
FileVersion=4,20,0,6164
hook=mfc70installer
[mfc70.dll]
FileVersion=4,2,0,6256
hook=mfc70installer
[olepro32.dll]
FileVersion=4,2,0,6068
hook=mfc70installer
[mfc70installer]
file-win32-x86= run=%EXTRACT_DIR%\mfc70.exe
------------------------------------------------------------------
 
I was having this same problem.

My problem is that the ActiveX isn't really safe for scripting and initialization. To really do that, I needed to use interface IObjectSafetyImpl.

You can see how to use it in this link:


You have to put code in two places:

BEGIN_COM_MAP(CScriptButton)
.
.
COM_INTERFACE_ENTRY(IObjectSafety)
.
.
END_COM_MAP()

class ATL_NO_VTABLE CScriptButton :
.
.
public IObjectSafetyImpl<CScriptButton,

INTERFACESAFE_FOR_UNTRUSTED_CALLER|

INTERFACESAFE_FOR_UNTRUSTED_DATA>,
.
.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top