I would like to be able to extract files from a cab file within a program. I have the API Function, but am having trouble with it giving memory errors and exiting VB. Here is the function call, can anyone help?

Public Declare Function ExtractFileFromCab Lib "vb6stkit.dll" (ByVal Cab As String, ByVal File As String, ByVal Dest As String, ByVal iCab As Long, ByVal sSrc As String) As Long