home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2002 April
/
Chip_2002-04_cd1.bin
/
zkuste
/
delphi
/
kolekce
/
d56
/
NT.ZIP
/
NTDelGlobalGroup.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1999-06-20
|
1KB
|
45 lines
unit NTDelGlobalGroup;
interface
uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;
type
TNTDelGlobalGroup = class(TComponent)
private
{ Private declarations }
FServer:String;
FGroup:String;
protected
{ Protected declarations }
public
{ Public declarations }
published
{ Published declarations }
property Server:String read FServer write FServer;
property Group:String read FGroup write FGroup;
function Execute:LongInt;
end;
function NetGroupDel(Server:PWideChar;GroupName:PWideChar):LongInt; stdcall; external 'netapi32.dll';
procedure Register;
implementation
function TNTDelGlobalGroup.Execute:LongInt;
var tServer:Array[0..255] Of WideChar;
tGroup:Array[0..255] Of WideChar;
begin
StringToWideChar(FServer,@tServer,255);
StringToWideChar(FGroup,@tGroup,255);
Result:=NetGroupDel(@tServer,@tGroup);
end;
procedure Register;
begin
RegisterComponents('NT Tools - Global', [TNTDelGlobalGroup]);
end;
end.