home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / cssProject190224302001.psc / Misc / ProjectAnalyzer / Module1.bas < prev    next >
Encoding:
BASIC Source File  |  2001-04-27  |  1.5 KB  |  38 lines

  1. Attribute VB_Name = "Module1"
  2. Option Explicit
  3.  
  4. Private Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileName As String) As Long
  5. Private Declare Function WritePrivateProfileString Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpString As Any, ByVal lpFileName As String) As Long
  6.  
  7. Public strProjectPath As String
  8. Public strProjectName As String
  9. Public strProjectFileName As String
  10. Public colModules As Collection
  11. Public intCounter As Integer
  12. Public colProcedures As Collection
  13. Public colControls As Collection
  14. Public colVariables As Collection
  15. Public lngHeigth As Long
  16. Public lngWidth As Long
  17.  
  18. Public Sub WriteDataToINI(ByVal strSection As String, ByVal strKey As String, ByVal strValue As String)
  19.     Dim strFileLoc As String
  20.     
  21.     strFileLoc = App.Path + "\" & "ProjectAnalyzer.INI"
  22.     
  23.     WritePrivateProfileString strSection, strKey, strValue, strFileLoc
  24.  
  25. End Sub
  26.  
  27. Public Function GetINIData(strSection As String, strKey As String) As String
  28.     Dim strBuffer As String
  29.     Dim strFileLoc As String
  30.     
  31.     strBuffer = Space(145)
  32.     strFileLoc = App.Path + "\" & "ProjectAnalyzer.INI"
  33.     GetPrivateProfileString strSection, strKey, "", strBuffer, 144, strFileLoc
  34.     
  35.     GetINIData = Left(strBuffer, (InStr(1, strBuffer, Chr(0)) - 1))
  36. End Function
  37.  
  38.