Files
harbour-core/contrib/hbwin/tests/oletst4.prg
Viktor Szakats 58faf91453 2016-01-14 19:17 UTC+0100 Viktor Szakats (vszakats users.noreply.github.com)
* *
    % remove brandings and homepage [1] from copyright header. Pass 1 - using script.
      [1] nobody has access to it anymore AFAIK - and it's also just
          a redirect since long
    ! update url in copyright header
    ; this should make the diff between 3.4 and 3.2 easier to manage
2016-01-14 19:18:17 +01:00

46 lines
1.2 KiB
Plaintext

/*
* demonstration/test client code for OLE server returning to client
* HVM objects as OLE object. It's also test for parameters
* passed by reference.
*
* Copyright 2010 Przemyslaw Czerpak <druzus / at / priv.onet.pl>
*/
#require "hbwin"
PROCEDURE Main()
LOCAL oObject, oTime, oInfo
LOCAL p1, p2, p3, p4, p5, p6, p7
oObject := win_oleCreateObject( "MyOleObjServer" )
IF ! Empty( oObject )
oTime := oObject:timer()
? "TIMER:"
? " date:", oTime:date
? " time:", oTime:time
? " now:", oTime:now
oInfo := oObject:info()
? "INFO:"
? " os:", oInfo:os
? " ver:", oInfo:ver
? " compiler:", oInfo:compiler
? " build:", oInfo:build
?
? "REF:", oObject:ref( @p1, @p2, @p3, @p4, @p5, @p6, @p7 )
? " p1:", hb_ValToExp( p1 )
? " p2:", hb_ValToExp( p2 )
? " p3:", hb_ValToExp( p3 )
? " p4:", hb_ValToExp( p4 )
? " p5:", p5:className() // hb_ValToExp( p5 )
? " p6:", hb_ValToExp( p6 )
? " p7:", hb_ValToExp( p7 )
ELSE
? "Can not access 'MyOleObjServer' OLE server."
ENDIF
WAIT
RETURN