?? unitfile.~pas
字號(hào):
unit Unitfile;
{$WARN SYMBOL_PLATFORM OFF}
interface
uses
Windows, ActiveX, Classes, ComObj, TypeComServer_TLB, StdVcl;
type
TTypeDllServer = class(TTypedComObject, ITypeDllServer)
public
Name: WideString;
protected
function GetName: WideString; stdcall;
function GetSalary(Bonus, BaseSalary: Single): Single; stdcall;
procedure SetName(const NewName: WideString); stdcall;
end;
implementation
uses ComServ;
function TTypeDllServer.GetName: WideString;
begin
Result := Name;
end;
function TTypeDllServer.GetSalary(Bonus, BaseSalary: Single): Single;
begin
Result := BaseSalary + Bonus;
end;
procedure TTypeDllServer.SetName(const NewName: WideString);
begin
Name := NewName;
end;
initialization
TTypedComObjectFactory.Create(ComServer, TTypeDllServer, Class_TypeDllServer,
ciMultiInstance, tmApartment);
end.
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -