Error TIMAGE:_HDIB

Error TIMAGE:_HDIB

Postby dutch » Sun Oct 12, 2008 3:32 am

Dear Antonio,

I found this error in one my client's network W2003R2. I didn't found this error before and in other computer or network have no problem. I've found in Basil forum but I cannot read Spanish.

I use Clipper 5.2e/FW2.5/Blinker 7.0

Code: Select all  Expand view  RUN
   Error description: Error Objects/6  No Exp. Method: TIMAGE:_HDIB

Stack Calls
===========
   Called from LOCKERRHAN(0)
   Called from (b)INITHANDL$(0)
   Called from TIMAGE:_HDIB(0)
   Called from TIMAGE:NEW(55)


Thanks&regards,
Dutch
User avatar
dutch
 
Posts: 1542
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Postby Antonio Linares » Sun Oct 12, 2008 8:43 am

Dutch,

Please check that your Class TImage (or TBitmap) has a DATA hDib.

Also notice that in more recent FW builds, such DATA was removed.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42113
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby dutch » Sun Oct 12, 2008 3:10 pm

Dear Antonio,

I've modified TImage with new data.
It's fixed it

Thanks&regards,
Dutch
User avatar
dutch
 
Posts: 1542
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Postby Softlog86 » Wed Dec 10, 2008 2:40 pm

Hello , Friends !

I'm insert string : DATA hDib into file IMAGE.PRG ..... complile by CLIPPER 5.3 .... Linking ..... but have error :

No Exp Method TIMAGE:HBITMAP .....

Please give me good IMAGE.PRG file !!!
Softlog86
 
Posts: 4
Joined: Mon Dec 01, 2008 2:06 pm

Postby Antonio Linares » Wed Dec 10, 2008 2:55 pm

You should include:

DATA hBitmap

what FiveWin version are you using ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42113
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Softlog86 » Thu Dec 11, 2008 10:15 am

Version ..... :) ?

Installed 2.1
upgraded to 2.1B ---> 2.1C .... But I dont't know how check version ...

FIVE.LIB 1061463 bytes
FIVEC.LIB 449021 bytes .....



Antonio !
I'm change IMAGE.PRG :

....................


Freeimage.DLL only for 32 bit app ???


CLASS TImage FROM TBitmap

DATA nProgress

