0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

exeファイル作成【GeneXus】

Last updated at Posted at 2018-09-13

GeneXusのプロシージャでexeファイルを作成します。

言語
C#

プロパティ

プロシージャのプロパティを変更します。
Main program -> True
Call protocol -> Command Line
exeファイルプロパティ.PNG

Rules

パラメータは以下のようにします。(&pTestはVarCharの40です。)

Rules
// パラメータ
Parm(In:&pTest);

※コマンドラインはパラメータのoutで返せないのでメッセージ関数を使用します。

Source

パラメータで受け取ったものをそのままメッセージ関数で返してあげる簡単な処理です。
第二引数を入力しないと返ってきません。第二引数の詳細についてはwikiを参照してください。Messageコマンド

Source
msg(&pTest, status)

実行

exeファイルは「~\Models\ナレッジ名\CSharpModel\web\bin\」直下に作成されます。

exeファイルの後に入力値を与えます。
コマンドで叩きます。「おねがいしまーす」

コマンドプロンプト(実行前)
C:\Models\ナレッジ名\CSharpModel\web\bin>プロシージャ名.exe てすと

すると入力した値をそのまま返してくれます。

コマンドプロンプト(実行後)
C:\Models\ナレッジ名\CSharpModel\web\bin>プロシージャ名.exe てすと
てすと

注意事項

コマンドラインで実行するにあたって文字列の制限があります。私はこれでずっと「Process is terminated due to StackOverflowException.」が表示されて実行できませんでした。詳細は以下の通りです。
コマンド プロンプト (cmd.exe) のコマンドライン文字列の制限

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?