com+组件安装时出了问题!(50分)

  • 主题发起人 liuxintao
  • 开始时间
L

liuxintao

Unregistered / Unconfirmed
GUEST, unregistred user!
我在delphi6中File-->New-->ActiveX-->Com+ Event Object ,然后在Run-->Install Com+
objects 中进行安装com组件,然后系统提示:“由于已达到PIN项目尝试的最大次数,无法
访问卡。”的提示。这是为什么呢?
另外,我在Delphi5中也遇到过这种问题。
请教各位高手不吝赐教!!!感激不尽。
我的信箱: nj_jordan@263.net
 
难道没人研究过这个问题么?
 
这样安装不会出错的呀
Creating and Installing COM+ Events
Creating a COM+ Event
To Create and install a COM+ Event first create a new ActiveX Library.
Next create a COM+ Event object.
Add to the COM+ Event Object interface the methods along with parameters that will be passed to the subscriber.
Save the project and compile it.
NOTE:do
not implement the methods for the generated object.
Installing a COM+ Event
Create a new COM+ Application in Component Services. You get to Component Services by going to Start, Settings, Control Panel, Administrative Tools, Component Services.
To create the application, in the tree view on the left go to Computers, My Computer, COM+ Applications.

Right click on COM+ Applications choose New, Application. Click Next, and Create an empty application.

Give the application a name. I suggest using all the defaults.

Now that you have the COM+ application created add the event. Expand the application and select Components. Right click on Components and choose New, Component.

Click Next and Choose Install new event class(es). Browse for the DLL that contains your COM+ Event Object and click Next and Finish.

The COM+ Event Object will now be visible in the Component Services.

Creating and Installing COM+ Subscriptions
Creating a COM+ Subscription
To Create and install a COM+ Subscription first create a new ActiveX Library.
Next create a COM Object and browse for the interface created for the COM+ Event.
Implement the generated methods that this object will subscribe to.
Save the project and compile it.
Subscribing to a COM+ Event
Expand the application and select Components. Right click on Components and choose New, Component.
Click Next and Choose Install new component(s).

Browse for the DLL that contains your COM Subscription Object and click Next and Finish.

Click on Subscriptions under the COM Subscription Object and right click and choose New, Subscription.

All COM+ Events will be shown in the dialog, choose the methods or entire object you want to subscribe to and click Next.

Now choose the COM+ Event object you are going to subscribe to and click Next.

Enter a Subscription name, click Enable this subscription immediately, and click Next.

The COM+ Subscription will now be visible in the Component Services.


Creating COM+ Publishers
To trigger the COM+ Event, in your application Choose Project, Import Type Library.
Add the added file to your uses clause or includes.
Create an instance of the COM+ Event Object’s interface and assign the object created by the constructor of the Co class to it, and to trigger the event call the method. COM+ will look up the subscriptions for you. So for example:
procedure TMainForm.Timer1Timer(Sender: TObject);
var
Event: IClockEvent;
Hour, Minute, Second: Integer;
begin
Event := CoClockEvent.Create;
Hour := StrToInt(FormatDateTime('h', Now()));
Minute := StrToInt(FormatDateTime('n', Now()));
Second := StrToInt(FormatDateTime('s', Now()));
TimeLabel.Caption := IntToStr(Hour) + ':' +
IntToStr(Minute) + ':' +
IntToStr(Second);
Event.HourChange(Hour);
Event.MinuteChange(Minute);
Event.SecondChange(Second);
end;
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
D
回复
0
查看
902
DelphiTeacher的专栏
D
I
回复
0
查看
569
import
I
顶部