Author | Topic: C# Class and Xbase++ exe/dll | |
---|---|---|
Anand Gupta | C# Class and Xbase++ exe/dll on Tue, 25 Nov 2003 18:40:58 +0530 A client (rather a developer) want me to develop a tool, where he could call that from his C# app. Can he call an Xbase++ EXE file or an xBase ++ DLL (am sure this isnt possible)... Which could be the best way to go about it ? Anand | |
Michael Hoffmann | Re: C# Class and Xbase++ exe/dll on Tue, 25 Nov 2003 14:49:27 +0100 Hello Anand, have a look at the Aerver Demo that can be downloaded at www.comparcomputer.com/download. Kind regards, Michael. | |
Phil Ide | Re: C# Class and Xbase++ exe/dll on Tue, 25 Nov 2003 13:58:33 +0000 Anand, > A client (rather a developer) want me to develop a tool, where he could call > that from his C# app. > Can he call an Xbase++ EXE file or an xBase ++ DLL (am sure this isnt > possible)... > > Which could be the best way to go about it ? It depends on what you want to happen. You could set an Xbase++ app running somewhere (possibly as a service), and the client application can connect to it via tcp/ip or SOAP, and pass a request to perform an action on some data. A SOAP server is designed specifically with this in mind, and C# can handle SOAP messages, so that sounds like an ideal mix. The SOAP server can then pass it's results back to the client application as the SOAP response message. The easiest way to setup a SOAP server is using Boris' Xb2.NET library. If you don't want to use SOAP, you can create an application which listens on a port for a connection and retrieves data somewhat similar to the way dbfServer does it: Incoming data packet structure: Len (N) - Length of rest of data packet FName (C) - Name of function to call (fixed length right padded e.g. 25 chars) PCount (N)- number of parameters PBlock - one block per parameter PBlock structure: Type (C) - 1 byte stating type of parameter (LONG,CHAR etc.) Len (N) - length of parameter data data (X) - parameter data Note that vars of type (N) are LONG numerics converted to binary format (that's not base2) using L2Bin(). Using this method, you can pass in an indefinite number of parameters. Using SOAP would bemuch easier Regards Phil Ide *************************************** * Xbase++ FAQ, Libraries and Sources: * * goto: http://www.idep.org.uk/xbase * *************************************** Ultimate oxymoron: "Cash Surplus" | |
Anand Gupta | Re: C# Class and Xbase++ exe/dll on Tue, 25 Nov 2003 19:39:04 +0530 Hi Phil Thanks much for this reply. Will try to convince the client both ways. However, the problem is that the client is running his webapp on a Linux Box. Am yet to speak to client (waiting for US to wake up All they wrote that they want a C# class to interface with a Client (written in Xbase) developed by us, which is interfaced (majorly thru LoadFromUrl()) to a Server side application (written in FlagShip, as their webserver was a Linux one).... Lets hope I manage to convince them to set up a Windows server. Atleast I would be able to take handson with SOAP, finalllllly But still, (as am completely unaware on how a .NET program work), can a .NET program call an usual binary (.EXE file, typically an xbase++ exe file?) Anand "Phil Ide" <phil@idep.org.uk> wrote in message news:17ayavyjlb14b$.dlg@idep.org.uk... > Anand, > > > A client (rather a developer) want me to develop a tool, where he could call > > that from his C# app. > > Can he call an Xbase++ EXE file or an xBase ++ DLL (am sure this isnt > > possible)... > > > > Which could be the best way to go about it ? > > It depends on what you want to happen. > > You could set an Xbase++ app running somewhere (possibly as a service), and > the client application can connect to it via tcp/ip or SOAP, and pass a > request to perform an action on some data. > > A SOAP server is designed specifically with this in mind, and C# can handle > SOAP messages, so that sounds like an ideal mix. The SOAP server can then > pass it's results back to the client application as the SOAP response > message. <snip> | |
Boris Borzic | Re: C# Class and Xbase++ exe/dll on Tue, 25 Nov 2003 16:09:38 +0100 "Anand Gupta" <ag@coralindia.com> wrote in news:3fc360e5@asgcom.alaska- software.com: > Thanks much for this reply. Will try to convince the client both ways. > However, the problem is that the client is running his webapp on a Linux > Box. It makes no difference where your client is running his webapp or the C# app. The only thing that is important is for the C# app to be able to connect to your Xbase++ SOAP app using TCP/IP. In this particular case, I don't think there is any need for your client to convert his webapp to Xbase++. You can just write a new Xbase++ app that exposes the required functions through SOAP. Best regards, Boris Borzic http://www.Xb2.NET http://www.SQLExpress.net industrial strength Xbase++ development tools | |
Anand Gupta | Re: C# Class and Xbase++ exe/dll on Wed, 26 Nov 2003 12:04:33 +0530 THanks Boris for replying. I was little skeptical earlier, but now pretty clear. Will be submitting a proposal to the client today. I hope it gets thru. Thanks once again. Anand "Boris Borzic" <boris@nospam.com> wrote in message news:Xns943E67F6A9D51SQLExpress@195.125.199.77... > "Anand Gupta" <ag@coralindia.com> wrote in news:3fc360e5@asgcom.alaska- > software.com: > > > Thanks much for this reply. Will try to convince the client both ways. > > However, the problem is that the client is running his webapp on a Linux > > Box. > > It makes no difference where your client is running his webapp or the C# > app. The only thing that is important is for the C# app to be able to > connect to your Xbase++ SOAP app using TCP/IP. <snip> | |
Phil Ide | Re: C# Class and Xbase++ exe/dll on Tue, 25 Nov 2003 15:29:04 +0000 Anand, > But still, (as am completely unaware on how a .NET program work), can a .NET > program call an usual binary (.EXE file, typically an xbase++ exe file?) There is a slight confusion here. Xb2.NET is definitely NOT a .NET library - it is a NETworking library. From the docs: xbSocket Complete object-oriented sockets library that provides a protocol-independent base for developing virtually any kind of communications software. xbServer (derived from: xbSocket, Thread) A generic protocol-independent server that can be easily configured for a variety of Telnet applications. xbHTTPServer (derived from: xbServer) A powerful object-oriented HTTP 1.1 web and SOAP server that is build right into your Xbase++ application. No need to configure and manage complex 3P web servers, gateways and CGI scripts. Your Xbase++ program is the server! xbSocketThread (derived from: xbSocket, Thread) This is the client thread that is spawned by xbServer when a connection with a peer is accepted. This "worker" thread will handle the request and send a response back to the connected client. xbHTTPThread (derived from: xbSocket, Thread) This is the client thread that is spawned by xbHTTPServer when a connection is accepted from a user agent (a browser). This "worker" thread is responsible for handling the client request and generating an appropriate xbHTTPResponse that will be sent back to the client. xbHTTPMessage An abstract class for composing and parsing HTTP messages. xbHTTPRequest (derived from: xbHTTPMessage, xbURI) Client side: Compose HTTP request and send to HTTP server. Server side: Parse HTTP request received from client. xbHTTPResponse (derived from: xbHTTPMessage) Client side: Parse HTTP response received from server. Server side: Compose HTTP response and send to client. xbSession HTTP by nature is stateless and in itself provides limited session management capability. This class simplifies session management and provides the ability of saving persistent data across multiple HTTP requests. Sessions are automatically managed by the xbHTTPServer class. xbURI Create, parse, encode and decode RFC compliant URI and URL strings. xbFORM This class represents a url-encoded form. The form typically contains data expressed as "name=value" pairs, encoded for safe transport over the net. This class allows you to parse an existing form as well as create a brand new form. xbSOAPEnvelope This class provides the code necessary to generate and parse SOAP messages. SOAP is a remote procedure calling protocol that encodes requests and responses in XML format. Using SOAP a client can execute methods or functions on a server and receive an XML response containing the return values. Phil Ide *************************************** * Xbase++ FAQ, Libraries and Sources: * * goto: http://www.idep.org.uk/xbase * *************************************** Dumb terminal, eh? Well, kiss my parallel port! | |
Anand Gupta | Re: C# Class and Xbase++ exe/dll on Wed, 26 Nov 2003 12:07:45 +0530 Hi Phil "Phil Ide" <phil@idep.org.uk> wrote in message news:9mi9q9dkq6ty$.dlg@idep.org.uk... > Anand, > > > But still, (as am completely unaware on how a .NET program work), can a .NET > > program call an usual binary (.EXE file, typically an xbase++ exe file?) > > There is a slight confusion here. Xb2.NET is definitely NOT a .NET library > - it is a NETworking library. From the docs: Hehehe good clarification. I always had this assumption. Got it clarified yesterday only, after reading XXP's minutes/doc file (posted on another NG yday...having your Pic as-well ) Anand > > xbSocket > Complete object-oriented sockets library that provides a > protocol-independent <snip> | |
Phil Ide | Re: C# Class and Xbase++ exe/dll on Wed, 26 Nov 2003 10:17:29 +0000 Anand, > yesterday only, after reading XXP's minutes/doc file (posted on another NG > yday...having your Pic as-well ) Yeah, sorry about that, but that's the way I look. Regards, Phil Ide *************************************** * Xbase++ FAQ, Libraries and Sources: * * goto: http://www.idep.org.uk/xbase * *************************************** ERROR LPT1 not found.. use backup - PENCIL & PAPER | |
Anand Gupta | Re: C# Class and Xbase++ exe/dll on Wed, 26 Nov 2003 20:46:25 +0530 Hey didnt meant that way. Am sorry if I sounded otherwise. Anand "Phil Ide" <phil@idep.org.uk> wrote in message news:1qswksqor4oix.dlg@idep.org.uk... > Anand, > > > yesterday only, after reading XXP's minutes/doc file (posted on another NG > > yday...having your Pic as-well ) > > Yeah, sorry about that, but that's the way I look. > > Regards, | |
Phil Ide | Re: C# Class and Xbase++ exe/dll on Wed, 26 Nov 2003 16:09:44 +0000 Anand, >> Yeah, sorry about that, but that's the way I look. >> > Hey didnt meant that way. Am sorry if I sounded otherwise. Naa, it was me that was kidding Regards, Phil Ide *************************************** * Xbase++ FAQ, Libraries and Sources: * * goto: http://www.idep.org.uk/xbase * *************************************** What's all this about hell fire and dalmations? |