DATA hBitmap (<----- New string

DATA hDib (<---- New string

DATA hPalette (<----- New String

CLASSDATA lRegistered AS LOGICAL

METHOD New( nTop, nLeft, nWidth, nHeight, cResName, cBmpFile, lNoBorder,;
oWnd, bLClicked, bRClicked, lScroll, lStretch, oCursor,;
cMsg, lUpdate, bWhen, lPixel, bValid, lDesign ) CONSTRUCTOR

************************************

But new collision : MSGSTOP : Cannot load FREEIMAGE.DLL . This file in CURRENT directory !!!!!
Softlog86
 
Posts: 4
Joined: Mon Dec 01, 2008 2:06 pm

Postby dutch » Fri Dec 12, 2008 10:47 pm

let see this code.
Code: Select all  Expand view  RUN
#include "FiveWin.ch"

#define CBM_INIT 4    // for freeimage.dll

#define DIB_RGB_COLORS 0 // for freeimage.dll

STATIC hLib              // for freeimage.dll

FUNCTION SaveImage( cFile )
LOCAL nFormat, hDib, hInfoH, hInfo, hBits, hWnd, hDC, hBmp, lOk

#ifdef __CLIPPER__
    hLib = LOADLIB32( "freeimage.dll" )
#else
    hLib = LOADLIBRARY( "freeimage.dll" )
#endif

    if hLib <= 32
        MsgStop( "Cannot load FreeImage.dll" )
        return 0
    endif

    nFormat := FIGETFILETYPE( cFile, 0 )
    hDib    := FILOAD( nFormat, cFile, 0 )
    hInfoH  := FIGETINFOHEADER( hDib )
    hInfo   := FIGETINFO( hDib )
    hBits   := FIGETBITS( hDib )
    hWnd    := GETDESKTOPWINDOW()

#ifdef __CLIPPER__
    hDC = GETDC32( hWnd )
#else
    hDC = GETDC( hWnd )
#endif

lOk := FISAVE( 2 , hDib, cFile )

hBmp = CREATEDIBITMAP( hDC, hInfoH, CBM_INIT, hBits, hInfo, DIB_RGB_COLORS )

#ifdef __CLIPPER__
    RELEASEDC32( hWnd, hDC )
#else
    RELEASEDC( hWnd, hDC )
#endif

FIUNLOAD( hDib )

#ifdef __CLIPPER__
    FREELIB32( hLib )
#else
    FREELIBRARY( hLib )
#endif
RETURN hBmp

DLL32 STATIC FUNCTION FIGETFILETYPE( cFileName AS LPSTR, nSize AS LONG ) AS LONG;
      PASCAL FROM "_FreeImage_GetFileType@8" LIB hLib

DLL32 STATIC FUNCTION FILOAD( nFormat AS LONG, cFileName AS LPSTR, nFlags AS LONG ) AS LONG;
      PASCAL FROM "_FreeImage_Load@12" LIB hLib

DLL32 STATIC FUNCTION FIUNLOAD( hDib AS LONG ) AS VOID;
      PASCAL FROM "_FreeImage_Unload@4" LIB hLib

DLL32 STATIC FUNCTION FIGETINFOHEADER( hDib AS LONG ) AS LONG;
      PASCAL FROM "_FreeImage_GetInfoHeader@4" LIB hLib

DLL32 STATIC FUNCTION FIGETINFO( hDib AS LONG ) AS LONG;
      PASCAL FROM "_FreeImage_GetInfo@4" LIB hLib

DLL32 STATIC FUNCTION FIGETBITS( hDib AS LONG ) AS LONG;
      PASCAL FROM "_FreeImage_GetBits@4" LIB hLib

DLL32 STATIC FUNCTION FISAVE( nFormat AS LONG, hDib AS LONG, cFileName AS LPSTR, nFlags AS LONG ) AS BOOL;
      PASCAL FROM "_FreeImage_Save@16" LIB hLib

DLL32 STATIC FUNCTION GETDC32( hWnd AS LONG ) AS LONG;
      PASCAL FROM "GetDC" LIB "user32.dll"

DLL32 STATIC FUNCTION RELEASEDC32( hWnd AS LONG ) AS LONG;
      PASCAL FROM "ReleaseDC" LIB "user32.dll"

DLL32 STATIC FUNCTION CREATEDIBITMAP( hDC AS LONG, hInfoH AS LONG, nFlags AS LONG, hBits AS LONG, hInfo AS LONG, nUsage AS LONG ) AS LONG;
      PASCAL FROM "CreateDIBitmap" LIB "gdi32.dll"

DLL32 FUNCTION WOWHANDLE16( nHandle AS LONG, nHandleType AS LONG ) AS LONG;
      PASCAL FROM "WOWHandle16" LIB "wow32.dll"
User avatar
dutch
 
Posts: 1542
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Postby Antonio Linares » Sat Dec 13, 2008 12:31 am

Are you using FWH 32 bits or FW 16 bits ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42113
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Softlog86 » Tue Dec 16, 2008 8:27 am

I'm use FW for CLIPPER (2.1) (16 bit ? :) )
Softlog86
 
Posts: 4
Joined: Mon Dec 01, 2008 2:06 pm

Postby Antonio Linares » Tue Dec 23, 2008 8:13 am

Thats an old version. You should upgrade to a more recent FW build.

Our best advise is that you migrate your app to 32 bits using Harbour/xHarbour and FWH.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42113
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Softlog86 » Wed Dec 24, 2008 9:28 am

I don't have any FW for Harbour distributives ..... Do you help me for this problem ? I'm write NOT commercial software ..... Programming is my hobby :)
Softlog86
 
Posts: 4
Joined: Mon Dec 01, 2008 2:06 pm

Postby Antonio Linares » Wed Dec 24, 2008 10:39 am

FiveWin is a commercial product.

You can order it from www.fivetechsoft.com purchase section, thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42113
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for CA-Clipper

Who is online

Users browsing this forum: No registered users and 5 guests