in

Data Techniques Online Forums

Getting runtime error -2147417848 while assigning value to hImageData.

Last post 06-04-2007 11:13 AM by ashwin. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 06-04-2007 11:13 AM

    • ashwin
    • Not Ranked
    • Joined on 06-04-2007
    • Posts 1

    Getting runtime error -2147417848 while assigning value to hImageData.

    I Have a VB project which reads 5 images before in hand when the first image is loaded. i.e. we have something like lookadead.

    Now while loading the image using ImageControl Version 8.31 i am getting an runtime error: -2147417848.

    To read the 5 images i am using a For loop

    for intcounter=1 to 5

    LoadImage

    Next

     

    LoadImage code is specified below: 

    LoadImage(pobjImageControl As Object)

    .

    .

    .

    Call ReadImageFile()

    .

    .

    With pobjImageControl
        .Visible = False
        .AutoScale = 2
        .Tag = PackTag(udtTag)
        .ImageDataSize = mlngCurrentLength
        .hImageData = mlngBufferHandle
        .Refresh
    End With
     
     
     
    In ReadImageFile i'll compute mlngCurrentLength from the recordset and mlngBufferHandle by calling GlobalAlloc.
     
    Now while reading the images, we are sometimes getting while reading the first image only and sometimes at various other incounter's.
    I can't debug the code also after getting the error since it's thrown by VB6 engine.
     
    The place where it throws the error is while assigning the "mlngBufferHandle" to pobjImageControl.hImageData.
     
    The same code works for ImageMan version 7 whereas its not working for Version 8.
     
    Please can anyone shed some light on it.
Page 1 of 1 (1 items)
Copyright 2007 Data Techniques, Inc. All Rights Reserved.