Board index » cppbuilder » ActiveX deployment problem...

ActiveX deployment problem...

I have an activex form already contructed and
when i call it from a browser(Internet Explorer 4 or 5)
it is not loaded... but the object has already installed to machine.
Security options is low...(permit any activex control)....
Is this problem produced by compiler and linker options?
or was another problem?

And another question.
Form the activex main form when users e.g presses a button was created a
new fsNormal form.
My activex main form has various buttons.
On the click event of each button i create a fsNormal form to show e.g.
the search form, the results form etc.
Is this way the right?

p.s. Sorry for my english....
Panagiotis Staikos from Greece...

 

Re:ActiveX deployment problem...


Make sure all the necessary files are deployed with the ActiveX file. Or
better yet, use static linking and don't use run-time packages. Both of
these options are available in the Project|Options dialog.

HTH,
Alex

Quote
"Panagiotis L. Staikos" wrote:

[snip]

--
HotSend - portable documents technology
http://www.hotsend.com/
eFax - get your faxes via email - Free !
http://www.efax.com

Re:ActiveX deployment problem...


I am having the same problem...

I set my security settings to low in ie5 and the app now tries to load it
pops up a window saying
"do you want to install and run bla.ini"
followed by
"do you want to install and run bla.cab"

but when I click yes it instantly dies and just displays an x in the area
reserved for the app

I have included all of the required files under web deploy options
I am not signing the ActiveX form should this be a factor or should the
security setting of low take care of that?

    - Thanks in advance
        Geoff

Quote
Panagiotis L. Staikos wrote in message <379D628C.384DA...@ekt.gr>...

>I have an activex form already contructed and
>when i call it from a browser(Internet Explorer 4 or 5)
>it is not loaded... but the object has already installed to machine.
>Security options is low...(permit any activex control)....
>Is this problem produced by compiler and linker options?
>or was another problem?

>And another question.
>Form the activex main form when users e.g presses a button was created a
>new fsNormal form.
>My activex main form has various buttons.
>On the click event of each button i create a fsNormal form to show e.g.
>the search form, the results form etc.
>Is this way the right?

>p.s. Sorry for my english....
>Panagiotis Staikos from Greece...

Re:ActiveX deployment problem...


Quote
Geoff Nicol wrote in message
> I am having the same problem...
> I set my security settings to low in ie5 and the app now tries to load it
> pops up a window saying

[snip]

You need to tell Explorer that your control is SafeForScripting and
SafeForInitializing. This is done by adding these declarations to the
Registry. This should eliminate most of the ie5's complaining except for
code signing.

Of course, the responsibility is still yours to make sure that your controls
really are "safe". Just saying so only eliminates the message, it doesn't
actually make them safe. For example; if your control is designed to create
files, someone could potentially script it to fill your hard drive full of
junk.

Here is how I have done it:

#include <registry.hpp>
STDAPI __export DllRegisterServer(void)
{
  HRESULT ret_val;
  TRegistry *myRegistry = new TRegistry();

  ret_val = _Module.RegisterServer(TRUE);

  if( ret_val == S_OK)  // change ret_val if your code is critical
  {
    try
    {
      myRegistry->RootKey = HKEY_CLASSES_ROOT;
      if( myRegistry->OpenKey(
        "\\CLSID\\" + GUIDToString(CLSID_MyActiveX) +
        "\\Implemented Categories", true )) // create and open
      {
        myRegistry->WriteString( "", ""); // Set (Default) value to null
        myRegistry->CreateKey( GUIDToString( CATID_SafeForScripting));
        myRegistry->CreateKey( GUIDToString( CATID_SafeForInitializing));
        myRegistry->CloseKey();
      }
    }
    catch(ERegistryException &E)
    {
      ShowMessage(E.Message);
    }
  }
  if( myRegistry)
    delete myRegistry;
  return ret_val;

Quote
}

You don't have to change DllUnregisterServer since it deletes the whole
CLSID tree by default.

-- Dave

Re:ActiveX deployment problem...


It would appear that you understand the problem I am having here and i
greatly appreciate your help but I am having a little trouble with the code
you provided...

when i try to compile it i get the error message
Undefined symbol 'CLSID_MyActiveX'

is there something else I need to include other than registry.hpp?

    Thanks Again
    - Geoff

Quote
Dave Borg wrote in message <7noni6$8...@forums.borland.com>...
>You need to tell Explorer that your control is SafeForScripting and
>SafeForInitializing. This is done by adding these declarations to the
>Registry. This should eliminate most of the ie5's complaining except for
>code signing.
[snip]

