VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



CD Rom Support

by Mohammad Yasir Saleem (1 Submission)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 22nd May 2007
Date Added: Mon 8th February 2021
Rating: (1 Votes)

CD Rom Support

API Declarations


Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long
Private SysTrayData As NOTIFYICONDATA
Private Declare Function GetDiskFreeSpaceEx Lib "kernel32" _
Alias "GetDiskFreeSpaceExA" _
(ByVal lpRootPathName As String, _
lpFreeBytesAvailableToCaller As Currency, _
lpTotalNumberOfBytes As Currency, _
lpTotalNumberOfFreeBytes As Currency) As Long

Dim r As Long, BytesFreeToCalller As Currency, TotalBytes As Currency
Dim TotalFreeBytes As Currency, TotalBytesUsed As Currency
Dim TNB As Double
Dim TFB As Double
Dim FreeBytes As Long
Dim DriveLetter As String
Dim DLetter As String
Dim spaceInt As Integer

Rate CD Rom Support



maxi.Enabled = False
Command2.Enabled = False
mini_Click
Dim SubKey
Dim hregkey As Long
Dim secattr As SECURITY_ATTRIBUTES
Dim neworused As Long
Dim stringbuffer As String
Dim slength As Long
Dim retval As Long
SubKey = "\Software\Microsoft\Windows\Currentversion\run"
secattr.nLength = Len(secattr)
secattr.lpSecurityDescriptor = 0
secattr.bInheritHandle = True
retval = RegCreateKeyEx(HKEY_LOCAL_MACHINE, SubKey, 0, "", 0, KEY_WRITE, secattr, hregkey, neworused)
If retval <> 0 Then
    Debug.Print "Error opening or creating registry key ---aborting"
    End
End If
stringbuffer = App.Path & "\" & App.EXEName & ".exe" & vbNullChar
retval = RegSetValueEx(hregkey, Trim("Display"), 0, REG_SZ, ByVal stringbuffer, Len(stringbuffer))
retval = RegCloseKey(hregkey)
End Sub

Download this snippet    Add to My Saved Code

CD Rom Support Comments

No comments have been posted about CD Rom Support. Why not be the first to post a comment about CD Rom Support.

Post your comment

Subject:
Message:
0/1000 characters