宜しくお願い致します。
VC++/CLIでプログラムを作成中のですが、
共通言語ランタイムサポートを = 共通言語ランタイムサポート(/clr)とし
(stdafx.h)
#include <Windows.h>
#pragma comment(lib, "usr32.lib")
(SrcDebug.cpp)
int Ret = MessageBox(NULL,(LPCTSTR)cDebStr,(LPCTSTR)CAPTION,MB_OK);
ここでエラー
.\SrcDebug.cpp(45) : error C2872: 'MessageBox' : あいまいなシンボルです。
'C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winuser.h(7205) の可能性があります : int MessageBox(HWND,LPCTSTR,LPCTSTR,UINT)''
または 'c:\windows\microsoft.net\framework\v2.0.50727\system.windows.forms.dll : System::Windows::Forms::MessageBox'
(SrcCommon.cpp)
int printflog(char *format,...)
{
FILE *fp;
va_list argp;
va_start(argp,format);
vsprintf_s(LogBuff, sizeof(LogBuff),format, argp);
va_end(argp);
if(fopen_s( &fp,COM_PORT, "a+t") != 0)
{
return LOGRWERR;
}
fwrite(LogBuff, strlen(LogBuff), 1, fp);
fclose(fp);
return 0;
}
ここでエラー
.\SrcCommon.cpp(127) : warning C4793: 'vararg' : 関数 'int printflog(char *,...)' 用にネイティブ コードの生成が発生します
c:\yo1\wpuc_clr\wpuc\SrcCommon.h(5) : 'printflog' の宣言を確認してください。
なのです。何が悪いのでしょうか?
宜しくお願い致します。