473,657 Members | 2,693 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Extension to ScriptControl-OCX ?

Hi,

I am a C++ beginner and therefore I can solve the following problem
unfortunately not without your assistance. For a C++ professional it
is probably a minute to think about...

The ScriptControl OCX of Microsoft makes it possible to build your own
programs with VBS/JS scripting. That is simply to integrate and
documented. Only an important feature is missing: you cannot
terminate/abort a Script if you use the OCX control as VisualBasic
programmer.

In the "Microsoft Windows Script interface", there is an interesting
routine:

IActiveScript:: InterruptScript Thread
http://msdn.microsoft.com/library/de...riptThread.asp

The documentation: "Interrupts the execution of a running script
thread [...]. This method can be used to terminate a script that is
stuck (in an infinite loop, for example). [...]"

That sounds exactly as a solution to my Problem! A function to abort
the execution of a "ScriptControl. Run" call. But: the interface
"IActiveScr ipt" is not available in the VisualBasic world. It should
be possible to encapsulate the ScriptControl again by a new OCX
(written in C++) and to pass-through all existing VisualBasic routines
(e.g. "run") and add the routines of the interface "IActiveScript" .
Unfortunately I have no idea of OCX programming in C++... Can someone
help there?

http://www.codeguru.com/activex/Scri...]ScriptControl

This Link is a "tutorial" for ScriptControl programming. Therein I
already fail at the first sentence: "Create A dispatch classes from
the Script control type LIBRARY using ClassWizard." Where do I find
the type LIBRARY for the ScriptControl. I have only the OCX file, but
no TLB...

For assistance and/or tip I would be very thankful!

Regards,
Oliver
Jul 22 '05 #1
1 2859
On 24 Nov 2003 03:59:07 -0800, sc******@gmx.de (Oliver Schuetze) wrote
in comp.lang.c++:
Hi,

I am a C++ beginner and therefore I can solve the following problem
unfortunately not without your assistance. For a C++ professional it
is probably a minute to think about...

The ScriptControl OCX of Microsoft makes it possible to build your own
programs with VBS/JS scripting. That is simply to integrate and
documented. Only an important feature is missing: you cannot
terminate/abort a Script if you use the OCX control as VisualBasic
programmer.


Ask in a Windows programming group like
news:comp.os.ms-windows.win32.p rogrammer, or one of Microsoft's
support groups in the news:microsoft. public.* family. None of this is
defined by the C++ language, it is all Windows specific extensions.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.l earn.c-c++ ftp://snurse-l.org/pub/acllc-c++/faq
Jul 22 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
4615
by: Gyger | last post by:
Hello, Three weeks ago, I have started to develop a binding extension for Qt and PHP 5. Now, I can display a dialog box containing some widgets like label, buttons and edit line. I have just implemented some Qt classes (not completly) like QApplication, QObject, QWidget, Qlabel, QLineEdit and QGrid just to test some very simple application. The mecanisme of the SLOT and SIGNAL is working but only for the existing slot and signal.
0
1565
by: Sebastien de Menten | last post by:
I am trying to use ScriptControl under Excel (Windows XP) with the code: Global sc As New MSScriptControl.ScriptControl Public Function os_getcwd() sc.Language = "python" sc.ExecuteStatement ("import os") os_getcwd = sc.Eval("os.getcwd()") End Function
0
665
by: Alejandra Parra | last post by:
I have the next code: Dim Script As Object = CreateObject("MSScriptControl.ScriptControl") I've run this application in WinXP and it works normally, but if I run the application in Win98, the next error comes out: ActiveX component can't create object I've already instaled Windows Script Control in the computer but it didn't work
5
3383
by: Jeffry van de Vuurst | last post by:
Hi, I'm working on an xml schema and I'm running into some problems relating substitutionGroups and extensions. This xsd validates fine: There are three elements and three complex types and every element has the type of some complexType. <?xml version="1.0" encoding="UTF-8"?>
0
1025
by: Cunac | last post by:
Does anybody know how to reset variable context in one module without deleting global module context (global reset() func.), and how to remove module from ScriptControl->Modules list.
1
2163
by: Brian Henry | last post by:
Just thought maybe someone here would like to know this. It's an example code I just created quickly on how to figure out the name of a type of file based on its extension (say for example .DOC) would return "Microsoft Word Document"... tired doing this before with SHGetFileInfo or what ever its called, but that seemed to require a phyiscal file to be there, where this you can just give it a file extension with no file. Private Function...
1
2582
by: sjallard | last post by:
Hi, I'd like to do something like that (see explanations after the code snippet) : Sub mainSub (foo as String) Dim msScript As New ScriptControl msScript.Language = "VBScript" Dim someVar as String 'that'll be a parameter for the secondary sub someVar = "blah"
0
2136
by: robert | last post by:
Hi all, I'm having a hard time resolving a namespace issue in my wsdl. Here's an element that explains my question, with the full wsdl below: <definitions name="MaragatoService" targetNamespace="http://swaMaragatoNS" xmlns:tns="http://swaMaragatoNS" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
6
4210
by: tommybiegs | last post by:
I'm having a weird problem. I can't seem to force php to load an extension using php.ini, but it loads perfectly if I use dl() at the beginning of a test script. In php.ini I've got: extension_dir = "/correct/verified/path/to/extension/dir/" extension=imagick.so Apache will not restart if both those lines are present in php.ini
4
1624
by: Alfredo73 | last post by:
Hi, In the user input of a textbox I would like that the user can input a formula to make it easier for him. So instead of inputing 400 I would like the user to have the possibility to input as 8*50. Is there a command for vb2008 to calculate the answer of this formula inputed by a string ? Thanks in advance.
0
8403
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8833
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8737
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8509
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8610
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7345
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
2735
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1967
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1730
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.