BulletSponge
New member
- Joined
- Jun 28, 2005
- Messages
- 3
- Programming Experience
- 3-5
Hi,
This is my first experience with VB.Net remoting, and it's great except for the fact that I'm having a horrible time trying to figure out how to watch for events that occur on the server.
I've got a Parent APP which starts a Remoting Server and I have a Client APP which accesses that Server using an Interface.
The Cleint Declares an object AS the interface like;- (Dim RServer as IRemoteInterface).
The IRemoteInterface interface object has the following declarations;
ReadOnlyProperty GetCompanyID() As Long
ReadOnlyProperty GetContactID() As Long
WriteOnlyProperty SetCompanyID() As Long
WriteOnlyProperty SetContactID() As Long
The Library used has the following;
PublicClass RemoteLib
..... Inherits MarshalByRefObject
..... Implements IRemoteDIA
..... Private m_CompanyID AsLong
..... Private m_ContactID AsLong
PublicReadOnlyProperty GetCompanyID() AsLongImplements IRemoteDIA.GetCompanyID
..... Get
.......... Return m_CompanyID
..... EndGet
EndProperty
PublicWriteOnlyProperty SetCompanyID() AsLongImplements IRemoteDIA.SetCompanyID
..... Set(ByVal t_Value As Long
.......... m_CompanyID = t_Value
..... EndSet
EndProperty
PublicReadOnlyProperty GetContactID() AsLongImplements IRemoteDIA.GetContactID
..... Get
.......... Return m_ContactID
..... EndGet
EndProperty
PublicWriteOnlyProperty SetContactID() AsLongImplements IRemoteDIA.SetContactID
..... Set(ByVal t_Value AsLong)
.......... m_ContactID = t_Value
..... EndSet
EndProperty
EndClass
In the Client app, I Declared an object and can check the values.
Dim RServer as IRemoteInterface
Console.Write RServer.GetCompany
How in the world do I get the values without using a Timed loop?
This is my first experience with VB.Net remoting, and it's great except for the fact that I'm having a horrible time trying to figure out how to watch for events that occur on the server.
I've got a Parent APP which starts a Remoting Server and I have a Client APP which accesses that Server using an Interface.
The Cleint Declares an object AS the interface like;- (Dim RServer as IRemoteInterface).
The IRemoteInterface interface object has the following declarations;
ReadOnlyProperty GetCompanyID() As Long
ReadOnlyProperty GetContactID() As Long
WriteOnlyProperty SetCompanyID() As Long
WriteOnlyProperty SetContactID() As Long
The Library used has the following;
PublicClass RemoteLib
..... Inherits MarshalByRefObject
..... Implements IRemoteDIA
..... Private m_CompanyID AsLong
..... Private m_ContactID AsLong
PublicReadOnlyProperty GetCompanyID() AsLongImplements IRemoteDIA.GetCompanyID
..... Get
.......... Return m_CompanyID
..... EndGet
EndProperty
PublicWriteOnlyProperty SetCompanyID() AsLongImplements IRemoteDIA.SetCompanyID
..... Set(ByVal t_Value As Long
.......... m_CompanyID = t_Value
..... EndSet
EndProperty
PublicReadOnlyProperty GetContactID() AsLongImplements IRemoteDIA.GetContactID
..... Get
.......... Return m_ContactID
..... EndGet
EndProperty
PublicWriteOnlyProperty SetContactID() AsLongImplements IRemoteDIA.SetContactID
..... Set(ByVal t_Value AsLong)
.......... m_ContactID = t_Value
..... EndSet
EndProperty
EndClass
In the Client app, I Declared an object and can check the values.
Dim RServer as IRemoteInterface
Console.Write RServer.GetCompany
How in the world do I get the values without using a Timed loop?