1

I developed an application for a client that required interfacing with an A/D board, displaying graphics on a second monitor and an SQL database. To accomplish this I developed a .NET application (that uses some C++ DLLs for Direct3D and A/D interfacing).

Now, the client is asking if they could run the software from a mobile device (tablet, phone, etc.) instead of the computer.

I have no experience with web development. I was thinking maybe it would be possible to run a web server on the local device that hosts a web application that can be accessed from any device connected to the local network. This web application would have the same functionality as the desktop application.

Since a lot of my C++ code is interfacing with hardware, I'm not sure a web application would even have permissions to do this.

Any ideas/thoughts on how to accomplish this or if it's not possible at all would be greatly appreciated.

4

2 に答える 2

1

コンソール アプリケーションではなく、クラス ライブラリ プロジェクト (個別の DLL ファイル) 内にアプリのコア ロジックをすべて含めることができます。そうすれば、この DLL を使用して公開する API を呼び出すコンソール アプリケーションまたは Web サイトを作成できます。

これがあなたにとってどれだけの作業になるかはわかりませんが、計画はコンソールアプリケーションからすべてのコードを抽出することです (私はそれがコンソールアプリであると仮定しています。それが Web フォームアプリの場合、同じ計画が適用されます)。コア作業 (つまり、ハードウェアへの呼び出し、C++ コードの呼び出しなど) を実行し、それをクラス ライブラリに配置します。

そうすれば、コンソール、Web など、どのタイプの UI を構築したいかは関係ありません。DLL 内に同じコードを使用する準備ができており、プロジェクトでそれを参照するだけで済みます。

于 2013-07-17T15:51:11.373 に答える
0

@Jasonは正しいです。すべてのロジックとコアロジックをVIAクラスライブラリプロジェクトにc++ code変換する必要があります。その後、Web サイトまたは Web プロジェクトを使用して にアクセスできます。専用サーバーを使用している場合、ハードウェアとのインターフェースは問題になりません。専用サーバーを完全に制御できるため、構成してディレクトリなどにアクセス許可を与えることができますが、セキュリティが厳しいため問題になります。dllsdllsddlsexeIISshared hosting environment

于 2013-07-19T07:04:48.933 に答える