Solved

How can I do this in C++

Posted on 2002-03-21
4
171 Views
Last Modified: 2010-04-02
Hello,

I have this scrpt sample:

var objFpc = WScript.CreateObject ("FPC.Root");
var objFpcRemote = new ActiveXObject ("FPC.Root", "ISAServer2");
var objUrls = objFpc.Arrays.GetContainingArray ().VendorParametersSets.Item ("{D75A14B8-7EB9-419A-983E-09570B65CCC7}");
var objUrlsRemote = objFpcRemote.Arrays.GetContainingArray ().VendorParametersSets.Item
    ("{D75A14B8-7EB9-419A-983E-09570B65CCC7}");
objUrlsRemote.Value ("urlblock") = objUrls.Value ("urlblock");
objUrlsRemote.Value ("urlallow") = objUrls.Value ("urlallow");
objUrlsRemote.Save ();

can this be done using C++?

how?

0
Comment
Question by:feldspar
  • 2
4 Comments
 
LVL 6

Accepted Solution

by:
Triskelion earned 150 total points
ID: 6888458
More than likely.

One way is to use the associated OCX or DLL or EXE file that has the FPC stuff in it.

If you use ClassWizard and
   Add Class -> From A Type Library,
the browse to the ActiveX (ocx,dll,exe); once included, it will expose its objects and methods.
Here is a link to an example of this technique with Excel.
You'll get the point from this and then you can modify it to fit your situation.
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q179706

Also look at these other articles:
http://search.support.microsoft.com/search/default.aspx?Catalog=LCID%3D1033%26CDID%3DEN-US-KB%26PRODLISTSRC%3DON&Product=msall&Query=automate%2520excel%2520MFC&Queryc=automate+excel+MFC&REF=false&srchstep=0&KeywordType=ALL&Titles=false&numDays=&maxResults=25
0
 
LVL 37

Expert Comment

by:meverest
ID: 6892554
Thanks Triskelion,

but the problem here is that the function/s are on a remote computer, and the dll/s are not necessarily registered or even existing on the server running this 'script' - is that not important?

Cheers.

0
 
LVL 6

Expert Comment

by:Triskelion
ID: 6892605
Well, the functionality I mentioned is determined at compile time.  The DLLs don't have to be registered, just available.

For your case, I'm not sure.
0
 

Author Comment

by:feldspar
ID: 6895585
ok,

>> If you use ClassWizard and
>>   Add Class -> From A Type Library,
>> the browse to the ActiveX (ocx,dll,exe); once included, >> it will expose its objects and methods.

now *that* is something neat that i didn't know before, so points awarded for that at least!

most helpful, thanks!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SetCurrentDirectory path limit 7 144
Fast access to array, using indexes, smart iterative search 2 124
Socket Programming (Unix) 8 153
Copy output image from TWindowsMediaPlayer 6 54
Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
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 learn how to clear a vector as well as how to detect empty vectors in C++.

713 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