

6:49, EEST

March 21, 2012

Hello !
Is it possible to create a OPCServer in A Thread ?
At the moment I initialize the OPC Server in the Inalization of a Class
initialization
coInitializeSecurity(NIL, -1, NIL, NIL, RPC_C_AUTHN_LEVEL_NONE,
RPC_C_IMP_LEVEL_IDENTIFY, NIL, EOAC_NONE, NIL);
OPCProvider := TPSOPCProvider.Create;
with OPCProvider do
begin
Autorun := true;
CLSID := ‘{4F3F0F22-36A7-4EBD-A717-D930B440F139}’;
Servername := ‘DEMiC_OPC_SERVER_V100’;
Description := ‘DEMiC OPC Server V1.00’;
Vendor := ‘DEMiC Datentechnik GmbH’;
VendorInfo := ”;
AddressSpace.IncludeProps := true;
Version := 0;
ThreadingModel := tmboth; // Default = tmBoth
ActivityLog.Active := false;
ActivityLog.MaxLines := 500;
ActivityLog.FileName := ‘Activity.log’;
OnItemAccessRights := cls_opcserver.OPCProviderItemAccessRights;
Initialize;
end;
Now i want call the above initalization in a Thread
procedure OPCThread.Execute;
begin
coInitializeex(nil, COINIT_MULTITHREADED);
While not terminated do
begin
//Inital OPC Server
end;
CoUninitialize;
Br,
Rainer
end;
Most Users Ever Online: 1919
Currently Online:
56 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Heikki Tahvanainen: 402
hbrackel: 144
rocket science: 88
pramanj: 86
Francesco Zambon: 83
Ibrahim: 78
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
Member Stats:
Guest Posters: 0
Members: 793
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1538
Posts: 6493
Newest Members:
sophiadavis, Waynegalse, Phillipbus, Oscarsat, WilliamJer, WilliamTunse, mvsjonah79, RaymondSmutt, Merlin AI pap, patlawrence98Moderators: Jouni Aro: 1027, Pyry: 1, Petri: 0, Bjarne Boström: 1037, Jimmy Ni: 26, Matti Siponen: 353, Lusetti: 0
Administrators: admin: 1