>#include <registry.hpp>
>STDAPI __export DllRegisterServer(void)
>{
>  HRESULT ret_val;
>  TRegistry *myRegistry = new TRegistry();

>  ret_val = _Module.RegisterServer(TRUE);

>  if( ret_val == S_OK)  // change ret_val if your code is critical
>  {
>    try
>    {
>      myRegistry->RootKey = HKEY_CLASSES_ROOT;
>      if( myRegistry->OpenKey(
>        "\\CLSID\\" + GUIDToString(CLSID_MyActiveX) +
>        "\\Implemented Categories", true )) // create and open
>      {
>        myRegistry->WriteString( "", ""); // Set (Default) value to null
>        myRegistry->CreateKey( GUIDToString( CATID_SafeForScripting));
>        myRegistry->CreateKey( GUIDToString( CATID_SafeForInitializing));
>        myRegistry->CloseKey();
>      }
>    }
>    catch(ERegistryException &E)
>    {
>      ShowMessage(E.Message);
>    }
>  }
>  if( myRegistry)
>    delete myRegistry;
>  return ret_val;
>}

Re:ActiveX deployment problem...


Well, you just use the CLSID of *your* ActiveX control.

Alex

Quote
Geoff Nicol wrote:

[snip]

Re:ActiveX deployment problem...


Ohhhh heh sorry :)

        Thanks for the help albeit a stupid question
        - Geoff Nicol

"Remember there are no stupid questions... just stupid people"

Quote
Alex Bakaev [TeamB] wrote in message <37A08F49.4318E...@jetsuite.com>...
>Well, you just use the CLSID of *your* ActiveX control.

>Alex

>Geoff Nicol wrote:
>[snip]

Re:ActiveX deployment problem...


Any idea on what i am supposed to pass in i tried
E701260F-44C3-11D3-919B-00C0F02216DA
{E701260F-44C3-11D3-919B-00C0F02216DA}
"E701260F-44C3-11D3-919B-00C0F02216DA"

But none of them work

API __export DllRegisterServer(void)
{
  HRESULT ret_val;
  TRegistry *myRegistry = new TRegistry();

  ret_val = _Module.RegisterServer(TRUE);

  if( ret_val == S_OK)  // change ret_val if your code is critical
  {
    try
    {
      myRegistry->RootKey = HKEY_CLASSES_ROOT;
      if( myRegistry->OpenKey(
        "\\CLSID\\" + GUIDToString(E701260F-44C3-11D3-919B-00C0F02216DA) +
        "\\Implemented Categories", true )) // create and open
      {
        myRegistry->WriteString( "", ""); // Set (Default) value to null
        myRegistry->CreateKey( GUIDToString( CATID_SafeForScripting));
        myRegistry->CreateKey( GUIDToString( CATID_SafeForInitializing));
        myRegistry->CloseKey();
      }
    }
    catch(ERegistryException &E)
    {
      ShowMessage(E.Message);
    }
  }
  if( myRegistry)
    delete myRegistry;
  return ret_val;

Quote
}

    Thanks for the help
        - Geoff Nicol

Re:ActiveX deployment problem...


Geoff, you don't pass a string in. There is a variable declared
somewhere in the _tlb.h file that looks like this:

extern const GUID CLSID_YourInterface;

It's close to the top of the _tlb.h file. Use this variable in the code
below.

HTH,
Alex

Quote
Geoff Nicol wrote:
>         "\\CLSID\\" + GUIDToString(E701260F-44C3-11D3-919B-00C0F02216DA) +

Re:ActiveX deployment problem...


Hi Geoff,

I am just wondering if you already solved your problem? Because I want
my web to be acccess in intranet. And my webs have ActiveX, but when my
friend goes to the site, it ask her to download the .cab file. After
downloading, this message shows:

Your current security settings prohibit running ActiveX controls on this
page. As a result, the page may not display correctly.

Do you know how to solve this problem yet?

Thank you in anticipation. Please email me at jeune_fi...@hotmail.com

Regards,
Jeune Fille

In article <7nnd7t$8...@forums.borland.com>,
  "Geoff Nicol" <ge...@westbay.com> wrote:

Quote
> I am having the same problem...

> I set my security settings to low in ie5 and the app now tries to
load it
> pops up a window saying
> "do you want to install and run bla.ini"
> followed by
> "do you want to install and run bla.cab"

> but when I click yes it instantly dies and just displays an x in the
area
> reserved for the app

> I have included all of the required files under web deploy options
> I am not signing the ActiveX form should this be a factor or should
the
> security setting of low take care of that?

>     - Thanks in advance
>         Geoff

> Panagiotis L. Staikos wrote in message <379D628C.384DA...@ekt.gr>...

> >I have an activex form already contructed and
> >when i call it from a browser(Internet Explorer 4 or 5)
> >it is not loaded... but the object has already installed to machine.
> >Security options is low...(permit any activex control)....
> >Is this problem produced by compiler and linker options?
> >or was another problem?

> >And another question.
> >Form the activex main form when users e.g presses a button was
created a
> >new fsNormal form.
> >My activex main form has various buttons.
> >On the click event of each button i create a fsNormal form to show
e.g.
> >the search form, the results form etc.
> >Is this way the right?

> >p.s. Sorry for my english....
> >Panagiotis Staikos from Greece...

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.

Other Threads