2009-06-17 00:05 UTC+0300 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt)

* harbour/contrib/hbwin/axcore.c
    ! fixed GPF on ActiveX application exit caused by invalid 
      AtlAxWinTerm() call.
    ; It's inline function and it does not exists in atl.dll
    ; MSDN says:
      When Do I Need to Call AtlAxWinTerm?

      AtlAxWinTerm unregisters the "AtlAxWin7" window class. You should 
      call this function... If don't call this function, the window class 
      will be unregistered automatically when the process terminates.
    ; Thanks Toninho for self contained 3 lines GPF sample without 
      FWH, gtwvg, etc!
This commit is contained in:
Mindaugas Kavaliauskas
2009-06-16 21:10:31 +00:00
parent e0a765783e
commit 102d43358c
2 changed files with 16 additions and 7 deletions

View File

@@ -17,6 +17,20 @@
past entries belonging to author(s): Viktor Szakats.
*/
2009-06-17 00:05 UTC+0300 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt)
* harbour/contrib/hbwin/axcore.c
! fixed GPF on ActiveX application exit caused by invalid
AtlAxWinTerm() call.
; It's inline function and it does not exists in atl.dll
; MSDN says:
When Do I Need to Call AtlAxWinTerm?
AtlAxWinTerm unregisters the "AtlAxWin7" window class. You should
call this function... If don't call this function, the window class
will be unregistered automatically when the process terminates.
; Thanks Toninho for self contained 3 lines GPF sample without
FWH, gtwvg, etc!
2009-06-16 18:39 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* include/hbextern.ch
+ Added HB_WAEVAL().

View File

@@ -60,12 +60,10 @@
#endif
typedef BOOL ( CALLBACK * PHB_AX_WININIT )( void );
typedef BOOL ( CALLBACK * PHB_AX_WINTERM )( void );
typedef HRESULT ( CALLBACK * PHB_AX_GETCTRL )( HWND, IUnknown** );
static HMODULE s_hLib = NULL;
static PHB_AX_WINTERM s_pAtlAxWinTerm = NULL;
static PHB_AX_GETCTRL s_pAtlAxGetControl = NULL;
@@ -75,10 +73,7 @@ static void hb_ax_exit( void* cargo )
if( s_hLib )
{
( *s_pAtlAxWinTerm )();
s_pAtlAxWinTerm = NULL;
s_pAtlAxWinTerm = NULL;
s_pAtlAxGetControl = NULL;
FreeLibrary( s_hLib );
@@ -100,8 +95,8 @@ static int hb_ax_init( void )
return 0;
}
pAtlAxWinInit = ( PHB_AX_WININIT ) GetProcAddress( s_hLib, HBTEXT( "AtlAxWinInit" ) );
s_pAtlAxWinTerm = ( PHB_AX_WINTERM ) GetProcAddress( s_hLib, HBTEXT( "AtlAxWinTerm" ) );
s_pAtlAxGetControl = ( PHB_AX_GETCTRL ) GetProcAddress( s_hLib, HBTEXT( "AtlAxGetControl" ) );
if( pAtlAxWinInit )
( *pAtlAxWinInit )();