 If Not (m_hMem = 0) Then
      LocalFree m_hMem
   End If
End Sub

Private Sub errHandler(ByVal sProc As String, ByVal lErr As Long)
Dim sMsg As String
   Select Case lErr
   Case 1
      sMsg = "Unable to allocate output buffer for writing"
   Case 2
      sMsg = "Unable to open file for writing"
   Case 3
      sMsg = "Cannot write more data than is available in the buffer"
   Case 4
      sMsg = "File not open for writing"
   Case 5
      sMsg = "Failed to write buffer to file"
   End Select
   Err.Rais