Solved

How to simulate GetObject to IIS in C++

Posted on 2002-05-12
3
464 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 200 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

626 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