Re: vb6 nt service dot net interop error 429



Well, you could have the service layer written in .NET and then just
use COM Interop to create your VB6/COM object that contains all of your
business logic. No need to rewrite any of that.

But in any case, if this works on your dev amchine it tells me you
didn't register your assembly on the production machine. That would
yeild the error you described.

Tom

stevenb wrote:
I have a program called server.exe which is linked to a service. The
service runs server.exe. Server.exe references a vb.net dll via com
interop.

If the service is stopped and I just double click on server.exe, I
check my log files and see that it is able to dim and set the vb.net
class referenced in the dll. Basically, it can create the object.

If I start the service, my log files show that the program cannot set
the vb.net object and I get error 429... activex component cannot
create object.

I hope that makes sense...

I don't think threading is an issue because I am not trying to start
the service and manually run the program at the same time. Permissions
may be an issue and I am looking in to that, although I haven't had any
luck yet. .NET service support would be great, except that this is a
legacy app and would require a complete rewrite, which would take a
very long time.

Some additional information... I was able to get everything working on
my development PC, which further leads me towards security as the
culprit. I am continuing to test but if anyone can provide additional
assitance I would greatly appreciate it!

Steven


TDC wrote:
Are you running them both on the same machine?

If you are, then there are two possible reasons. Threading (and this
covers a broad set of territory) and permissions.

Unfortunately, I don't have any experience with Ntsvc.ocx. If you are
moving to .NET, why don't you use the .NET Service support instead of
an ocx?

Tom


stevenb wrote:
Greetings...

I currently have a vb6 application running as an NT service. I am
referencing a dot net dll and all works fine if I run the vb6
application as a normal executable. As soon as I try to run it as a
service, I get runtime error 429 activex component cannot create
object.

The method I am using to run the vb6 app as a service is through
Ntsvc.ocx.

my code is similar to:

dim myobj as someDotNetInterop.InteropClass
set myobj = new someDotNetInterop.InteropClass

The error is thrown when I try to set.

Basically, I cannot figure out why I cannot instantiate the object when
I am running the app as as service, but It works fine when I run it as
a normal application.

Any insight is greatly appreciated!

.



Relevant Pages

  • Re: VB6 executable accessing a .Net DLL with ComClass
    ... Your VB6 app is going to want to use the registry by default, ... regsvr32 in that it records the exact location of the dll. ... The VB6 dev environment wants a type-library, ...
    (microsoft.public.dotnet.framework.interop)
  • Re: C# DLL is throwing Automation Errors on some machines when cal
    ... This applies for the COM+ and COM Interop examples. ... example DLL and called it from the Excel VBA application as I had ... new VB6 application. ... come COM Interop from VBA works on a the majority of machines (such as ...
    (microsoft.public.dotnet.framework.interop)
  • Re: C# DLL is throwing Automation Errors on some machines when called from VB6
    ... This applies for the COM+ and COM Interop examples. ... example DLL and called it from the Excel VBA application as I had ... new VB6 application. ... come COM Interop from VBA works on a the majority of machines (such as ...
    (microsoft.public.dotnet.framework.interop)
  • Re: Is .NET slower than - say - VB6?
    ... Each line is from pixel X to pixel X+1. ... My VB6 version of my app interacts HEAVILY with Active Directory. ... DLL is needed to get the job done? ...
    (microsoft.public.dotnet.languages.vb)
  • Re: VB6 executable accessing a .Net DLL with ComClass
    ... But a .Net COM registration without a explicit location in the registry is ... expected in The assmbly path of the calling app, ... vb6 program. ... The VB6 application and the .Net DLL will reside on the network for ...
    (microsoft.public.dotnet.framework.interop)

Loading