how to show result of a C function in the server?

Discussion of chess software programming and technical issues.

Moderator: Ras

shiv
Posts: 351
Joined: Sat Apr 01, 2006 2:03 am

Re: how to show result of a C function in the server?

Post by shiv »

A typical way one does it for linux and which should work under windows is to configure IIS/Apache to support php. From php you can call an exe directly and show its result. E.g. http://www.daniweb.com/forums/thread15662.html#

You can also use asp or cgi. However, php is a popular way to do this (as Alex points out as well) though there are many other ways.

What I have found is learning php is not too hard and well worth it in the long run.
Uri Blass
Posts: 10903
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: how to show result of a C function in the server?

Post by Uri Blass »

<snipped>
shiv wrote: From php you can call an exe directly and show its result. E.g. http://www.daniweb.com/forums/thread15662.html#
Thanks for all the replies
Note that I do not want to call an exe file directly but I want to call some functions in a specific exe.

I still do not see in all the links step by step instruction exactly what to do even for a simple function(the code that I need to write to use a simple function is not enough if it does not work).

I do not want to get errors like:
"no supported web server appears to be installed in your sysyem setup cannot continue." and I got this error inspite of the fact that
I could use IIS in my system to show data in the server for asp code
that have code in javascript and html even without microsoft visual studio2008.

The way that I see the result of code that I use in the server is simply saving code like
xxx.asp in Z:\Uri and going to some link that end with xxx.asp when the link is specific to my computer and works even when the computer is not connected to the internet.


Uri
Aleks Peshkov
Posts: 947
Joined: Sun Nov 19, 2006 9:16 pm
Location: Russia
Full name: Aleks Peshkov

Re: how to show result of a C function in the server?

Post by Aleks Peshkov »

Uri,
I think you need an existing remote console application, where you can run a typical console program with input/output streams like any Winboard/UCI engine.

Webserver is not designed to be a remote console application. It can be programmed using some web-script to behave so, but it is not an easy way.

If the executable you want to run does not output anything as generic output stream, I doubt you can do much with it remotely using any technology.
shiv
Posts: 351
Joined: Sat Apr 01, 2006 2:03 am

Re: how to show result of a C function in the server?

Post by shiv »

Aleks Peshkov wrote:Uri,
I think you need an existing remote console application, where you can run a typical console program with input/output streams like any Winboard/UCI engine.

Webserver is not designed to be a remote console application. It can be programmed using some web-script to behave so, but it is not an easy way.

If the executable you want to run does not output anything as generic output stream, I doubt you can do much with it remotely using any technology.
Agreed. The problem is that the RPC layer between dlls is not easily accessible from IIS to a dll. One way to solve this kind of problem is to write a wrapper exe (or com wrapper) yourself which calls the dll if certain parameters are passed in the request.

The other way is to see if IIS (by Microsoft) and dlls (by Microsoft) have a way to interconnect. It seems there are ways e.g. http://forums.aspfree.com/microsoft-iis ... 25800.html

Unfortunately, I cannot offer direct help/advice on IIS anymore as I have not done windows programming for a long while.