I wrote a small console program, which is used to register/uninstall the OCX control and used in the installation and uninstallation program of Inno Setup.
# Include "stdafx. H "# include
I helped my colleagues write several lines of code and registered/uninstalled the OCX control in the installation/download program.
Message = "You cannot forcibly convert a COM Object of the type" msscriptcontrol. scriptcontrolclass "to the interface type" msscriptcontrol. iscriptcontrol ". The reason for this operation failure is that calling QueryInterface for the COM component of the interface whose IID is {0e59f1d3-1fbe-11d0-8ff2-00a0d10038bc} fails due to the following error: the library is not registered. (The exception is from hresult: 0x8002801d (type_e_libnotregistered )). "
Solution:
1. Run-regsvr32 msscript. o
Create a TXT file, copy the following content, change the TXT file to bat, and save the file. Copy the file to the folder where flash10a is located and run it. This file is similar to flash9f. You only need to change 10a in flash10a.ocxand flashutil10a.exe to 9f.
CLSCacls flash10a. ocx/P administrator: FCacls flashutil10a.exe/P administrator: FAttrib *. *-r-a-s-hCLSPauseDel flash10a. ocx/QDel flashutil10a.
Assume that the created ocx project is named AgentRest and the event to be added is OnPreviewCallRequest. 1. agentRest. add [id (1)] OnPreviewCallRequest (long lCtrlID, BSTR lpcils) to the idl file; [cpp] [uuid (UID), helpstring ("Event interface for AgentRest Control")] dispinterface _ dagentresteven ts {properties: // Event interface has no properties methods: [id (1)] OnPreviewCallRequest (long lCtrlID, BSTR lpcils);} 2. agentRestCtrl. h and AgentR
COM technology is also a standard way to package downloadable code (which is what ActiveX controls do). Even methods of interacting with the native OS can be specified using COM, for example, in Windows and Windows NT, where new APIs are used, most of which are defined as COM objects. It can be seen that COM, although originated from compound documents, but it is effective for many software problems, it is at the bottom of the basic technology. In a word, COM is a language-independent component
AxHost.Next you had to add the control to the form's Controls collection so it was visible and usable. You cannot call any interface methods until the control instance are created, that doesn ' t happen until you ' ve added the CO Ntrol and the form ' s Load event has fired.Next you has to use reflection or the dynamic keyword to obtain a reference to the interfaces implemented by the control, In the need to set properties or call methods. That's difficult to get right, and you'll want to write
It is said that delphi5 has always had this bug with Delphi7, and I don't know if it has been changed in a later version.
I use Delphi7.
I don't know much about delphi. ocx is also used to catch ducks. I cannot understand the cause of this bug, but I did solve the problem. I will explain the solution below (in fact, I also searched the website and sorted it out a little)
1. Go to the Delphi installation directory and find the source \ VCL
The client is not really useful, because such OCX to run, you must have digital signature, but also need to agree to install, or you will be prompted every time, what is not safe and so on.
Create an ActiveX control in VB and select the ActiveX Control Interface Wizard in the Add-in menu (if not, add one to the Add-in manager)
You can define the method you want here, the property, the event, and if you want to invoke the client Script, map to the mem
It is worth noting that this problem is encountered during the development of OCX controls.
The debug version of the program can be compiled to run normally, but the release version when the registration failed, prompted not to find the module, using Depends view,
Missing libraries such as Avcodec-54.dll, which are used in ffmpeg, are already in the program directory, and debug compiled programs can correctly
Identify these libraries and register t
This article describes how to install IE6 with Flash 9 running on Ubuntu. You can also install IE5.5/5.01 if needed. * Note: Flash 9 installed here will only be used by IE. * Install Cabextract and run sudoapt-getinstallwinecabextract on the Ubuntu
Actionscript 3.0 provides a new feature that uses ByteArray, Soundmixer.
The code is as follows:
function func (a:number) {
Return num * Math.sin (a);
}
function Drawfunction (func:function, Thickness:number, Color:number) {
Graphics.linestyle
1.download and install gs705w32.exe
You can also download and install ghostscript7.07, but pb9 does not support gs8.0 and later versions!
2. For powerbuilder9.0
Add in system environment variable path
The default installation path of gs705w3
The original Article is published in [http://community.csdn.net/expert/Topicview2.asp? Id = 3072485]
Question about ActiveX controls in the tape window: How do I get the Enter key?
Problem:
Create an MFC ActiveX project, add a dialog box
Add # pragma once in the next line of the xxxctrl. H (XXX is the project name) header file
// ------- Add ---------------// Cancel IE Security Prompt# Include "objsafe. H"// --------- Add ----------------------------
And declare part of the
You cannot define custom messages in ATL, as in MFC, because the concept of MSG map is not in standard ATL, and if you are doing ActiveX, you can give msg to Windows.
ATL provides begin_message_map a class of macros:
First, define the message ID:
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,
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.