1, click the Start menu, and then enter CMD in the search and right click the search results "to run as Administrator";
2, open the command prompt, enter the command regsvr32 xxx.ocx xxx.ocx representative path and file name, such as in D disk,
Call functions in Jscript in CPP
Calling Jscript functions in C ++ is very simple. Windows provides a msscript. ocx controls can be used to directly operate Jscript: execute a Jscript or call a specified function. I wrote a simple example:
L import msscript. ocx. The following command generates
Generally, you can use cocreateinstance to call the COM component. However, for the COM component that implements the idispatch interface, it is easier to call the COM component by using the coledispatchdriver package class of the VC ++ automatically generated interface. Example: execute script statements in VC ++, such as VBScript statements. The system provides a control: c: \ windows \ system32 \ msscript. ocx
How Program Execute the dynamically generated Delphi Code It is often found that people raise such questions, or the content of the questions is ultimately attributed to this problem.Some time ago, a senior wrote a "execute dynamically generated code", which is a real master. I don't have that skill, but I will only be opportunistic.Three methods are provided here, which are implemented by using third-party components.1. Microsoft Windows Script control (http://www.microsoft.com/downloads/detail
Software operation problem solving highlights
One of the software running problems: the prompt component 'comdlg32. ocx' or one of its accessories cannot be used correctly: a file is lost or invalid. Or: component 'comdlg32. ocx' or one of its Dependencies not correctly registered: a file is missing or invalid.Cause and solution: the ocx file-comdlg32.
Call the JS file in winform and output the result.
Since the project needs to call a powerful Js in winform, this tip is recorded here:
1. Download and install Microsoft
Http://www.microsoft.com/downloads/details.aspx? Displaylang = ZH-CN familyid = D05FCF37-4D9F-4769-9442-0BCEEF907033
2. Add reference in the project: msscript. ocx
3. TestCode: Msscriptcontrol. scriptcontrolclass SC = new msscriptcont
For a long time, the JS engine, msscript. ocx, InterOP. msscriptcontrol. dll, has been used to calculate string expressions.
However, during the deployment on Monday, we found that the 64-bit unsupported problem exists. Although it was solved after 32-bit is enabled, it was always a problem.
Yesterday, using the C # code compilation function, we finally solved the problem of C # string expression calculatio
password and user name to the QQ server.
Now, after reading the above QQ verification method, let's take a look at how to use code to log on to the QQ space and mailbox to get the friends and contacts we need.
QqSolution for automatically logging on to the workspace and mailbox to obtain contacts:
To log on to the QQ space and email address, we need to encrypt the user's entered password in JS, but we didn't use a browser when logging on using code. How can we drive JS? Don't worry, there are c
1. Use msscriptcontrol
Download Windows Script control from Microsoft website. It is an ActiveX (r) control, so I used InterOP in. net. After the download and installation are complete, create a new C # Windows Application
Program Project: select the reference node in Solution Explorer, right-click the Add reference menu, and the Add reference dialog box is displayed. Click Browse to find the directory for installing Windows Script control and select mssc
Method 1:
Use the Microsoft. Vsa Method
Code
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->String Expression = "var result: int = 0; result = 1? \ "Success \": \ "Failure \"";
Microsoft. JScript. Vsa. VsaEngine ve = Microsoft. JScript. Vsa. VsaEngine. CreateEngine ();
Console. WriteLine (Microsoft. JScript. Eval. JScriptEvaluate (Expression, ve ));
Method 2:
Use the eval method in Javascript.
Code
Code highlighting produced by Actipro Cod
The following two sections describe the implementation and application.
1. Use MSScriptControl to Download Windows Script Control from Microsoft website. It is an ActiveX (R) Control, so I used Interop in. NET. After the download and installation are complete, create a C # Windows application project, select the reference node in solution Resource Manager, right-click and choose add reference from the shortcut menu, and the Add reference dialog box is displayed, click Browse to find the director
attributes of word can be provided to users in the script function of the system; "mybox" is actually a Textbox Control added during design, but it is provided to the user in my text box. The interface is simple (simple? Opportunistic ?), Try not to divert everyone's attention to understand the implementation of script technology described in this article. The code and comments are as follows:
Version 5.00:
'Use an Automation server and an ActiveX control to support this example.
Object = "{0e5
. The second parameter is the method name. Note that many windows APIs distinguish ANSI and Unicode, just like the familiar getwindowtext (), there are Getwindowtexta () And Getwindowtextw () The second parameter corresponds to ANSI and Unicode, and the third parameter is the API parameter. Apiparams There are many methods that support various types of parameters, such as appendunsignedlong () The method supports DWORD and appendhandlepointer. () Supports various handles. Ap
reference, and locate the msscript. ocx file in the directory selected during installation. Then calculate the MD5 Algorithm in ASP.Code(Note: Response and request-specific ASP objects cannot be included) copied to a vbs file. Write code in vs.net using the streamreader class to read the vbs file into a string variable, then call the referenced object to control scripthost, assign the vbs code to this hos
[Background]
Anyone who has done ActiveX Control knows that if you want to use the ActiveX control function on your webpage, you must register it locally on the client, that is to say, the user must first put the ActiveX control (test. OCX) Put it under % System %/system32 on the local machine, and then run regsvr32 test in the DOS tool. OCX command for registration. However, if you do this, it means yo
[Background] Anyone who has done ActiveX Control knows that if you want to use the ActiveX control function on your webpage, you must register it locally on the client, that is to say, the user must first put the ActiveX control (test. OCX) Put it under % System %/system32 on the local machine, and then run regsvr32 test in the DOS tool. OCX command for registration. However, if you do this, it means you ar
converts a CER format certificate into an SPC-format certificate, the PKCS #7证书. Cabarc.exe the OCX into a cab. Signcode.exe signed the certificate to the OCX. Chktrust.exe Check if the OCX is correct after signing the certificate. Certmgr.exe is used for management certificates. The OCX control evs1300.
Serial number
Control Name
Part or reference
Use
2
ActiveMovie
Microsoft ActiveMovie Control
3
ADODB
Windows ADO Ext. 2.8 for DLLs and Security
4
ADODC
Microsoft ADO Data Control 6.0
5
Animation Control Create Animation button
Microsoft Windows common Controls-2 5.0
6
Animation, UpDown, MonthView, DTPicker, FlatScrollBar
Microsoft Windows
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.