home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 November / Chip_2002-11_cd1.bin / zkuste / vbasic / Data / Utils / WME71SDK.exe / RCDATA / CABINET / towm_main.bas < prev    next >
BASIC Source File  |  2001-03-02  |  937b  |  41 lines

  1. Attribute VB_Name = "TOWM_Main"
  2. Option Explicit
  3. Sub Main()
  4.   Dim Success As Boolean
  5.   Dim InputFile As String
  6.   Dim OutputFile As String
  7.   Dim ProfileName As String
  8.   Dim Enc_Class As TOWM_ENCODER
  9.  
  10.   ' Create encoder class
  11.  
  12.   Set Enc_Class = New TOWM_ENCODER
  13.  
  14.   ' Get the command line arguments
  15.  
  16.   Success = Enc_Class.GetCommandArgs(Command, InputFile, OutputFile, ProfileName)
  17.  
  18.   ' If there was a problem, exit with usage message
  19.  
  20.   If Success = False Then
  21.     MsgBox "TOWM Usage:" + Chr(13) + Chr(13) + "TOWM -in ""<filename>"" [-out ""< FileName >""] -p ""< ProfileName >"""
  22.     Exit Sub
  23.   End If
  24.  
  25.   ' Configure the encoder
  26.   
  27.   Success = Enc_Class.ConfigEncoder(InputFile, OutputFile, ProfileName)
  28.   
  29.   ' If there was a problem, exit with a message
  30.   
  31.   If Success = False Then
  32.     MsgBox "Error configuring encoder"
  33.     Exit Sub
  34.   End If
  35.  
  36.   ' Run the encoder
  37.  
  38.   Enc_Class.RunEncoder
  39.  
  40. End Sub
  41.