Click here to Skip to main content
15,926,035 members
Home / Discussions / C#
   

C#

 
GeneralRe: Custom web control Pin
Rocky Moore25-Jun-02 17:10
Rocky Moore25-Jun-02 17:10 
GeneralTimeZone Pin
Chris Melinn25-Jun-02 13:45
Chris Melinn25-Jun-02 13:45 
GeneralRe: TimeZone Pin
Chris Rickard25-Jun-02 14:58
Chris Rickard25-Jun-02 14:58 
GeneralResource files and user types Pin
25-Jun-02 0:18
suss25-Jun-02 0:18 
GeneralRe: Resource files and user types Pin
Chris Rickard26-Jun-02 4:41
Chris Rickard26-Jun-02 4:41 
GeneralThanks! Pin
3-Jul-02 7:32
suss3-Jul-02 7:32 
GeneralUsing Interfaces with .NET Remoting Pin
tmagoo24-Jun-02 19:34
tmagoo24-Jun-02 19:34 
GeneralRe: Figured it out Using Interfaces with .NET Remoting Pin
tmagoo25-Jun-02 18:38
tmagoo25-Jun-02 18:38 
After many hours of banging my head, I finally realized that the interface should of belonged to the class Entry point. Once I did this, I was able to do what I wanted. Here is a tidbit of the code I used.

using System;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Tcp;
using RemoteInterfacecls; //Code not proviced at this time
using System.Runtime.Serialization;

namespace RemotingInterfaceServer
{

public class dataStuff
{
public byte [] mystuff;
}

public class EntryPoint
{

dataStuff dS = new dataStuff();

public static void Main(string[] args)
{

//Here is the initializaton
ds.mystuff = System.Text.Encoding.ASCII.GetBytes("This is a test");

TcpServerChannel channel = new TcpServerChannel(2566);
ChannelServices.RegisterChannel(channel);
RemotingConfiguration.RegisterWellKnownServiceType(
typeof(RemoteExample),
"RemoteExample", WellKnownObjectMode.SingleCall);
System.Console.WriteLine("Hit Key to Exit");
System.Console.ReadLine();
}

public class RemoteExample : MarshalByRefObject, IRemoteExample
{
public RemotingExample()
{
Console.WriteLine("Constructor Called ");
}

public IByteArray GetByteArray()
{
ByteArray byteArray;

byteArray.bytesRead = dS.mystuff;
return (IByteArray)byteArray;
}

}

[Serializable]
public class ByteArray : MarshalByRefObject, IByteArray
{
public byte [] bytesRead;

}

}

}

Tom McDaniel
GeneralRan into a problem Pin
Brian Olej24-Jun-02 12:11
Brian Olej24-Jun-02 12:11 
GeneralRe: Ran into a problem Pin
Rama Krishna Vavilala24-Jun-02 12:29
Rama Krishna Vavilala24-Jun-02 12:29 
GeneralRe: Ran into a problem Pin
Brian Olej24-Jun-02 12:33
Brian Olej24-Jun-02 12:33 
GeneralCopying object data Pin
Zombies with Coffee, LLC24-Jun-02 9:49
professionalZombies with Coffee, LLC24-Jun-02 9:49 
GeneralRe: Copying object data Pin
Chris Rickard25-Jun-02 14:19
Chris Rickard25-Jun-02 14:19 
GeneralRe: Copying object data Pin
Zombies with Coffee, LLC25-Jun-02 16:50
professionalZombies with Coffee, LLC25-Jun-02 16:50 
GeneralRe: Copying object data Pin
Chris Rickard26-Jun-02 4:11
Chris Rickard26-Jun-02 4:11 
GeneralRe: Copying object data Pin
Zombies with Coffee, LLC26-Jun-02 4:19
professionalZombies with Coffee, LLC26-Jun-02 4:19 
GeneralPassing a ref of a form Pin
24-Jun-02 9:29
suss24-Jun-02 9:29 
GeneralRe: Passing a ref of a form Pin
Chris Rickard24-Jun-02 9:37
Chris Rickard24-Jun-02 9:37 
GeneralWhat about now?? Pin
24-Jun-02 10:53
suss24-Jun-02 10:53 
GeneralRe: What about now?? Pin
Chris Rickard24-Jun-02 12:41
Chris Rickard24-Jun-02 12:41 
GeneralHi again >:) Pin
24-Jun-02 23:58
suss24-Jun-02 23:58 
GeneralI've got it Pin
25-Jun-02 0:22
suss25-Jun-02 0:22 
GeneralDockStyle and MdiChild windows Pin
23-Jun-02 23:47
suss23-Jun-02 23:47 
GeneralRe: DockStyle and MdiChild windows Pin
Rüpel23-Jun-02 23:53
Rüpel23-Jun-02 23:53 
GeneralFirst time to use oledbconnection, but I failed. :( Pin
Feng Qin23-Jun-02 21:40
Feng Qin23-Jun-02 21:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.