Hello Pritpal, Including this in my example: (WEBEXP.PRG)
[CODE] #include "FiveWin.ch" function Main() local oWnd, oActiveX local cEvents := "" DEFINE WINDOW oWnd TITLE "FiveWin ActiveX Support" oActiveX = TActiveX():New( oWnd, "Shell.Explorer" ) oWnd:oClient = oActiveX // To fill the entire window surface // oActiveX:Do( "GoHome" ) oActiveX:Do( "Navigate", "http://www.google.com.br" ) oActiveX:SetProp( "StatusBar", .t. ) // MsgInfo( oActiveX:GetProp( "StatusBar" ) ) oActiveX:bOnEvent = { | event, aParams, pParams | cEvents += EventInfo( event, aParams, pParams, oActiveX ) } ACTIVATE WINDOW oWnd ; VALID ( MemoEdit( cEvents ), .t. ) return nil function EventInfo( event, aParams, pParams, oActiveX ) local cMsg := "Event: " + cValToChar( event ) + CRLF local n cMsg += "Params: " + CRLF for n = 1 to Len( aParams ) cMsg += cValToChar( aParams[ n ] ) + CRLF next if event == "BeforeNavigate2" // MsgInfo( aParams[ 2 ] ) // SetEventParam( pParams, 7, .t. ) // Comment this to allow navigation endif return cMsg + CRLF #ifdef __MSVC__ function OleGetProperty( hObj, cPropName ) local o := TOleAuto() local uRet o:hObj = hObj uRet = __ObjSendMsg( o, cPropName ) o:hObj = nil return uRet function OleSetProperty( hObj, cPropName, uValue ) local o := TOleAuto() local uRet o:hObj := hObj uRet := __ObjSendMsg( o, "_" + cPropName, uValue ) o:hObj := nil return uRet #ifdef __XHARBOUR__ function OleInvoke( hObj, cMethName ) #else function OleInvoke( hObj, cMethName, ... ) #endif local o := TOleAuto() local uRet o:hObj := hObj #ifdef __XHARBOUR__ uRet := o:Invoke( cMethName ) #else uRet := o:Invoke( cMethName, ... ) #endif o:hObj := nil return uRet //----------------------------------------------------------------------------// #pragma begindump #include <windows.h> #include <hbapi.h> void * hb_oleAnsiToWide( char * ); HB_FUNC( SENDWIDESTRINGMESSAGE ) { HWND hWnd = ( HWND ) hb_parnl( 1 ); char * cString = hb_parc( 4 ); void * wString = hb_oleAnsiToWide( cString ); if( IsWindow( hWnd ) || hWnd == ( HWND ) -1 || wString ) hb_retnl( SendMessage( hWnd, hb_parnl( 2 ), ( WPARAM ) hb_parl( 3 ), ( LPARAM ) wString ) ); else hb_retnl( 0 ); hb_xfree( wString ); } #pragma enddump #endif #pragma begindump #include <windows.h> #include <hbapi.h> HB_FUNC( OLECREATEOBJECT ) /* ( cOleName | cCLSID [, cIID ] ) */ { wchar_t* cCLSID; GUID ClassID, iid; BOOL fIID = FALSE; IDispatch* pDisp = NULL; IDispatch** ppDisp; const char* cOleName = hb_parc( 1 ); const char* cID = hb_parc( 2 ); HRESULT lOleError; if( HB_IS_NUMBER( 1 ) ) { IDispatch * pDisp = ( IDispatch * ) ( HB_PTRDIFF ) hb_parnint( 1 ); lOleError = pDisp->lpVtbl->AddRef( pDisp ); hb_setOleError( lOleError ); if( lOleError == S_OK ) { hb_retnint( ( HB_PTRDIFF ) hb_param( 1, HB_IT_ANY ) ); } else hb_ret(); } else if( cOleName ) { cCLSID = AnsiToWide( cOleName ); if( cOleName[ 0 ] == '{' ) lOleError = CLSIDFromString( (LPOLESTR) cCLSID, &ClassID ); else lOleError = CLSIDFromProgID( (LPCOLESTR) cCLSID, &ClassID ); hb_xfree( cCLSID ); if( cID ) { if( cID[ 0 ] == '{' ) { cCLSID = AnsiToWide( cID ); lOleError = CLSIDFromString( (LPOLESTR) cCLSID, &iid ); hb_xfree( cCLSID ); fIID = TRUE; } else if( hb_parclen( 2 ) == ( ULONG ) sizeof( iid ) ) { memcpy( (LPVOID) &iid, cID, sizeof( iid ) ); fIID = TRUE; } } if( lOleError == S_OK ) lOleError = CoCreateInstance( HB_ID_REF( ClassID ), NULL, CLSCTX_SERVER, fIID ? HB_ID_REF( iid ) : HB_ID_REF( IID_IDispatch ), ( void** ) ( void * ) &pDisp ); } else lOleError = CO_E_CLASSSTRING; hb_setOleError( lOleError ); if( lOleError == S_OK ) { ppDisp = ( IDispatch** ) hb_gcAlloc( sizeof( IDispatch* ), hb_ole_destructor ); *ppDisp = pDisp; hb_retptrGC( ppDisp ); } else hb_ret(); } #pragma enddump [ENDCODE] ...and generate this errors: [ERRORS] ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ FiveWin for Harbour 9.02 - Feb. 2009 Harbour development power ³Ü ³ (c) FiveTech, 1993-2009 for Microsoft Windows 9X/NT/200X/ME/XP/Vista/7 ³Û ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛ ÿ ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß Compiling... Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland WEBEXP.c: Warning W8065 webexp.prg 139: Call to function 'hb_setOleError' with no prototype in function HB_FUN_OLECREATEOBJECT Warning W8065 webexp.prg 149: Call to function 'AnsiToWide' with no prototype in function HB_FUN_OLECREATEOBJECT Warning W8069 webexp.prg 149: Nonportable pointer conversion in function HB_FUN_OLECREATEOBJECT Warning W8065 webexp.prg 160: Call to function 'AnsiToWide' with no prototype in function HB_FUN_OLECREATEOBJECT Warning W8069 webexp.prg 160: Nonportable pointer conversion in function HB_FUN_OLECREATEOBJECT Warning W8065 webexp.prg 173: Call to function 'HB_ID_REF' with no prototype in function HB_FUN_OLECREATEOBJECT Warning W8065 webexp.prg 173: Call to function 'HB_ID_REF' with no prototype in function HB_FUN_OLECREATEOBJECT Warning W8065 webexp.prg 173: Call to function 'HB_ID_REF' with no prototype in function HB_FUN_OLECREATEOBJECT Error E2342 webexp.prg 173: Type mismatch in parameter 'rclsid' (wanted 'const _GUID * const', got 'int') in function HB_FUN_OLECREATEOBJECT Error E2342 webexp.prg 173: Type mismatch in parameter 'riid' (wanted 'const _GUID * const', got 'int') in function HB_FUN_OLECREATEOBJECT Warning W8065 webexp.prg 178: Call to function 'hb_setOleError' with no prototype in function HB_FUN_OLECREATEOBJECT Error E2451 webexp.prg 181: Undefined symbol 'hb_ole_destructor' in function HB_FUN_OLECREATEOBJECT Warning W8004 webexp.prg 187: 'fIID' is assigned a value that is never used in function HB_FUN_OLECREATEOBJECT *** 3 errors in Compile *** Borland Resource Compiler Version 5.40 Copyright (c) 1990, 1999 Inprise Corporation. All rights reserved. Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland * Application successfully built * [ENDERRORS] Any more suggestions ? Best Regards, Rossine. -- View this message in context: http://www.nabble.com/Errors-with-11032-tp23521549p23539642.html Sent from the Harbour - Dev mailing list archive at Nabble.com. _______________________________________________ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour