FREEHAFER'S VISUAL BASIC VERSION 6 HELP PAGE
THIS WEB SITE IS BY JOHN RICHARD FREEHAFER.
E-MAIL ADDRESS: nfn12346@naples.net
©1999
The following are complete programs for a Visual Basic Version 6 compiler:
Get Disk Free Space Of Floppy A.
Do a shell format.
Play wave file and run Visual Basic 6 with Turbo Assembler 5 dll.
Get Disk Free Space Of Floppy A.
Private Declare Function GetDiskFreeSpace Lib "kernel32" Alias "GetDiskFreeSpaceA" (ByVal lpRootPathName As String, lpSectorsPerCluster As Long, lpBytesPerSector As Long, lpNumberOfFreeClusters As Long, lpTotalNumberOfClusters As Long) As Long Private Sub Command1_Click() 'declare variables Dim ff As Long Dim SectorsPerCluster As Long Dim BytesPerSector As Long Dim NumberOfFreeClusters As Long Dim TotalNumberOfClusters As Long Dim FreeBytes As Long Dim RootPathName As String RootPathName$ = Text2 'get disk free space ff = GetDiskFreeSpace(RootPathName, SectorsPerCluster, BytesPerSector, NumberOfFreeClusters, TotalNumberOfClusters) FreeBytes = NumberOfFreeClusters * SectorsPerCluster * BytesPerSector 'output Text1 = Text2 & " has " & FreeBytes & " free bytes!" End Sub Private Sub Command2_Click() Beep End End Sub
Download and try this executable freeware to get
the disk free space of floppy disk A:, in *.ZIP format!
Do Shell Format Of Floppy A.
Private Declare Function SHFormatDrive Lib "shell32" (ByVal hwnd As Long, ByVal Drive As Long, ByVal fmtID As Long, ByVal options As Long) As Long Private Sub cmdExit_Click() Beep End End Sub Private Sub cmdFormat_Click() Dim retval As Long retval = SHFormatDrive(Me.hwnd, 0, &HFFFF, &H1) 'drive a:,default drive type, full format End Sub Private Sub Drive1_Change() Drive1.Drive = "A" 'makes it imposible to fromat any drive but a:\ End Sub Private Sub Form_Load() Me.Caption = "Freehafer's Shell Format Drive A: Program! (c)2000 INNIEA PUBLISHING COMPANY!" cmdFormat.Caption = "&Format" cmdExit.Caption = "E&xit" Drive1.Drive = "A" End Sub
Download and try this executable freeware to do
a shell format of floppy disk A:, in *.ZIP format!
Play wave file and run Visual Basic 6 with Turbo Assembler 5 dll.
'VISUAL BASIC 6 PART Private Declare Function sndPlaySound Lib "winmm" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long Private Declare Sub qq Lib "d.dll" (ByRef number1 As Long, ByVal number2 As Long) Private Sub TASM_Click() Dim aa As Long, bb As Long bb = 2 aa = InputBox("INPUT A NUMBER TO BE ADDED TO 2 USING A TASM DLL:", "RÖÄK NOG!", 11) qq aa, bb MsgBox "THE NUMBER YOU ENTERED ADDED TO 2 IS " & aa & ".", , "JOHN FREEHAFER IS REALLY COOL!" End Sub Private Sub Command1_Click() End Sub Private Sub WAVE_Click() Dim ps As Integer ps = sndPlaySound("c:\windows\media\The Microsoft Sound.wav", 0) End Sub Private Sub Command2_Click() End Sub Private Sub EXIT_Click() Beep End End Sub ; TASM 5 PART ; ; TO COMPILE TYPE: ; tasm -ml d.asm ; TO CONVERT FROM OMF TO COFF ; editbin d.obj ; TO LINNK WITH VISUAL BASIC 6 ; Link.exe /dll /export:addLongs /entry:DllMain name.obj ; ; CONVERTS FILE named d.asm to d.dll ; ; include the following files in the directory to compile ; Mspdb60.dll ; Editbin.exe ; Link.exe ; .586 .model flat .data GLOBAL _qq, _DllMain .code _DllMain: mov EAX, 1 ; DLL ENTRY retn 12 ; _qq PROC NEAR C ; save caller's ebp to set up for addressing arguments push EBP mov EBP, ESP ; add numbers mov EAX, [EBP+8] ; first # mov ECX, [EAX] ; add ECX, [EBP+12] ; second # mov [EAX], ECX ; ; prepare stuff to be returned push EAX ; adjust stack and restore caller's ebp add ESP, 4 pop EBP ; return retn 8 _qq ENDP END
Download and try this executable freeware to play
a wave file and use with a TASM version 5 dll, in *.ZIP format!
TOUCH THIS TO GO BACK TO THE HOME PAGE!