📄 security_tlb.pas
字号:
unit security_TLB;
// ************************************************************************ //
// WARNING //
// ------- //
// The types declared in this file were generated from data read from a //
// Type Library. If this type library is explicitly or indirectly (via //
// another type library referring to this type library) re-imported, or the //
// 'Refresh' command of the Type Library Editor activated while editing the //
// Type Library, the contents of this file will be regenerated and all //
// manual modifications will be lost. //
// ************************************************************************ //
// PASTLWTR : $Revision: 1.11.1.75 $
// File generated on 06/03/1999 10:04:48 PM from Type Library described below.
// ************************************************************************ //
// Type Lib: C:\DelphiTemp\Core Software\ICON 99 Conference Paper\Security\Security.tlb
// IID\LCID: {DD4FDB53-186E-11D3-902D-0040052294EA}\0
// Helpfile:
// HelpString: Project1 Library
// Version: 1.0
// ************************************************************************ //
interface
uses Windows, ActiveX, Classes, Graphics, OleCtrls, StdVCL;
// *********************************************************************//
// GUIDS declared in the TypeLibrary. Following prefixes are used: //
// Type Libraries : LIBID_xxxx //
// CoClasses : CLASS_xxxx //
// DISPInterfaces : DIID_xxxx //
// Non-DISP interfaces: IID_xxxx //
// *********************************************************************//
const
LIBID_security: TGUID = '{DD4FDB53-186E-11D3-902D-0040052294EA}';
IID_ISQLDMO_Security: TGUID = '{DD4FDB54-186E-11D3-902D-0040052294EA}';
CLASS_SQLDMO_Security: TGUID = '{DD4FDB56-186E-11D3-902D-0040052294EA}';
type
// *********************************************************************//
// Forward declaration of interfaces defined in Type Library //
// *********************************************************************//
ISQLDMO_Security = interface;
ISQLDMO_SecurityDisp = dispinterface;
// *********************************************************************//
// Declaration of CoClasses defined in Type Library //
// (NOTE: Here we map each CoClass to its Default Interface) //
// *********************************************************************//
SQLDMO_Security = ISQLDMO_Security;
// *********************************************************************//
// Interface: ISQLDMO_Security
// Flags: (4416) Dual OleAutomation Dispatchable
// GUID: {DD4FDB54-186E-11D3-902D-0040052294EA}
// *********************************************************************//
ISQLDMO_Security = interface(IDispatch)
['{DD4FDB54-186E-11D3-902D-0040052294EA}']
function GetRoles(const sDBName: WideString): OleVariant; safecall;
function GetUsers(const sDBName: WideString): OleVariant; safecall;
function IsUserInRole(const Login: WideString; const Role: WideString; const sDBName: WideString): WordBool; safecall;
function GetUserRoles(const Login: WideString; const sDBName: WideString): IStrings; safecall;
procedure AddUserToRole(const Login: WideString; const Role: WideString;
const sDBName: WideString); safecall;
procedure RemoveUserFromRole(const Login: WideString; const Role: WideString;
const sDBName: WideString); safecall;
function Login(const sServer: WideString; const sDatabase: WideString;
const sLogin: WideString; const sPWD: WideString): WordBool; safecall;
end;
// *********************************************************************//
// DispIntf: ISQLDMO_SecurityDisp
// Flags: (4416) Dual OleAutomation Dispatchable
// GUID: {DD4FDB54-186E-11D3-902D-0040052294EA}
// *********************************************************************//
ISQLDMO_SecurityDisp = dispinterface
['{DD4FDB54-186E-11D3-902D-0040052294EA}']
function GetRoles(const sDBName: WideString): OleVariant; dispid 1;
function GetUsers(const sDBName: WideString): OleVariant; dispid 2;
function IsUserInRole(const Login: WideString; const Role: WideString; const sDBName: WideString): WordBool; dispid 3;
function GetUserRoles(const Login: WideString; const sDBName: WideString): IStrings; dispid 4;
procedure AddUserToRole(const Login: WideString; const Role: WideString;
const sDBName: WideString); dispid 5;
procedure RemoveUserFromRole(const Login: WideString; const Role: WideString;
const sDBName: WideString); dispid 6;
function Login(const sServer: WideString; const sDatabase: WideString;
const sLogin: WideString; const sPWD: WideString): WordBool; dispid 7;
end;
CoSQLDMO_Security = class
class function Create: ISQLDMO_Security;
class function CreateRemote(const MachineName: string): ISQLDMO_Security;
end;
implementation
uses ComObj;
class function CoSQLDMO_Security.Create: ISQLDMO_Security;
begin
Result := CreateComObject(CLASS_SQLDMO_Security) as ISQLDMO_Security;
end;
class function CoSQLDMO_Security.CreateRemote(const MachineName: string): ISQLDMO_Security;
begin
Result := CreateRemoteComObject(MachineName, CLASS_SQLDMO_Security) as ISQLDMO_Security;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -