problem with creating a remote automation with activex dll

i am learning dcom.
how to make a activex all to be accessed by a remote machine.when i tried to do so it gave error that class cannot created by the activex component.

but i succeded with activex exe.
what is the procedure to make a activex dll accessed remotly

Who is Participating?
VBGuruConnect With a Mentor Commented:
The following list may assist you in selecting the correct project type for your component.
1.      If your component is going to provide ActiveX controls, open a new ActiveX control project. Controls can only be provided by control components (.ocx files), which must be compiled from ActiveX control projects. Control components always run in process.
Note   Control components are limited in their ability to provide other kinds of objects because class modules in ActiveX control projects can only have two Instancing settings, PublicNotCreatable or Private. Objects in control components are best used to enhance the features of controls; put objects with other uses in a separate ActiveX DLL project.
2.      If your component is going to provide ActiveX documents, you can open either an ActiveX EXE project or an ActiveX DLL project. (The New Project dialog box provides templates for new projects that will provide ActiveX documents.)
See “Building ActiveX Documents” for a discussion of the reasons to choose an in-process or out-of-process component to provide active documents.
3.      If you’re creating an out-of-process component, open a new ActiveX EXE project. Reasons to create an out-of-process component include:
·      The component can run as a standalone desktop application, like Microsoft Excel or Microsoft Word, in addition to providing objects.
·      The component can process requests on an independent thread of execution, notifying the client of task completion using events or asynchronous call-backs. This frees the client to respond to the user.
·      If you’re using COM or Remote Automation to run components on remote computers (Enterprise Edition only), some components may need to be .exe files.
4.      If you’re creating an in-process component, open a new ActiveX DLL project. Reasons to create an in-process component include:
·      An in-process component shares its client’s address space, so property and method calls don’t have to be marshaled. This results in much faster performance.
·      An in-process component designed for unattended execution (that is, no user interaction) can be marked thread-safe. When used by a multithreaded client, it can provide objects on any of the client’s threads of execution, while retaining the performance benefits of in-process method and property calls.

Once you’ve opened a project for your new component, there are some project properties you should always set.

So, you use Activex EXE for DCOM. You can't use dll for DCOM. You use Activex Dll with MTS, so this meight made you to think of using Activex Dll for DCOM. It is not possible in VB.
VBGuru said it.

Only ActiveX .exes can be run via DCOM

PS - this is the correct answer. As such it is perfect. I can appreciate that you may not be happy about the answer, but that does not take away from the fact that the answer was absolutely correct.

(In other words, don't let me see you give VBGuru a "D")
caraf_g do both of you know each other?
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Hello VBGuru

I was just entering my comment as an answer when you beat me to it. But in all fairness, your answer was much better than mine. I just told cv. that an ActiveX .exe should be used, you provided a good bit of background and some explanation.

Because of that, before cv. grades your answer, I'm trying to explain to cv. that even though your answer may not be what cv. was hoping to hear, it was the correct answer and, what's more, a very good one. The quality of the answer has nothing to do with how desirable it is, and I hope cv. grades you a well-deserved "A".

I don't know cvinodhkanna, but I looked at cvinodhkanna's profile and what I saw worried me a bit. So far cvinodhkanna has only graded "D"s, and also there are two questions still waiting to be graded.

cvinodhkannaAuthor Commented:
please tell me the source from which i can get info on dcom

caraf_g, a good observation! and thanks for the good comment on my answer
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.