正在阅读:在WIN2000与98中创建共享文件夹在WIN2000与98中创建共享文件夹

2004-03-18 14:45 出处:PConline 作者:happy_david 责任编辑:linjixiong


  var

  Win95_NetUserGetInfo: TWin95_NetUserGetInfo;
  Win95_NetWkstaUserGetInfo: TWin95_NetWkstaUserGetInfo;
  Win95_NetApiBufferFree: TWin95_NetApiBufferFree;

  WinNT_NetWkstaGetInfo: TWinNT_NetWkstaGetInfo;
  WinNT_NetApiBufferFree: TWinNT_NetApiBufferFree;

  WSNT: ^WKSTA_INFO_100;
  WS95: ^WKSTA_USER_INFO_1;

  EC: DWORD;
  hNETAPI: THandle;
  begin
  try

  Result := '';

  if IsWinNT then
  begin
  hNETAPI := LoadLibrary('NETAPI32.DLL');
  if hNETAPI <> 0 then
  begin @WinNT_NetWkstaGetInfo := GetProcAddress(hNETAPI, 'NetWkstaGetInfo');
  @WinNT_NetApiBufferFree := GetProcAddress(hNETAPI, 'NetApiBufferFree');

  EC := WinNT_NetWkstaGetInfo(nil, 100, Pointer(WSNT));
  if EC = 0 then
  begin
  Result := WideCharToString(WSNT^.wki100_langroup);
  WinNT_NetApiBufferFree(Pointer(WSNT));
  end;
  end;
  end
  else
  begin
  hNETAPI := LoadLibrary('RADMIN32.DLL');
  if hNETAPI <> 0 then



察看评论详细内容 我要发表评论
作者笔名简短内容 发表时间
:

键盘也能翻页,试试“← →”键

相关文章

关注我们

最新资讯离线随时看 聊天吐槽赢奖品