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:
16 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: 726
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1529
Posts: 6471
Newest Members:
gabriellabachus, Deakin, KTP25Zof, Wojciech Kubala, efrennowell431, wilfredostuart, caitlynfajardo, jeromechubb7, franciscagrimwad, adult_galleryModerators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1032, Jimmy Ni: 26, Matti Siponen: 349, Lusetti: 0
Administrators: admin: 1