Last post Nov 23, 2009 12:05 PM by atconway
Nov 21, 2009 07:17 AM|samuelchandradoss|LINK
i want to know how to use api calls in vb.net2008. in visual basic 6.0. we can find the list of api calls in add in manager . in vb.net2008 how to find it..
API Calls in vb.net 2008
Nov 21, 2009 08:43 AM|qwe123kids|LINK
If U want To add Referrnce any Assembly
Add Reernce-->Com tab and select the com or api u want
if u want Windows API..
chk the above link
Nov 23, 2009 12:05 PM|atconway|LINK
i want to know how to use api calls in vb.net2008
I want to give you a little advice on this and it may be all for nothing because I do not know what you are trying to accomplish.
I came from a VB6 background as well several years ago, and as you know you couldn't code too long before neededing to make an API call to do something powerful. Since the advent of .NET, Microsoft has done a fantastic job of wrapping up a lot of the functionality
in the .NET Framework libraries that we used to have to make API calls for.
For example a quick example that comes to mind would be finding the amount of HardDrive space avaliable on a machine. In VB6 you had to make an API call to 'GetDiskFreeSpaceEx' I believe. Now in .NET that is wrapped up in the System.IO namespace and can
be accessed in (2) lines of code as below:
'Create a DriveInfo object for the C: drive, and show available space
Dim MyDrv As New System.IO.DriveInfo("C:")
Dim SpaceAvail As Long = MyDrv.AvailableFreeSpace
Wow! That's simple. The point is, almost everything can be done, and be done easier through the .NET Framework Framework Class Libraries. The simplest way to find out is just to search the internet for what you need to do and add on ".NET" or "VB.NET"
at the end. For example "Find HardDrive space VB.NET". You will quickly find out how to do things much easier.
Hope this information helps!