⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 iopcdllloader.pas

📁 iocopm3.04源码,一套很好的工控开发工具
💻 PAS
📖 第 1 页 / 共 3 页
字号:
function OPCDLLEditorItemGetBranchItems(SessionHandle: Integer; iBrowseType: TiBrowseType): PChar;
begin
  Result := '';
  if not OPCDLLLoaded                                 then Exit;
  if not Assigned(@RawOPCDLLEditorItemGetBranchItems) then Exit;
  Result := RawOPCDLLEditorItemGetBranchItems(SessionHandle, iBrowseType);
end;
//******************************************************************************
function OPCDLLEditorItemGetQualifiedName(SessionHandle: Integer; Path, ItemName: PChar): PChar;
begin
  Result := '';
  if not OPCDLLLoaded                                   then Exit;
  if not Assigned(@RawOPCDLLEditorItemGetQualifiedName) then Exit;
  Result := RawOPCDLLEditorItemGetQualifiedName(SessionHandle, Path, ItemName);
end;
//******************************************************************************
function OPCDLLGroupAdd(Name: PChar; ComputerName: PChar; OPCServerName: PChar; UpdateRate: Integer; BeforeUpdate, AfterUpdate: TOPCDLLObjectUpdate): Integer;
begin
  DoDLLCheck;
  if not Assigned(@RawOPCDLLGroupAdd) then RaiseFunctionNotFoundException('GroupAdd');
  Result := RawOPCDLLGroupAdd(Name, ComputerName, OPCServerName, UpdateRate, BeforeUpdate, AfterUpdate);
end;
//******************************************************************************
procedure OPCDLLGroupDelete(GroupHandle: Integer);
begin
  DoDLLCheck;
  if not Assigned(@RawOPCDLLGroupDelete) then RaiseFunctionNotFoundException('GroupDelete');
  RawOPCDLLGroupDelete(GroupHandle);
end;
//******************************************************************************
procedure OPCDLLGroupResume(GroupHandle: Integer);
begin
  DoDLLCheck;
  if not Assigned(@RawOPCDLLGroupResume) then RaiseFunctionNotFoundException('GroupResume');
  RawOPCDLLGroupResume(GroupHandle);
end;
//******************************************************************************
procedure OPCDLLGroupSuspend(GroupHandle: Integer);
begin
  DoDLLCheck;
  if not Assigned(@RawOPCDLLGroupSuspend) then RaiseFunctionNotFoundException('GroupSuspend');
  RawOPCDLLGroupSuspend(GroupHandle);
end;
//******************************************************************************
function OPCDLLGroupGetHandleByName(Name: PChar): Integer;
begin
  DoDLLCheck;
  if not Assigned(@RawOPCDLLGroupGetHandleByName) then RaiseFunctionNotFoundException('GroupGetHandleByName');
  Result := RawOPCDLLGroupGetHandleByName(Name);
end;
//******************************************************************************
function OPCDLLGroupGetCount: Integer;
begin
  DoDLLCheck;
  if not Assigned(@RawOPCDLLGroupGetCount) then RaiseFunctionNotFoundException('GroupGetCount');
  Result := RawOPCDLLGroupGetCount;
end;
//******************************************************************************
function OPCDLLGroupGetHandle(Index: Integer): Integer;
begin
  DoDLLCheck;
  if not Assigned(@RawOPCDLLGroupGetHandle) then RaiseFunctionNotFoundException('GroupGetHandle');
  Result := RawOPCDLLGroupGetHandle(Index);
end;
//******************************************************************************
function OPCDLLGroupGetName(GroupHandle: Integer): PChar;
begin
  DoDLLCheck;
  if not Assigned(@RawOPCDLLGroupGetName) then RaiseFunctionNotFoundException('GroupGetName');
  Result := RawOPCDLLGroupGetName(GroupHandle);
end;
//******************************************************************************
function OPCDLLGroupGetComputerName(GroupHandle: Integer): PChar;
begin
  DoDLLCheck;
  if not Assigned(@RawOPCDLLGroupGetComputerName) then RaiseFunctionNotFoundException('GroupGetComputerName');
  Result := RawOPCDLLGroupGetComputerName(GroupHandle);
end;
//******************************************************************************
function OPCDLLGroupGetOPCServerName(GroupHandle: Integer): PChar;
begin
  DoDLLCheck;
  if not Assigned(@RawOPCDLLGroupGetOPCServerName) then RaiseFunctionNotFoundException('GroupGetOPCServerName');
  Result := RawOPCDLLGroupGetOPCServerName(GroupHandle);
