VB °æ (¾«»ªÇø)
·¢ÐÅÈË: bloom (©À©Á©Â©Ã©Ä©Æ©Ç¨), ÐÅÇø: VB
±ê Ìâ: WNetOpenEnum£¨ÍøÂ磩(×ªÔØ)
·¢ÐÅÕ¾: ¹þ¹¤´ó×϶¡Ïã (2000Äê09ÔÂ07ÈÕ18:42:36 ÐÇÆÚËÄ), תÐÅ
¡¾ ÒÔÏÂÎÄ×Ö×ªÔØ×Ô cnTemp ÌÖÂÛÇø ¡¿
¡¾ ÔÎÄÓÉ bloom Ëù·¢±í ¡¿
·¢ÐÅÈË: yucheng (ÎÞ»°¿É˵), ÐÅÇø: VisualBasic
·¢ÐÅÕ¾: BBS ˮľÇ廪վ (Fri Mar 31 01:33:11 2000)
WNetOpenEnum
VBÉùÃ÷
Declare Function WNetOpenEnum Lib "mpr.dll" Alias "WNetOpenEnumA" (ByVal dwS
cope As Long, ByVal dwType As Long, ByVal dwUsage As Long, lpNetResource As
NETRESOURCE, lphEnum As Long) As Long
˵Ã÷
Æô¶¯¶ÔÍøÂç×ÊÔ´½øÐÐö¾ÙµÄ¹ý³Ì¡£Õâ¸öº¯Êý»á·µ»ØÓÉWNetEnumResourceº¯ÊýÓÃÓÚö¾Ù×Ê
Ô´ËùÓõÄÒ»¸ö¾ä±ú
·µ»ØÖµ
Long£¬Áã±íʾ³É¹¦¡£»áÉèÖÃGetLastError¡£ÈçGetLastErrorÊÇERROR_EXTENDED_ERROR£¬
Ôò¿ÉÓÃWNetGetLastErrorÈ¡µÃ¶îÍâµÄ´íÎóÐÅÏ¢
²ÎÊý±í
²ÎÊý ÀàÐͼ°ËµÃ÷
dwScope Long£¬Ö¸¶¨ÒªÃ¶¾ÙµÄ×ÊÔ´·¶Î§¡£¿ÉÉèΪÏÂÊö³£ÊýÖ®Ò»£º
RESOURCE_CONNECTED ö¾ÙÒÑÁ¬½ÓµÄ×ÊÔ´£¨ºöÂÔdwUsage£©
RESOURCE_GLOBALNET ö¾ÙËùÓÐ×ÊÔ´
RESOURCE_REMEMBERED ֻö¾ÙÓÀ¾ÃÐÔÁ¬½Ó
dwType Long£¬ÏÂÊö³£ÊýÖ®Ò»
RESOURCE_ANY ö¾ÙËùÓÐÀàÐ͵ÄÍøÂç×ÊÔ´
RESOURCE_DISK ö¾Ù´ÅÅÌ×ÊÔ´
RESOURCE_PRINT ö¾Ù´òÓ¡×ÊÔ´
dwUsage Long£¬¿ÉÉèΪÁ㣬±íʾö¾ÙËùÓÐ×ÊÔ´£»»òÉèΪÏÂÊö³£ÊýµÄÒ»¸ö»òÁ½¸ö£º
RESOURCEUSAGE_CONNECTABLE ֻö¾ÙÄÇЩÄܹ»Á¬½ÓµÄ×ÊÔ´
RESOURCEUSAGE_CONTAINER ֻö¾Ù°üº¬ÁËÆäËû×ÊÔ´µÄ×ÊÔ´
lpNetResource NETRESOURCE£¬Õâ¸ö½á¹¹Ö¸¶¨ÁËÒ»¸öÈÝÆ÷×ÊÔ´¡£¸Ãº¯Êý»áö¾Ù°üº¬ÓÚÕâÀï
Ö¸¶¨µÄij¸öÖ¸¶¨×ÊÔ´ÄÚµÄ×ÊÔ´¡£ÈçÉèΪNULL£¨°ÑÉùÃ÷±ä³ÉByVal As Long£©£¬ÄÇôº¯Êý»á
ö¾Ù¶¥¼¶ÍøÂç×ÊÔ´¡£ÌÈÈôÔÚdwScope²ÎÊýÀïûÓÐÖ¸¶¨RESOURCE_GLOBALNET£¬ÄÇô±ØÐëΪN
ULL
lphEnum Long£¬Ö¸¶¨Ò»¸ö±äÁ¿£¬ÓÃÓÚ×°ÔØÒ»¸öö¾Ù¾ä±ú¡£¸Ã¾ä±úÓÉWNetEnumResourceº¯
ÊýʹÓᣱØÐëÓÃWNetCloseEnumº¯Êý½«ÆäÇå³ý
--
²»Ð´ÁË£¬Ã»Ê²Ã´¿É˵µÄÁË.....
--
¡î À´Ô´:£®¹þ¹¤´ó×϶¡Ïã bbs.hit.edu.cn£®[FROM: blo0m.bbs@smth.org]
--
¡ù ×ªÔØ:£®¹þ¹¤´ó×϶¡Ïã bbs.hit.edu.cn£®[FROM: 202.118.247.254]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
Ò³ÃæÖ´ÐÐʱ¼ä£º1.841ºÁÃë