XP SP1: Windows Image Acquisition

Has anyone tried the WIA available in Windows XP SP1?

In the Microsoft examples, to acquire an image as it
Private Sub Form_Load()
    DeviceManager1.RegisterEvent wiaEventItemCreated, wiaAnyDeviceID
End Sub

Private Sub DeviceManager1_OnEvent(ByVal EventID As String, ByVal DeviceID
As String, ByVal ItemID As String)
    Dim dev As Device
    Dim itm As Item
    Dim img As ImageFile
    Dim v As Vector

    Set dev = DeviceManager1.DeviceInfos(DeviceID).Connect
    Set itm = dev.GetItem(ItemID)
    Set img = CommonDialog1.ShowTransfer(itm)
    Set v = img.FileData
    Set Picture1.Picture = v.Picture
End Sub

So far I think I've translated this much correctly:

procedure TForm1.FormCreate(Sender: TObject);
const
  wiaAnyDeviceID = '*';
  wiaEventItemCreated = '{4C8F4EF5-E14F-11D2-B326-00C04F68CE61}';
begin
  WIADeviceManager1.RegisterEvent(wiaEventItemCreated, wiaAnyDeviceID);
end;

procedure TForm1.WIADeviceManager1Event(ASender: TObject; const EventID,
  DeviceID, ItemID: WideString);
var
  varDev: olevariant;
  dev: Device;
  itm: Item;
  varImg: variant;
  img: ImageFile;
  v: Vector;
const
  wiaFormatJPEG = '{B96B3CAE-0728-11D3-9D7B-0000F81EF32E}';
begin
  varDev := DeviceID;
  dev := WIADeviceManager1.DeviceInfos.Item[varDev].Connect;
  itm := dev.GetItem(ItemID);
  img := WIACommonDialog1.ShowTransfer(itm, wiaFormatJPEG, False);
    {compilation error on above line: Incompatible types: 'OleVariant' and
'IImageFile'}
  v := img.FileData;
  Image1.Picture := v.Picture;
    {compilation error on above line: '[' expected but ';' found}
end;

Help!

Doug