BCBDELPHI ACTIVEFORM releases full Raiders

zhaozj2021-02-08  243

BCB / DELPHI ACTIVEFORM releases full Raiders

Many friends on the forum (also included me) mentioned the release of ActiveForm, and did not get a good solution. Here is a little experience in developing Activeform, and sharing with you, the development environment is Win2000 Server, IIS5.0, BCB5.0, Delphi is also almost.

Let's talk about the development of the program. If you are transplanted from the general application, pay attention to all forms (except for the main form), you have to create, the project's option is not Auto-Create Forms option for you. Also, it is very important to implement the IObjectsafety interface. It is actually very simple, plus two sentences (for BCB, taken from Borland News Group borland.public.cppbuilder.activex, Delphi, sorry, don't know):

. You have to implement the IObjectSafety interface.I cut this code from a MSDN example and it worked great for me without anychanges This code basically makes everything your control does safe forscripting and initialization.You can make the following changes in your class declaration:

Class ATL_NO_VTABLE TYOURCONTROL: .., Public IOBJECTSAFETYIMPL // <- add this.

Begin_COM_MAP (TYOURCONTROL). Com_interface_entry (IOBJECTSAFETY) / / <--- add this..nd_com_map ()

If you don't say compilation and commissioning, please check your forum. Or let it be, it is best to compile all the bags into the AVTIVEFORM, the method is the same, not to say.

Ok, it's official! Start setting, myopia is trying to wear glasses, the mouse is not so good to change, keyboard. . . . . . Hey, it's good, start, start. . . . . . Project-> Web Deployment Options Opens the Settings tab. The first page, set the path, here is filled in the actual situation, pay attention to not filling out. Below is my filling (my IIS root directory is C: / IITPUB / WWWROOT /, machine IP is 192.168.0.88): Target Dir: C: / INETPUB / WWWROOT / TARGET URL: http://192.168.0.88/ HTML DIR: C: C: / INETPUB / WWWROOT /

Then there are some options, usually all selected. Page II, package settings, if you compile all the bags into ActiveForm, this is not set, it is best, if you want to set, refer to the setup of the third page. Third page, additional files, generally some DLLs for Activeform calls, many friends can't install, big reasons are not set here. Sometimes C Builder will automatically add the required DLL to this, sometimes, no, I really don't understand. . . . . . No way, still get it. If you don't know what special DLL is used by your program, you can use some Show Dependency tools. I am using the client data set, I need Midas.dll, so I put it with it. It is best to select compression in the same compression package in the CAB option, otherwise it will also set the path below. The settings of the path are the same as the first page. Ok, I'm big! Project-> Web Deploy, generate three files, an INF installation file, an HTML file, there is a compressed package file in a CAB format (there may be multiple, see how you set it). You don't have to make any modifications, open the HTML file, you can see ActiveFrom. On the other machine, the IE browser security level is set to the lowest, enter the HTML address, I am http://192.168.0.88/printformControl.htm, first prompt to install the xxx.inf file, then prompt to install xxx.cab Document, you can see ActiveForm. what? I can't see it? Then I have to look back to see what I have not done. . . . . It's so much, anyway, I am released like this. . . . . . I don't know if you have released your ActiveForm. not yet? Really? Have you tried 100 times? What? The item is 1000? Ha ha ha ha ha ha ha. . . . . Actually. . . In fact, there is more convenient and more convenient and more simple and more standard! what! ! ! ! Ouch. . . Hurt. . . . do not. . do not. . I don't acquire my glasses and break the mouse here! Don't smash it again! ! ! I said. . . I said. . . Download a software that makes a CAB compressed package, I use PowerArchiver, find Microsoft's code signature software signcode.exe, get a code signing certificate, www.ca365.com can apply for a free certificate, or you can do it yourself CA gives yourself a certificate. Ok, just three things. Then modify or re-make a .inf file, the content is approximately as follows: [add.code] printcontrol.ocx = printControl.ocxmidas.dll = midas.dll

[PrintControl.ocx] file = thiscabclsid = {AECDCD52-732D-43AA-BB90-F8B784E1A169} RegisterServer = YESFILEVERSION = 1, 0, 43, 0

[midas.dll] file = thiscabfileversion = 6, 0, 6, 163

Then then put * .ocx, *. DLL, there is also that .inf file made a CAB compression package. This compression package is signed by SignCode.exe and certificate. Then modify the HTML file, the content is as follows:

C Builder 5 ActiveX Test Page

You Should See your C Builder 5 Forms or Controls Embedded in the form below.


Ok, now you can set the IE security level, ActiveForm is still downloaded. What, will not use the few software? I can't help you, I will help it, huh, huh.

By Rocknet2002.4.30 23:30:00

转载请注明原文地址:https://www.9cbs.com/read-1993.html

New Post(0)
CopyRight © 2020 All Rights Reserved
Processed: 0.046, SQL: 9