プロトタイプのC ++ DLLインターフェイス:INT CheckSN(CONSTチャー* InfoList、CHAR * MSG)。
C#の呼び出しに:
[DLLIMPORT( "sncplusInterface.dll"、エントリーポイント= "CheckSN"、ExactSpelling =偽、CallingConvention = CallingConvention.Cdecl)]
パブリックstatic int型のextern CheckSN(ストリングInfoList、StringBuilderのMSG)。
呼び出しは、次のとおりです。
StringBuilderのchOutMsg =新しいStringBuilderの(1024);
CheckSN(chData、chOutMsg / * REF chOutMsg * /);
文字列STR = chOutMsg.ToString()。
REFとまたはキーワードクラッシュアウト