end;
//******************************************************************************
function OPCDLLGroupGetUpdateRate(GroupHandle: Integer): Integer;
begin
  DoDLLCheck;
  if not Assigned(@RawOPCDLLGroupGetUpdateRate) then RaiseFunctionNotFoundException('GroupGetUpdateRate');
  Result := RawOPCDLLGroupGetUpdateRate(GroupHandle);
end;
//******************************************************************************
procedure OPCDLLGroupSetUpdateRate(GroupHandle: Integer; Value: Integer);
begin
  DoDLLCheck;
  if not Assigned(@RawOPCDLLGroupSetUpdateRate) then RaiseFunctionNotFoundException('GroupSetUpdateRate');
  RawOPCDLLGroupSetUpdateRate(GroupHandle, vALUE);
end;
//******************************************************************************
function OPCDLLServerConnectionGetCount: Integer;
begin
  DoDLLCheck;
  if not Assigned(@RawOPCDLLServerConnectionGetCount) then RaiseFunctionNotFoundException('ServerConnectionGetCount');
  Result := RawOPCDLLServerConnectionGetCount;
end;
//******************************************************************************
function OPCDLLServerConnectionGetName(Index: Integer): PChar;
begin
  DoDLLCheck;
  if not Assigned(@RawOPCDLLServerConnectionGetName) then RaiseFunctionNotFoundException('ServerConnectionGetName');
  Result := RawOPCDLLServerConnectionGetName(Index);
end;
//******************************************************************************
function OPCDLLServerConnectionGetGroupCount: Integer;
begin
  DoDLLCheck;
  if not Assigned(@RawOPCDLLServerConnectionGetGroupCount) then RaiseFunctionNotFoundException('ServerConnectionGetGroupCount');
  Result := RawOPCDLLServerConnectionGetGroupCount;
end;
//******************************************************************************
function OPCDLLServerConnectionGetGroupName(Index: Integer): PChar;
begin
  DoDLLCheck;
  if not Assigned(@RawOPCDLLServerConnectionGetGroupName) then RaiseFunctionNotFoundException('ServerConnectionGetGroupName');
  Result := RawOPCDLLServerConnectionGetGroupName(Index);
end;
//******************************************************************************
procedure OPCDLLServerConnectionReconnect(Name: PChar);
begin
  DoDLLCheck;
  if not Assigned(@RawOPCDLLServerConnectionReconnect) then RaiseFunctionNotFoundException('ServerConnectionReconnect');
  RawOPCDLLServerConnectionReconnect(Name);
end;
//******************************************************************************
procedure OPCDLLServerConnectionDisconnect(Name: PChar);
begin
  DoDLLCheck;
  if not Assigned(@RawOPCDLLServerConnectionDisconnect) then RaiseFunctionNotFoundException('ServerConnectionDisconnect');
  RawOPCDLLServerConnectionDisconnect(Name);
end;
//******************************************************************************
function OPCDLLManagerCreated: Boolean;
begin
  Result := False;
  if not OPCDLLLoaded                       then Exit;
  if not Assigned(@RawOPCDLLManagerCreated) then Exit;
  Result := RawOPCDLLManagerCreated;
end;
//******************************************************************************
procedure OPCDLLManagerAddItem(GroupName: PChar; UpdateRate: Integer);
begin
  if not OPCDLLLoaded                       then Exit;
  if not Assigned(@RawOPCDLLManagerAddItem) then Exit;
  RawOPCDLLManagerAddItem(GroupName, UpdateRate);
end;
//******************************************************************************
procedure OPCDLLManagerDestroyed;
begin
  if not OPCDLLLoaded                         then Exit;
  if not Assigned(@RawOPCDLLManagerDestroyed) then Exit;
  RawOPCDLLManagerDestroyed;
end;
//******************************************************************************
function OPCDLLIsEvaluation: Boolean;
begin
  Result := False;
  if not OPCDLLLoaded                     then Exit;
  if not Assigned(@RawOPCDLLIsEvaluation) then Exit;
  Result := RawOPCDLLIsEvaluation;
end;
//******************************************************************************
function  OPCDLLNotLoaded: Boolean;
begin
  Result := not OPCDLLLoaded;
end;
//******************************************************************************
initialization
  OPCManagerDLLHandle := LoadLibrary(OPCMANAGERDLLSTRINGRESOURCE);
  if OPCManagerDLLHandle <> 0 then
    begin
      OPCDLLLoaded := True;
      MapFunctionPointers;
    end
  else
    begin
      OPCDLLLoaded := False;
    end;
//******************************************************************************
finalization
  if OPCManagerDLLHandle <> 0 then FreeLibrary(OPCManagerDLLHandle);
//******************************************************************************
end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -