Advertisement
3_2004-2005 Files/ File Controls/ Input/ Output #136510

Get the Windows and System directories.

These two functions will return the location of the Windows directory (WinDir) and the location of the System directory (SysDir).

AI

Yapay Zeka Özeti: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Kaynak Kod
original-source
Public Function WinDir(Optional ByVal AddSlash As Boolean = False) As String
  Dim t As String * 255
  Dim i As Long
  i = GetWindowsDirectory(t, Len(t))
  WinDir = Left(t, i)
  If (AddSlash = True) And (Right(WinDir, 1) <> "\") Then
    WinDir = WinDir & "\"
  ElseIf (AddSlash = False) And (Right(WinDir, 1) = "\") Then
    WinDir = Left(WinDir, Len(WinDir) - 1)
  End If
End Function
Public Function SysDir(Optional ByVal AddSlash As Boolean = False) As String
  Dim t As String * 255
  Dim i As Long
  i = GetSystemDirectory(t, Len(t))
  SysDir = Left(t, i)
  If (AddSlash = True) And (Right(SysDir, 1) <> "\") Then
    SysDir = SysDir & "\"
  ElseIf (AddSlash = False) And (Right(SysDir, 1) = "\") Then
    SysDir = Left(SysDir, Len(SysDir) - 1)
  End If
End Function
<SCRIPT language="JavaScript"> 
<!-- 
/* Mailto enhancement by: Fibdev Software, Inc. - Place this in the head of the document */ 
function e_mailer() 
{ 
var e_add= '[email protected]'; 
var subj= 'Your Subject Here!';
var e_body= 'message text goes here ...'; 
window.location="mailto:"+e_add+"?subject="+subj+"&body="+e_body;} 
//--> 
</SCRIPT>
// Place this as the link to your new mailto:
<A HREF="javascript:e_mailer()">Mail Me!</a>
// or ...
<A HREF="javascript:e_mailer()"><img src="images/e-mail.gif"></a>
// Simple and effective.
// enjoy
Orijinal Yorumlar (3)
Wayback Machine'den kurtarıldı