这个是在MSDN上找到的,给控件加上license To add support for licensing with ControlWizard when you create your control project On the File menu, click New. In the New dialog box, click the Projects tab. Click MFC ActiveX ControlWizard. In the Project Name box, enter a project name. In the Location box, specify the project’s directory. Select either Create New Workspace or Add to Current Workspace (if you select this option, also specify the project of which this subproject will be a dependent). In the Platforms box, select a platform. A directory for the new project is added to the currently specified workspace directory structure. ControlWizard uses the name that you specify in the Project Name box to derive default names for most of the files and classes it creates for the control project.Click OK to continue the wizard. On the first ControlWizard page, Step 1, specify any options you want. To specify licensing support, select the Yes, please option under the question Would you like the controls in this project to have a runtime license? On the remaining ControlWizard pages, select any other options for your project. Click Finish to confirm your project choices. The New Project Information dialog box appears.Click OK to have ControlWizard generate the ActiveX control framework.三个函数 VerifyUserLicense Verifies that the control allows design-time usage by checking the system for the presence of the control license file. This function is called by the framework as part of processing IClassFactory2::GetLicInfo and IClassFactory::CreateInstanceLic.GetLicenseKey Requests a unique key from the control DLL. This key is embedded in the container application and used later, in conjunction with VerifyLicenseKey, to create an instance of the control. This function is called by the framework as part of processing IClassFactory2::RequestLicKey.VerifyLicenseKey Verifies that the embedded key and the control’s unique key are the same. This allows the container to create an instance of the control for its use. This function is called by the framework as part of processing IClassFactory2::CreateInstanceLic and can be overridden to provide customized verification of the license key. The default implementation performs a string comparison. For more information, see Customizing the Licensing of an ActiveX Control, later in this article.
在编译设置里,你也可以输出为dll,这有什么关系?
ASP里面用ADO的示例到处都是
ATL开发一般是开发简单Com组件,你要拿他来开发Active控件那可能就要自己加那些Active所需要的接口了。
好像都是用MFC来开发Active组件。
To add support for licensing with ControlWizard when you create your control project On the File menu, click New.
In the New dialog box, click the Projects tab.
Click MFC ActiveX ControlWizard.
In the Project Name box, enter a project name. In the Location box, specify the project’s directory. Select either Create New Workspace or Add to Current Workspace (if you select this option, also specify the project of which this subproject will be a dependent). In the Platforms box, select a platform.
A directory for the new project is added to the currently specified workspace directory structure. ControlWizard uses the name that you specify in the Project Name box to derive default names for most of the files and classes it creates for the control project.Click OK to continue the wizard.
On the first ControlWizard page, Step 1, specify any options you want. To specify licensing support, select the Yes, please option under the question Would you like the controls in this project to have a runtime license?
On the remaining ControlWizard pages, select any other options for your project.
Click Finish to confirm your project choices.
The New Project Information dialog box appears.Click OK to have ControlWizard generate the ActiveX control framework.三个函数
VerifyUserLicense
Verifies that the control allows design-time usage by checking the system for the presence of the control license file. This function is called by the framework as part of processing IClassFactory2::GetLicInfo and IClassFactory::CreateInstanceLic.GetLicenseKey
Requests a unique key from the control DLL. This key is embedded in the container application and used later, in conjunction with VerifyLicenseKey, to create an instance of the control. This function is called by the framework as part of processing IClassFactory2::RequestLicKey.VerifyLicenseKey
Verifies that the embedded key and the control’s unique key are the same. This allows the container to create an instance of the control for its use. This function is called by the framework as part of processing IClassFactory2::CreateInstanceLic and can be overridden to provide customized verification of the license key. The default implementation performs a string comparison. For more information, see Customizing the Licensing of an ActiveX Control, later in this article.