Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to simulate GetObject to IIS in C++

Posted on 2002-05-12
3
Medium Priority
?
466 Views
Last Modified: 2008-01-09
Hi,
I need to translate this code to C++:

ADSIPath = "IIS:// & myServer & "/W3SVC/1/ROOT"
Set defaultSite = GetObject(ADSIPath)
Set vDir = defaultSite.Create("IISWebVirtualDir","test")
vDir.Path = "c:\testdir"
0
Comment
Question by:galor
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 49

Accepted Solution

by:
DanRollins earned 800 total points
ID: 7004329
One way would be to create a script and use ShellExecute, as in this example:

http://groups.google.com/groups?hl=en&selm=3908C4C9.69C51301%40yahoo.com

There is also some example .VBS and .JS code in your IIS SDK samples dir:

      C:\InetPub\iissamples\sdk\admin

I found some C++ examples in Google Groups, but I'm too tired to work through them.  I'll see if I can get to it tomorrow.  Here's one if you want to try it on your own:

http://groups.google.com/groups?selm=3909a21a.8069202%40newsgroups.borland.com&output=gplain

-- Dan

0
 

Expert Comment

by:arvi_sam
ID: 7004529
Try using the IMoniker interface and using its GetObject method. That should solve your problem. Follow the link below on a short introduction to IMoniker

www.devx.com/premier/mgznarch/ vcdj/1997/jul97/moniker3.asp

-Arvind Shyamsundar
Brainbench MVP for Internet Security.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7004667
hi galor,
Thanks for accepting.  Is that all of the help you need?  As I mentioned, my intention was to work through the samples and provide some clean functional code.  But if the question is answered, I'll move on to other things...

-- Dan
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question