* *
% 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
40 lines
931 B
Plaintext
40 lines
931 B
Plaintext
/*
|
|
* demonstration/test code for NETIO-RPC OLE server client
|
|
*
|
|
* Copyright 2010 Przemyslaw Czerpak <druzus / at / priv.onet.pl>
|
|
*
|
|
*/
|
|
|
|
#require "hbwin"
|
|
|
|
#define NETSERVER "127.0.0.1"
|
|
#define NETPORT 2941
|
|
#define NETPASSWD "topsecret"
|
|
|
|
PROCEDURE Main()
|
|
|
|
LOCAL oObject
|
|
|
|
oObject := win_oleCreateObject( "MyOleRPCServer" )
|
|
|
|
IF ! Empty( oObject )
|
|
IF oObject:connect( NETSERVER, NETPORT,, NETPASSWD )
|
|
? "Connected to the server:", NETSERVER
|
|
/* execute some functions on the server side and display
|
|
* the results.
|
|
*/
|
|
? oObject:Upper( "hello world !!!" )
|
|
? "SERVER DATE:", oObject:Date()
|
|
? "SERVER TIME:", oObject:Time()
|
|
? "SERVER DATETIME:", oObject:hb_DateTime()
|
|
ELSE
|
|
? "Cannot connect to the server:", NETSERVER
|
|
ENDIF
|
|
ELSE
|
|
? "Can not access 'MyOleRPCServer' OLE server."
|
|
ENDIF
|
|
|
|
WAIT
|
|
|
|
RETURN
|