مشاهده نسخه کامل
: دستوري كه بتونه بگه windows روی چه درایوي قرار داره
dj farbod
28-06-2006, 14:03
:rambo:دستوري كه بتونه بگه windows روی چه درایوی هست:rambo:
shahabmusic
28-06-2006, 14:11
منظورت اينه؟
Public Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
NoneForce
28-06-2006, 14:13
:rambo:دستوري كه بتونه بگه windows روی چه درایوی هست:rambo:
سلام
Private Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
Private Declare Function GetSystemDirectory Lib "kernel32" Alias "GetSystemDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
Private Declare Function GetTempPath Lib "kernel32" Alias "GetTempPathA" (ByVal nBufferLength As Long, ByVal lpBuffer As String) As Long
Private Sub Getpath_WINDOWS()
Dim WindirS As String * 255 'declares a full lenght string for DIR name
'_(for getting the path)
Dim TEMP 'a temporarry variable that holds LENGHT OF THE FINAL PATH STRING
Dim Result 'a variable for holding the the output of the function
TEMP = GetWindowsDirectory(WindirS, 255) 'holds the FUUL(include unneccessary charecters)Path
Result = Left(WindirS, TEMP) 'holds final path
End Sub
Private Sub Getpath_SYSTEM()
Dim WindirS As String * 255 'declares a full lenght string for DIR name(for getting the path)
Dim TEMP 'a temporarry variable that holds LENGHT OF THE FINAL PATH STRING!
Dim Result 'a variable for holding the the output of the function
TEMP = GetSystemDirectory(WindirS, 255) 'holds the FUUL(include unneccessary charecters)Path
Result = Left(WindirS, TEMP) 'holds final path
End Sub
Private Sub getpath_TEMP()
'this API(TEMP) is different from others(in placing arguments)
Dim WindirS As String * 255 'declares a full lenght string for DIR name(for getting the path)
Dim TEMP 'a temporarry variable that holds LENGHT OF THE FINAL PATH STRING!
Dim Result 'a variable for holding the the output of the function
TEMP = GetTempPath(255, WindirS) 'holds the FUUL(include unneccessary charecters)Path
Result = Left(WindirS, TEMP) 'holds final path
End Sub
Payman_62
29-06-2006, 14:42
برای مشاهده محتوا ، لطفا وارد شوید یا ثبت نام کنید
vBulletin , Copyright ©2000-2025, Jelsoft Enterprises Ltd.