Hi All,

I've changed hb_stor* / hb_par* function calls by hb_parv* / hb_storv* in my code when they are used with extra parameters to make it work in 2.0.

Compiled fine, but application GPFs at the following function:

----------------------------------------------------------------
HB_FUNC ( ADDLISTVIEWITEMS )
{

        char *caption;
        LV_ITEM LI;
        HWND h;
        int l;
        int s;
        int c;

        h = (HWND) hb_parnl( 1 ) ;
        l = hb_parinfa( 2, 0 ) - 1 ;

        c = ListView_GetItemCount (h);
        caption [0] = 0 ;
        caption = hb_parvc ( 2 , 1 ); // <------------ CHANGED

        LI.mask=LVIF_TEXT | LVIF_IMAGE ;        
        LI.state=0;
        LI.stateMask=0;
        LI.iImage=hb_parni( 3 );        
        LI.iSubItem=0;
        LI.iItem=c;
        LI.pszText=caption;
        ListView_InsertItem(h,&LI);

        for (s = 1 ; s<=l ; s=s+1 )
        {
                caption = hb_parvc ( 2 , s + 1 ); // <---------- CHANGED
                ListView_SetItemText(h,c,s,caption);
        }

}
-------------------------------------------------------------------

hb_out.log is:

-------------------------------------------------------------------

Application Internal Error - C:\HMG30\SAMPLES\GRID.01\demo.exe
Terminated at: 2009.10.08 17:13:18
Unrecoverable error 6005: Exception error:

    Exception Code:C0000005
    Exception Address:0040CD1D
    EAX:00000000  EBX:003E89A4  ECX:00390578  EDX:00000030
    ESI:003E7ED4  EDI:00120296  EBP:0022FA38
    CS:EIP:001B:0040CD1D  SS:ESP:0023:0022F9B0
    DS:0023  ES:0023  FS:003B  GS:0000
    Flags:00010202
    CS:EIP: C6 05 00 00 00 00 00 C7 44 24 04 01 00 00 00 C7
SS:ESP: 00120296 00001004 00000000 00000000 00573130 00000000 00000000 00000002 75DB92E9 75DB9312 CD41CD68 0022FA90 0000101B 00000000 00000000 003E89A4

    C stack:
    EIP:     EBP:       Frame: OldEBP, RetAddr, Params...
0040CD1D 0022FA38 0022FA6C 0046C8AB 0022FA6C 003E89E4 003E8A04 0045FCDD 003E89E4 003E8A04 7660888D 00000024


Modules:
0x00400000 0x00181000 C:\HMG30\SAMPLES\GRID.01\demo.exe
0x77B80000 0x0013C000 C:\Windows\SYSTEM32\ntdll.dll
0x777E0000 0x000D4000 C:\Windows\system32\kernel32.dll
0x75F50000 0x0004A000 C:\Windows\system32\KERNELBASE.dll
0x75FF0000 0x000A0000 C:\Windows\system32\ADVAPI32.DLL
0x77710000 0x000AC000 C:\Windows\system32\msvcrt.dll
0x778C0000 0x00019000 C:\Windows\SYSTEM32\sechost.dll
0x766C0000 0x000A1000 C:\Windows\system32\RPCRT4.dll
0x75DA0000 0x00084000 C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7600.16385_none_ebf82fc36c758ad5\COMCTL32.DLL
0x764C0000 0x0004E000 C:\Windows\system32\GDI32.dll
0x765F0000 0x000C9000 C:\Windows\system32\USER32.dll
0x76800000 0x0000A000 C:\Windows\system32\LPK.dll
0x763C0000 0x0009D000 C:\Windows\system32\USP10.dll
0x76510000 0x0007B000 C:\Windows\system32\COMDLG32.DLL
0x76460000 0x00057000 C:\Windows\system32\SHLWAPI.dll
0x76AC0000 0x00C49000 C:\Windows\system32\SHELL32.dll
0x71920000 0x00021000 C:\Windows\system32\MSVFW32.DLL
0x74190000 0x00032000 C:\Windows\system32\WINMM.dll
0x778E0000 0x0015C000 C:\Windows\system32\OLE32.dll
0x76770000 0x0008F000 C:\Windows\system32\OLEAUT32.DLL
0x71640000 0x00051000 C:\Windows\system32\WINSPOOL.DRV
0x777C0000 0x0001F000 C:\Windows\system32\IMM32.DLL
0x76810000 0x000CC000 C:\Windows\system32\MSCTF.dll
0x75C20000 0x0000C000 C:\Windows\system32\CRYPTBASE.dll
0x74AE0000 0x00040000 C:\Windows\system32\uxtheme.dll
0x747B0000 0x00013000 C:\Windows\system32\dwmapi.dll

Called from ADDLISTVIEWITEMS(0)
Called from _ADDGRIDROW(382) in c:/hmg30/source/h_grid.prg
Called from _DEFINEGRID(313) in c:/hmg30/source/h_grid.prg
Called from MAIN(50) in demo.prg
------------------------------------------------------------------------

Any help is welcome.

TIA.

Regards,

Roberto.

_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to