Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Creating an object from COM+ using CreateObject

Creating an object from COM+ using CreateObject

Creating an object from COM+ using CreateObject

In my VB app, when I create an object from COM+, I use the CreateObject function. In the books that I've read for examples, all from Wrox, they don't use the servername parameter of the CreateObject when they create their objects. However, my application won't work unless I use this parameter.

Set objMyObject = CreateObject("svrPersist.MyObject", PERSIST_SERVER)

Is this something I should worry about? Am I doing something wrong?

Clay Haller

RE: Creating an object from COM+ using CreateObject

Dear Clay Haller
well the second parameter of CreateObject is optional,i mean server name is optional,u need to tell the second parameter as The name of the network server where the object will be created. If servername is an empty string (""), the local machine is used.
so it depends upon where u want to instatiate the components
now as far as COM+ is concerned you are doing some thing which is required to do
As u said
"However, my application won't work unless I use this parameter. "
as you are now clear that the second parameter is optional so your application should run so now the problem is what do to remedy the error,i can tell you startight away the possible cause of the problem but let me first ask some question why can give me more sight of the problem
first tell me are your development machine hosting the MTS services means are u using Win2k Prof and installed the COM+ componnets in the Component Services? if no then you have to installed COM+ components in the component service from where u can tell whether to use the current machine for it or remote server for it..
okay let me know  i will be here for ur response

RE: Creating an object from COM+ using CreateObject

Hi Nouman,

My development machine is running Win2k Prof. I've installed my COM+ components onto a Win2k Server. According to the books I've read for MTS 2.0, you export the package which creates a clients folder. This clients folder has a setup.exe that you can run on the client machine so that it can access the components on the server.

With COM+, how do you tell the client machine(s) where to find the components? It doesn't create that clients folder with the setup utility.


RE: Creating an object from COM+ using CreateObject


I think I figured it out. I exported the components from the Component Services as an Application Proxy instead of a server application. After installing the MSI file on my client, I didn't have to use the second parameter in the CreateObject function.


RE: Creating an object from COM+ using CreateObject

i use win2k Server to deploy my com components, how could i access these components from my win98 clients


RE: Creating an object from COM+ using CreateObject

Shoj, if you put compontents into MTS the easiest way to access them is export the package that you put them in and run the client setup on the 98 machine.  This will create a directory under
C:\Program Files\ComPlus Applications
with the GUID of your library.
The DLL, which will only be used for the public interface and networking code (called the Proxy) will go in there.  The registry will be set up to launch that DLL and connect to what ever server you exported from (I won't go into packages exported for other servers).

Hope this helps

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close