It will depend on what API you are using.
The API function has to be declared in a module or a class. It will look something like this
Private Declare Function ReadFile Lib "kernel32" (ByVal hFile As Long, _
lpBuffer As Any, ByVal nNumberOfBytesToRead As Long, _
lpNumberOfBytesRead As Long, ByVal lpOverlapped As Long) As Long
Then you can use it in your code.
Best of Luck