开发者

How do I pass parameters from Apache to a DLL?

开发者 https://www.devze.com 2022-12-22 11:04 出处:网络
Is it possible to write a DLL that would take input from Apache and return text to display? For instance, say someone enters this URL: http:开发者_如何学编程//example.com/somedll.dll?p1=test&p2=a

Is it possible to write a DLL that would take input from Apache and return text to display?

For instance, say someone enters this URL: http:开发者_如何学编程//example.com/somedll.dll?p1=test&p2=anothertest Would it be possible to have the DLL take those parameters and return them as text to the server, which would then display testanothertest.


I don't think you would get Apache to call a DLL directly. However, you could have Apache call an application written in a local language (including C++, C#, Python, etc.) that is capable of linking with the DLL.

Apache would call the application which would call the DLL, generate the text, which would be passed back to Apache.

The details of (a) how to make Apache call an application and (b) how to make that application load and call the DLL are separate questions.

Fábio Batista has provided one example of a way to answer (a) with C#.


I suppose you are asking if you can write Apache applications on C#.

Check: http://www.mono-project.com/Mod_mono

You'll have to create an ASP.NET application.

0

精彩评论

暂无评论...
验证码 换一张
取 消