Solved

How to simulate GetObject to IIS in C++

Posted on 2002-05-12
3
455 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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
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 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.

943 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now