Announcement

Collapse
No announcement yet.

TCP/IP

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • TCP/IP

    Hello, i wanted to know how can i access tcp/ip protocol throw the PB dos box in win95 and win98 or 2000.
    IPX routines are in every where and they dont seem to do the work i want to do, i've searched for lots of places how to access that protocol throw dos and i found only a dos program which connects the ISP and i can do a program for it but i want throw windows not throw other dos programs...
    if you have a clue or a source code to help me please post it, it will be valuable for everyone.
    and i dont mean a source code like you do
    shell "ftp XXX.XXX.XXX.XXX"
    that is NOT a direct memory access to the tcp/ip protocol
    i am searching for SUBS and FUNCTIONS from dos to use it to connect windows TCP/IP Protocol.



    -------------
    Thanks From advance
    Goldberg.

  • #2
    Goldberg --

    The basic problem is that Windows simply does not allow DOS apps to access Windows resources like TCP/IP stacks.

    The only way to do what you're describing (as far as I know) is to use an external package to provide the "hooks" that you'll need. For example, one of my commercial PB/DOS apps replies on the Novell "LAN Workplace For DOS" package to provide a DOS-compatible TCP/IP stack, and I wrote PowerBASIC functions (virtually 100% asm code) to read/write the data. (Ok, I paid a consultant to write it in asm, and just I ported it to PB/DOS asm.) To the PB/DOS program, the resulting Telnet session acts very much like a serial-port connection. Later on we were able to install the LAN Workplace For DOS in the AUTOEXEC file that is used to initialize the DOS boxes on some Win95 workstations, to make the DOS app work, but it was not easy and it required a lot of support.

    A much easier method would be to port your app to the PowerBASIC Console Compiler For Windows, which natively supports TCP.

    -- Eric

    ------------------
    Perfect Sync: Perfect Sync Development Tools
    Email: mailto:[email protected][email protected]</A>



    [This message has been edited by Eric Pearson (edited February 08, 2000).]
    "Not my circus, not my monkeys."

    Comment


    • #3
      It is possible for a DOS application to use the Windows Winsock interface to utilise TCP/IP by accessing the Winsock VXD via INT 2Fh (multiplex), function 1684h (with a VXD ID # of 003Eh). This method requires that the DOS application be run in a Windows DOS box. I used to have a link to a web page that described how to use this method, but unfortunately it was, last time I checked, no longer available. You'd really have to love DOS to want to do it this way.

      There is also the famous WATTCP C library for TCP/IP support in DOS, and you should be able to locate a copy on one of the many shareware/freeware sites. Of course, you'd have to know a fair bit about C to make any sense of it.

      As Eric has pointed out, much easier to use PB/CC.
      If you try to make something idiot-proof, someone will invent a better idiot.

      Comment


      • #4
        Indeed i can buy pbcc BUT that is all the cause! i want to program throw Dos not throw windows.
        it will be very usefull if someone can take it as a personal project and help as i know alot of people are searching for this metter and i dont know ASM lang' and if u know it well and know how to access to windows throw dos then it will help everyone including me.
        so please try it.

        ------------------
        Thanks From advance
        Goldberg.

        Comment


        • #5
          I don't currently have the time nor the motivation to develop support for TCP/IP for PB/DOS. What I and several other PB/DOS owners have done though is request that native TCP/IP support make it into the next release of PB/DOS. We live in hope.

          I did once ask the guys at MarshallSoft Computing if there were ever any chance of them producing a PB/DOS TCP/IP library, but they weren't interested.
          If you try to make something idiot-proof, someone will invent a better idiot.

          Comment


          • #6
            Hi,

            We have a TCP/IP service program supporting dosbox apps via file swapping, the speed is fairly fast, for example:

            SERVICE C:\TCP.DAT ------ a windows program
            COMAPI C:\TCP.DAT ------ dosbox support program

            then, the dosbox apps can send data via windows TCP/IP.

            Are you interested?

            mailto:[email protected][email protected]</A>

            ------------------

            Comment


            • #7
              Originally posted by ShirlunTse:
              We have a TCP/IP service program supporting dosbox apps via file swapping, the speed is fairly fast, for example:

              SERVICE C:\TCP.DAT ------ a windows program
              COMAPI C:\TCP.DAT ------ dosbox support program

              then, the dosbox apps can send data via windows TCP/IP.
              well i dont understand the way it works but if it can help me program dos programs that will access the tcp/ip protocol of windows then yes i am intersted, mail me at

              [email protected]


              ------------------
              Thanks From advance
              Goldberg.

              Comment


              • #8
                I doubt you'll get together enough (read as "several thousand") paying customers to talk any company into writing a TCP/IP stack engine for PB/DOS (or just about any existing DOS programming language).

                The INT 2Fh method described by Matthew will let you access several Windows services from a DOS application, but TCP/IP is NOT one of them.

                In Windows 95/98 you can technically write a VXD which installs an interrupt in DOS boxes that allows them to access the native Windows TCP/IP stack. But we're talking a LOT of work to do it, and not much in the way of incentive.

                Most DOS programmers who absolutely require TCP/IP support in their applications are using external stacks like the one Eric Pearson mentioned, or the one that comes with Caldera DOS.

                Several PowerBASIC programmers have informed me of their plans to make PB/DOS work with the WatComm stack, but I haven't heard anything further on that project.

                While you can never say "never", I seriously doubt that TCP/IP support will be added to PB/DOS. Too much work for too few people.

                --Dave


                ------------------
                PowerBASIC Support
                mailto:[email protected][email protected]</A>
                Home of the BASIC Gurus
                www.basicguru.com

                Comment


                • #9
                  The INT 2Fh method described by Matthew will let you access several Windows services from a DOS application, but TCP/IP is NOT one of them.
                  Dave, I have finally found a hard copy of the information that was on the site I originally mentioned. A couple of excerpts:
                  This document aims to document WSOCK.VXD's services from the point of view of accessing them from C from a DOS program running under Windows. Unfortunately, it is only currently known how to use the Winsock 1.1 version of WSOCK.VXD from a DOS box, because the same techniques seem to fail with the Winsock 2.0 version for no good reason.
                  and
                  If you are trying to access WSOCK.VXD from a DOS box, you will probably have to use some assembly language and DPMI services. (Note: I'm not sure that you must.) This is low-level programming after all, so it is pretty hairy. Familiarity with BSD sockets would probably help with the concepts of socket networking.
                  As Winsock is commonly used in Windows to access TCP/IP services, on what basis do you state that "...but TCP/IP is NOT one of them"?
                  If you try to make something idiot-proof, someone will invent a better idiot.

                  Comment


                  • #10
                    Well thank you all, but shirlun helped me .
                    i sent me a kinda server program that i need to install with the dos box and an winsock object file which let me access the server and the server access windows there for i can use tcp/ip in the dos, its and excellent program and i recommand u to dl it and use it, the transfer rate is pretty fast, its surely can be helpful to do a mail program or even a browser ALL under dos.
                    now to download it here's the link:
                    http://www.freedomized.com/idoor/pro...ip/tcpdemo.zip

                    ------------------
                    Thanks From advance
                    Goldberg.

                    Comment


                    • #11
                      While you can never say "never", I seriously doubt that TCP/IP support will be added to PB/DOS. Too much work for too few people.
                      Just curious as to how you determine that there are too few people to support the development of a feature for a future compiler release? Do you just guess that there are too few people? Do you do some sort of market research? Do you rely soley on feedback to Support and this electronic bulletin board? Once you have determined how many people want such a feature, how do you determine whether or not it is cost effective to develop it?

                      Say for example 1,000 customers said they intended to purchase PB/DOS 4, but only 50 said they were interested in it because it had native support for TCP/IP without relying on Windows. Would you not bother with TCP/IP because only 50 people were likely to use it, even though you'd sell at least 1,000 copies of the program?

                      This is not intended to be a criticism - I realise PowerBASIC has commercial realities to consider also. However, while I have been visiting this BBS, I have noted a number of occasions where customers have expressed an interest in TCP/IP support for PB/DOS, which is not likely to be indicative of the number of programmers that would actually make use of such a feature if it were included, and would be interested to know how PB justified not including it.

                      Even Sean Connery and his alter-ego JB were warned to Never Say Never Again!
                      If you try to make something idiot-proof, someone will invent a better idiot.

                      Comment


                      • #12
                        Goldberg: Early in the thread you said you did not want to use Windows... have you changed your mind? You may want to reconsider futher and take a look at PB/CC where you can write your own TCP/IP apps, and SHELL to them from your DOS code.

                        Of course, you'll need to have Windows 95 or better running, but it looks like Shirlun's code has the same considerations.


                        Matthew: The correspondence that is visible on this BBS is only a small portion of the feedback that we get from customers (both existing customers and pre-sales) - we receive a large amount of email, phone calls and faxes. This gives us a fairly extensive overview of what features are "in demand". Couple this with sales analysis, knowledge of our target market, and we start to get a clear picture of where we should be heading. Of course, If I told you any more, I'd have to shoot you.

                        I find it interesting that this BBS has a huge number of lurkers... many of these folks dont post here (a large number of them are registered, visit regularly, but never post) - however these folks read everything in sight and only communicate directly with us via email or phone. Why? Who really knows... we don't ask, but I guess commercial sensitivity plays a part.



                        ------------------
                        Lance
                        PowerBASIC Support
                        mailto:[email protected][email protected]</A>
                        Lance
                        mailto:[email protected]

                        Comment


                        • #13
                          As Winsock is commonly used in Windows to access TCP/IP services, on what basis do you state that "...but TCP/IP is NOT one of them"?
                          Because, as your own message noted, support was removed with the introduction of Winsock 2.0

                          Microsoft deliverately removed support when they updated Winsock because it didn't fully work and there were too many bugs that required fixing. Since the whole thing is technically "undocumented", they felt removing support was easier for them than fixing the problems.
                          Just curious as to how you determine that there are too few people to support the development of a feature for a future compiler release?
                          We keep every single message with features requests by our customers. TCP/IP support is low on the totem pole of what the *majority* of DOS users want.

                          While we are planning on an update of the DOS compiler, the total sales of DOS compilers today doesn't justify the effort (in my opinion) necessary for making a DOS application work with the Windows TCP/IP stack. Particularly not when you look at the amount of development effort that will be necessary to get the other, more requested, features done is pretty extensive.

                          Once again, you can never say "never". It's entirely possible that Bob and his development team will decide they want to do it anyway, if for no other reason than to prove my theories wrong.

                          PowerBASIC for DOS is still selling well (we're the only game left in town), but it's not selling nearly as well as PB/DLL or PB/CC which are constantly setting new company sales records.

                          --Dave

                          ps. Bob still has a personal "affinity" for the DOS compiler since it was "his baby" for so long. In fact, here's a bit of trivia for you. PB/DOS is the only product that is still "Copyright by Robert S. Zale". Everything else is "Copyright by PowerBASIC, Inc." PB/DOS still has a *VERY* special place in his heart.


                          ------------------
                          PowerBASIC Support
                          mailto:[email protected][email protected]</A>
                          Home of the BASIC Gurus
                          www.basicguru.com

                          Comment


                          • #14
                            Hello out there!
                            A Newbie needs help!

                            I need to access the Novell TCP stack running on a DOS-PC (not Windows Dos-Box) but I can not find any librarys or ways to get control of it.

                            Has anybody some information or ideas?



                            ------------------
                            Regards

                            Dirk Gelbrich

                            Comment


                            • #15
                              [QUOTE]Originally posted by Dave Navarro:
                              [B] [QUOTE]

                              While we are planning on an update of the DOS compiler, the total sales of DOS compilers today doesn't justify the effort (in my opinion) necessary for making a DOS application work with the Windows TCP/IP stack. Particularly not when you look at the amount of development effort that will be necessary to get the other, more requested, features done is pretty extensive.

                              PowerBASIC for DOS is still selling well (we're the only game left in town), but it's not selling nearly as well as PB/DLL or PB/CC which are constantly setting new company sales records.

                              [QUOTE]

                              Dear Dave,
                              maybe you are right with your assumptions on what's wanted and should be focussed on ...in new DOS-Compilers.
                              But let me tell you that Iam still working with PB 3.2 and TASM 5.0 together with DOS driven embedded controllers (80X86) for rapid and stable development.
                              On the other hand PB lost some people(or wasn't able to reach them), especially in the industrial section, to MS and others.
                              The MS-Windows Family has it's merits but scalability, small size and easy to calaculate and handle realtime capabilities are none of them....
                              For small stand alone, no-GUI applications I will stay with the mentioned tools .....but if your support for things like TCP/IP,
                              communication, USB won't be sufficient....WindowsCE will leave PB where you seem to see it ...hobby to semiprofessional!

                              Best regards.
                              Cheers to Bob (and thanks for his "soft spot" for DOS-PB).

                              Gerd

                              ------------------

                              Comment


                              • #16
                                Let me second Gerd's comments on this, and respectfully suggest that Bob, Dave and co. might be missing a bet here. The assumption seems to be that the desktop is the only market there is... PowerBASIC is, IMO, ideally suited for rapid development and deployment of embedded-systems programs, which are a whole different animal than the desktop for a variety of reasons. I imagine support for a TCP/IP stack in DOS would be a lot more popular than you think; it might even attract a bunch of developers in the embedded-systems camp away from the WinCE juggernaut.

                                (For the same reason, I strongly advocate a Linux port of the PowerBASIC compiler; Caldera is gearing up a Linux build specifically for embedded systems - called, naturally enough, Embeddix - and if you could be first to the gate with a tool that makes it as easy to develop embedded-Linux applications as PB/DOS makes it to develop embedded-DOS programs... If you build it, I'll certainly come, with my $100 in hand!)

                                ------------------

                                Comment


                                • #17
                                  Here's the crux of the problem, particularly with "embedded hardware" as you mention.

                                  To what hardware standard do we develop a TCP/IP stack? BASIC's strength has always been its "hardware independance".

                                  Now, you want us to enforce a particular hardware standard on you in order to support TCP/IP. Do me limit it to "modem" access? Or do we use ethernet? If we use ethernet, who's ethernet standard and chipset do we use?

                                  It's not as simple as you guys might think it is. And, *strictly in my opinion*, the high cost involved in doing research and development isn't justified considering how few people have asked us for this feature.

                                  There are a few "vocal" people such as yourselves who would really like to see this feature, but you guys are very much a minority. If there are as many people as *you believe* who want this capibility, where are they?

                                  Even if they aren't "existing" PowerBASIC customers, please have them contact us. Have them send an email message to "[email protected]" with their name, address and email address.

                                  If enough people ask for it (and I'm sorry, but I can't define "enough" for you), we'll do it.

                                  --Dave


                                  ------------------
                                  PowerBASIC Support
                                  mailto:[email protected][email protected]</A>
                                  Home of the BASIC Gurus
                                  www.basicguru.com

                                  Comment


                                  • #18
                                    Do you remember the days before Windows 95? There was no standard TCP/IP stack bundled with the operating system; you had to pay extra for it. As I recall, the shareware Trumpet stack (only worked for dial-up connections) was $25, and commercial stacks (from NetManage, ftp Software, and others) were usually in the $150 - $350 range (but supported desktop and dial-up connections). That price was per computer, not just for the developer. In other words, if you wrote software that required a TCP/IP connection, every one of your customers had to shell out a significant pile of cash for every computer that ran your software.

                                    For DOS stacks, each one had its own interrupt interface. In other words, if you wanted to support the ftp Software stack, you had to make a certain set of interrupt calls, and if you wanted to support the NetManage stack, you had to almost completely rewrite your low-level interface (sometimes different interrupts, always different register settings). What's worse, the SDKs for these products were all written for the popular C compilers. A few years ago, one of our clients hired me to rewrite the ftp Software SDK interface (for use with PowerBASIC/DOS). I translated lots of C headers, rewrote the assembler interface, and wrote "helper" functions in PowerBASIC. It was difficult work, and the code was a nightmare to debug. Fortunately, I had the SDK source code; without it, the job would have been impossible.

                                    In the Windows 3.1 world, life was easier. The TCP/IP stack vendors created a standard interface to their stacks called WINSOCK ("Windows Sockets"). Thus, the programmer made calls to WINSOCK.DLL, and the DLL handled the driver directly. It was much easier, but your customers still had to shell out the bucks to get the stacks on each computer that was going to run your program.

                                    Okay, that's the end of the ancient history lesson ("Daddy, did you really help Noah step off the ark?"). My point is this: Since Dave says you cannot use the WINSOCK 2 interface from DOS (and I have no reason to doubt him), PowerBASIC, Inc. would have to develop their own TCP/IP stack for DOS or license the technology from somebody else, and then bring it up to date (and keep it up to date). That would be an expensive proposition, in terms of both money (good programmers don't come cheap) and time (a lot of work and testing would be needed, delaying release). I, personally, would rather have a new IDE, see the PB/CC extensions to string handling and other keywords migrated to DOS, and get whatever other goodies Bob and Company have in mind (overlays, extended memory, protected mode, whatever). (If anyone from PowerBASIC, Inc. is listening, please add those items to the official wish list, if they are not already on it.)

                                    In the early 90s, companies felt they needed to charge lots of dollars for their DOS and Windows 3.1 TCP/IP stacks. That supported a large investment in development (every new network card needed new drivers) and technical support. (Ever provided technical support to non-technical Internet users? It's not a bit of fun, even using Windows' relatively easy-to-configure networking options.) Would you be willing to pay PowerBASIC, Inc. $100 - $150 for each and every computer/device your software is installed on (to cover the costs of developing, maintaining, and supporting a TCP/IP stack)? If so, Bob may listen. If all you are offering is a one-time payment of $100, that's not going to cover a lot of those development and support costs.

                                    Finally, you do have an alternative. The Waterloo TCP/IP stack for DOS, which I believe was released as freeware (what we might now call "open source"), might still be available on the Internet. The last time I saw the files, they hadn't been updated since 1993, and it only supported C (and maybe C++) compilers from that era, but if you're willing to learn and use C, track down the outdated compilers, and invest the effort to make it all work, you'll be set. And if they ever released the source to the interface modules (I don't remember if they did), you might be able to port it to PowerBASIC.

                                    (That last paragraph is not intended to be sarcastic. It is a real option, but probably not a very viable one unless you already know C, have experience doing systems level programming, and have a lot of free time.)



                                    ------------------
                                    Alan C. Earnshaw
                                    Information Management Systems, Inc.
                                    Alan C. Earnshaw
                                    Information Management Systems, Inc.
                                    http://www.infoms.com

                                    Comment


                                    • #19
                                      One more thing to add, the file shirlun sent me is amazing!
                                      i can do anything from Dos to connect the winsock dll! and
                                      do full TCP/IP connections and more.
                                      and thats all from a 40k file who is the server that connects me to windows.
                                      so maybe i am missing alot here because i am not a pro programmer but it seems easy. but another thing which is far more important from TCP/IP support in dos is THREADs
                                      because without Threads there is no reason to add TCP/IP support
                                      because you cant even do a SERVER, you need a support for lots of connections.
                                      so one more thing for the wish list is THREADING!.



                                      ------------------
                                      Thanks From advance
                                      Goldberg.

                                      Comment


                                      • #20
                                        The DOS operating system does not support threads, so there's no way for PB/DOS to support them. If you're suggesting that the PB/DOS compiler be enhanced to support a non-DOS function, for those times when programs are run under Windows, the more appropriate way to do that would be for you to use the PB/CC Console Compiler for Windows.

                                        -- Eric

                                        ------------------
                                        Perfect Sync: Perfect Sync Development Tools
                                        Email: mailto:[email protected][email protected]</A>



                                        [This message has been edited by Eric Pearson (edited April 27, 2000).]
                                        "Not my circus, not my monkeys."

                                        Comment

                                        Working...
                                        X