本帖最后由 oplmamik 于 2012-2-10 12:01 编辑
如题,因帮助文档中没有_WinNet_OpenEnum、_WinNet_EnumResource、_WinNet_CloseEnum 相关函数的示例,所以来此求各种大神指教。
以下是我自己写的,可是无效。Local $hEnum, $iCount = -1, $iBufSize=1646, $rs
_WinNet_OpenEnum(1, 0, 0, 0, $hEnum)
$rs = DllStructCreate($tagNETRESOURCE)
_WinNet_EnumResource($hEnum, $iCount, DllStructGetPtr($rs), $iBufSize)
ConsoleWrite(DllStructGetData($rs,"Scope")&@CRLF)
ConsoleWrite(DllStructGetData($rs,"Type")&@CRLF)
ConsoleWrite(DllStructGetData($rs,"DisplayType")&@CRLF)
ConsoleWrite(DllStructGetData($rs,"Usage")&@CRLF)
ConsoleWrite(DllStructGetData($rs,"LocalName")&@CRLF)
ConsoleWrite(DllStructGetData($rs,"RemoteName")&@CRLF)
ConsoleWrite(DllStructGetData($rs,"Comment")&@CRLF)
ConsoleWrite(DllStructGetData($rs,"Provider")&@CRLF)
_WinNet_CloseEnum($hEnum)
|