Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 371733
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T14:08:34+00:00 2026-05-12T14:08:34+00:00

NetFoss requires you to run it with a command line similar to this: nf.bat

  • 0

NetFoss requires you to run it with a command line similar to this:

nf.bat /n[#] /h[#] [command line]
where /n[#] is a node number and /h[#] is an OS socket handle.

I want to write something in C# very similar to what a telnet BBS would do when it runs door games. It should accept the client socket, gather a bit of information passed into it from the client, then pass the socket over to NetFoss to be used to run a DOS based application that supports communications via a fossil driver.

I honestly was just guessing about how to go about this, and here’s what I came up with:

class Program
{
    const int BACKLOG_SIZE = 20;

    static void Main(string[] args)
    {
        Socket server = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
        server.Bind(new IPEndPoint(IPAddress.Any, 3102));
        server.Listen(BACKLOG_SIZE);
        while (true)
        {
            Socket socket = server.Accept();

            Process p = new Process();
            p.EnableRaisingEvents = false;
            p.StartInfo.FileName = @"c:\netfoss\nf.bat";
            p.StartInfo.Arguments = @"/n1 /h" + socket.Handle + @" c:\game\game.bat 1";
            p.StartInfo.WorkingDirectory = "c:\netfoss";
            p.StartInfo.UseShellExecute = false;
            p.Start();
        }
    }
}

Interestingly enough, the application that NetFoss is running via game.bat is being output to the C# application’s console window but not the telnet client, and even more interesting is that the telnet client DOES receive the initial NetFoss message that shows it is able to communicate with the socket. So, why is the application that is passed to NetFoss outputting to my console window instead of the telnet client?

Anyone know what I’m missing?

EDIT:

I forgot to mention that I also tried setting UseShellExecute to TRUE, and this throws a NetFoss error saying that it is an invalid handle. From my understanding, I would have to duplicate the handle in some way so that the unmanaged application can access it? Is there any way to accomplish what I’m trying to do using C#?

Thanks,
Marc

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T14:08:34+00:00Added an answer on May 12, 2026 at 2:08 pm

    It is normal that the DOS application outputs to your console window, but it should also output to the telnet client.

    Since you are seeing the initial NetFoss version message in your telnet client, we know that the socket handle is being sucesfully passed to NetFoss… So it sounds like the problem is that your DOS application is not FOSSIL aware, or is not currently configured to use a FOSSIL or an INT14h communications method.

    Regards, Mike
    NetFoss developer

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.