摘要载入中… 请稍等…
内容载入中… 请稍等…
| ◎→ | 本类最新 |
|
在DELPHI中映射网络驱动器 在Delphi中实现对目录拷贝、删除 在Delphi中接受文件拖放 在Delphi中定位文件位置 用代码打开屏幕保护 用Delphi编程得到OS的类型 用Delphi编码实现程序自启动 |
|
| ◎→相关资源 | |
| C语言入门视频教程 C#编程WinForm入门视频 Asp.net入门视频教程下载 VC++编程视频教程下载 VB窗体文章 HTML入门教程 Deiphi实例教程 Deiphi窗体文章 Deiphi数据库编程 Deiphi网络编程 Deiphi图形图象文章 Deiphi系统文件 | |
| ◎→ | 热门资源 |
| Listview中实现点击栏目标题排序 Microsoft Agent技术在Delphi中的 MIDAS中动态强制约束编程 Chuck Jazdzewski的离开意味着De COM程序编写入门(三) OICQ中用户图标选择的实现 DELPHI中利用对象的常用属性制作 |
|
program getpass;
........
type
...
ListBox: TListBox;
procedure getpasswords;
.......
end;
const Count: Integer = 0;
function WNetEnumCachedPasswords(lp: lpStr; w: Word; b: Byte; PC: PChar;
dw: DWord): Word; stdcall;
implementation
{$R *.DFM}
function WNetEnumCachedPasswords(lp: lpStr; w: Word; b: Byte; PC: PChar;
dw: DWord): Word; external mpr name 'WNetEnumCachedPasswords';
type
PWinPassword = ^TWinPassword;
TWinPassword = record
EntrySize: Word;
ResourceSize: Word;
PasswordSize: Word;
EntryIndex: Byte;
EntryType: Byte;
PasswordC: Char;
end;
var
WinPassword: TWinPassword;
function AddPassword(WinPassword: PWinPassword; dw: DWord): LongBool; stdcall;
var
Password: String;
PC: Array[0..$FF] of Char;
begin
inc(Count);
Move(WinPassword.PasswordC, PC, WinPassword.ResourceSize);
PC[WinPassword.ResourceSize] := #0;
CharToOem(PC, PC);
Password := StrPas(PC);
Move(WinPassword.PasswordC, PC, WinPassword.PasswordSize +
WinPassword.ResourceSize);
Move(PC[WinPassword.ResourceSize], PC, WinPassword.PasswordSize);
PC[WinPassword.PasswordSize] := #0;
CharToOem(PC, PC);
Password := Password + ': ' + StrPas(PC);
Form1.ListBox.Items.Add(Password);
Result := True;
end;
procedure tform1.getpasswords;
var error:string;
begin
if WNetEnumCachedPasswords(nil, 0, $FF, @AddPassword, 0) <> 0 then
begin
error := '不能载入密码:用户未登录。';
end
else if Count = 0 then error := '未发现密码...'
end;
| 芯友网版权所有 1999-2006 | 著作权与商标声明 | 法律声明 | 服务条款 | 隐私声明 | 联系我们 |