Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to simulate GetObject to IIS in C++

Posted on 2002-05-12
3
Medium Priority
?
469 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 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
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 viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
Suggested Courses

824 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