By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,333 Members | 1,022 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,333 IT Pros & Developers. It's quick & easy.

Registering ActiveX DLLs and OCXs

P: n/a

I have a VB.NET application which installs/updates other applications.
Some of these other applications are VB6.
Part of the processing includes registering the OCXs and DLLs and I use
the DLLSelfRegister function from the vb6stkit.dll

As a VB.NET desktop utility this worked well. However,I have made the
application into a service (customer's requirement) running in an
administrators account.
Now DLLSelfRegister fails to register the component, returning a value
of FAIL_OLE = 3 which means "unable to initialize OLE to register file"

I can shell to RegSvr32.exe from my service and that works well also,
but doesnt return a success or failure value.

Is there anyway to register an activex dll or ocx file from vb.net that
will work from in a service, or is there anything I can do to my service
to make vb6stkit.dll work?

thankyou

--
Chris Petchey
Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Fri, 23 Sep 2005 10:19:08 +0100, Chris Petchey <ch****@soltec.demon.co.uk> wrote:


I have a VB.NET application which installs/updates other applications.
Some of these other applications are VB6.
Part of the processing includes registering the OCXs and DLLs and I use
the DLLSelfRegister function from the vb6stkit.dll

As a VB.NET desktop utility this worked well. However,I have made the
application into a service (customer's requirement) running in an
administrators account.
Now DLLSelfRegister fails to register the component, returning a value
of FAIL_OLE = 3 which means "unable to initialize OLE to register file"

I can shell to RegSvr32.exe from my service and that works well also,
but doesnt return a success or failure value.

Is there anyway to register an activex dll or ocx file from vb.net that
will work from in a service, or is there anything I can do to my service
to make vb6stkit.dll work?

Your service is probably running under a least privileged account which wouldn't have sufficient
permissions to access the registry. You will probably need to run your service under a local machine
account that has sufficient registry permissions.
Paul
~~~~
Microsoft MVP (Visual Basic)
Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.