in vb.net to get a value back from a function you dont set the return value to the function name.

You do the Return statement. Like this.

Code:
Option Strict On
Module modGetInfo

	Public Declare Function GetVolumeInformation Lib "kernel32" _
	 Alias "GetVolumeInformationA" _
	 (ByVal lpRootPathName As String, _
	 ByVal lpVolumeNameBuffer As String, _
	 ByVal nVolumeNameSize As Long, _
	 ByVal lpVolumeSerialNumber As Long, _
	 ByVal lpMaximumComponentLength As Long, _
	 ByVal lpFileSystemFlags As Long, _
	 ByVal lpFileSystemNameBuffer As String, _
	 ByVal nFileSystemNameSize As Long) As Long

	Function GetHardDriveSerialNumber() As Long

		Dim Result As Long
		Dim RootPathName As String = "C:"
		Dim VolumeNameBuffer As String = Space(256)
		Dim VolumeNameSize As Long = 256
		Dim VolumeSerialNumber As Long = 0
		Dim MaximumComponentLength As Long = 256
		Dim FileSystemFlags As Long = 0
		Dim FileSystemNameBuffer As String = Space(256)
		Dim FileSystemNameSize As Long = 256

		Result = GetVolumeInformation(RootPathName, _
			VolumeNameBuffer, _
			VolumeNameSize, _
			VolumeSerialNumber, _
			MaximumComponentLength, _
			FileSystemFlags, _
			FileSystemNameBuffer, _
			FileSystemNameSize)

                  'do this 
		Return VolumeSerialNumber
                  'instead of this
                  GetHardDriveSerialNumber = VolumeSerialNumber

 
	End Function


End Module
that should work for you