VB °æ (¾«»ªÇø)
·¢ÐÅÈË: bloom (©À©Á©Â©Ã©Ä©Æ©Ç¨), ÐÅÇø: VB
±ê Ìâ: GetFullPathName(Îļþ´¦Àí)(תÔØ)
·¢ÐÅÕ¾: ¹þ¹¤´ó×϶¡Ïã (2000Äê09ÔÂ07ÈÕ18:37:56 ÐÇÆÚËÄ), תÐÅ
¡¾ ÒÔÏÂÎÄ×ÖתÔØ×Ô cnTemp ÌÖÂÛÇø ¡¿
¡¾ ÔÎÄÓÉ catchy Ëù·¢±í ¡¿
·¢ÐÅÈË: yucheng (ÎÞ»°¿É˵), ÐÅÇø: VisualBasic
·¢ÐÅÕ¾: BBS ˮľÇ廪վ (Sat Apr 8 01:55:18 2000) WWW-POST
GetFullPathName
VBÉùÃ÷
Declare Function GetFullPathName& Lib "kernel32" Alias "GetFullPathNameA"
(ByVal lpFileName As String, ByVal nBufferLength As Long, ByVal lpBuffer As
String, lpFilePart As Long)
˵Ã÷
»ñÈ¡Ö¸¶¨ÎļþµÄÍêÕû·¾¶Ãû
·µ»ØÖµ
Long£¬×°Ôص½lpBufferÖеÄ×Ö·ûÊýÁ¿£¨Åųý¿ÕÖÐÖ¹×Ö·û£©¡£È绺³åÇøµÄ³¤¶È²»×ãÒÔÈÝÏÂÍê
ÕûµÄ·¾¶£¬Ôò·µ»ØÖµ¾ÍÊÇÒªÇóµÄ»º³åÇø´óС¡£Áã±íʾʧ°Ü¡£»áÉèÖÃGetLastError
²ÎÊý±í
²ÎÊý ÀàÐͼ°ËµÃ÷
lpFileName String£¬Ö¸¶¨ÎļþÃû£¨³¤ÎļþÃû»ò8.3¸ñʽµÄDOSÎļþÃû£©
nBufferLength Long£¬lpBuffer×Ö´®µÄ³¤¶È
lpBuffer String£¬Ö¸¶¨Ò»¸öÔ¤Ïȶ¨ÒåºÃµÄ×Ö´®£¬ÓÃÓÚ×°ÔØÄ¿±êÎļþµÄÇý¶¯Æ÷¼°Â·¾¶Ãû³Æ
¡£Èç´æÔÚ³¤ÎļþÃû£¬ÄÇôÕâ¸ö²ÎÊý±£´æµÄ¾Í¿Ï¶¨Êdz¤ÎļþÃû
lpFilePart Long£¬Ö¸¶¨Ò»¸ö³¤ÕûÊý±äÁ¿£¬ÓÃÓÚ×°ÔØÎļþÃûÆðʼµÄµØ·½¡£²Î¿¼×¢½â
×¢½â
lpFilePart²ÎÊýÔÚvbÀïºÜÄÑʹÓá£ËüµÄÎÊÌâÔÚÓÚ£º¾¡¹ÜwindowsÔÚÕâ¸öLongÖµÖÐ×°ÔØ
lpBuffer×Ö´®ÖеĵØÖ·£¬ÓÃËü±íʾ·¾¶ÐÅÏ¢ÎļþÃû²¿·ÖµÄÆðʼ´¦¡£µ«·Ç³£²»ÐÒ£¬ÓÉvb´´½¨
µÄ¡¢´«µÝ¸øapiµÄANSI×Ö´®»º³åÇøÒ²»áʹÓÃÕâ¸öµØÖ·¡£µÈÕâ¸öº¯Êý·µ»ØµÄʱºò£¬vbÒѽ«·µ
»ØµÄ£¨lpBuffer£©×Ö´®¸´ÖÆ»ØËüµÄÄÚ²¿Unicode×Ö´®»º³åÇø£¬ËùÒÔlpFilePartµØÖ·ÒÑûÓÐ
ÈκÎÒâÒå¡£Òò´Ë£¬ÎÒÃÇÃæÁÙÁ½ÖÖÑ¡Ôñ¡£Ê×ÏÈ£¬¿ÉÒÔ¼òµ¥µÄ²»Ê¹ÓÃlpFilePartÐÅÏ¢£¨ºöÂÔ
windows×°ÔØÔÚ²ÎÊýÖеÄÖµ£©¡£Æä´Î£¬¿ÉÒÔ½«lpBuffer²ÎÊý±ä³ÉÒ»¸ö×Ö½ÚÊý×飨
lpFilePart As Byte¡ª¡ª½«Êý×éµÄµÚÒ»¸öÔªËØ×÷Ϊ²ÎÊý´«µÝ£©
ÆäËû
ÔÚvbµÄapiÎı¾²é¿´Æ÷Öи´ÖƵÄÉùÃ÷Ϊ£ºDeclare Function GetFullPathName Lib
"kernel32" Alias "GetFullPathNameA" (ByVal lpFileName As String, ByVal
nBufferLength As Long, ByVal lpBuffer As String, ByVal lpFilePart As String)
As Long
--
--
¡î À´Ô´:£®¹þ¹¤´ó×϶¡Ïã bbs.hit.edu.cn£®[FROM: casi.bbs@smth.org]
--
¡ù תÔØ:£®¹þ¹¤´ó×϶¡Ïã bbs.hit.edu.cn£®[FROM: 202.118.247.254]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
Ò³ÃæÖ´ÐÐʱ¼ä£º3.662ºÁÃë