ホーム » 2016 » 5月

月別アーカイブ: 5月 2016

2016年5月
1234567
891011121314
15161718192021
22232425262728
293031  

カテゴリー

アーカイブ

ブログ統計情報

  • 79,622 アクセス



KB3035583

GWX は何度も更新されていた.

対応方法が公開されたようではあるが,今の所見つけたのは「アップグレード開始後」の「キャンセル」.
このタイミングでは遅いと思うが…

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

_MBCS _tcspbrk

MBCS.exe で _tcspbrk を使用していて,ファイルパスの 0x5c の認識がうまくなかった.


_tcs… の関数を MBCS exe としてデバッガで見てみると
30: LPTSTR result1 = _tcschr (_T(“Test”),_T(‘s’)) ;
0040238A push 73h
0040238C push offset string “Test” (0048b0b0)
00402391 call @ILT+985(__tcschr) (004013de)
00402396 add esp,8
00402399 mov dword ptr [ebp-10h],eax
31: LPTSTR result2 = _tcsstr (_T(“Test”),_T(“sp”)) ;
0040239C push offset string “sp” (0048b0ac)
004023A1 push offset string “Test” (0048b0b0)
004023A6 call strstr (0042d170)
004023AB add esp,8
004023AE mov dword ptr [ebp-14h],eax
32: LPTSTR result3 = _tcspbrk(_T(“Test”),_T(“sp”)) ;
004023B1 push offset string “sp” (0048b0ac)
004023B6 push offset string “Test” (0048b0b0)
004023BB call strpbrk (0042d130)
004023C0 add esp,8
004023C3 mov dword ptr [ebp-18h],eax
33: size_t result4 = _tcsspn (_T(“Test”),_T(“sp”)) ;
004023C6 push offset string “sp” (0048b0ac)
004023CB push offset string “Test” (0048b0b0)
004023D0 call @ILT+1260(__tcsspn) (004014f1)
004023D5 add esp,8
004023D8 mov dword ptr [ebp-1Ch],eax


Afx.h をインクルードすると?
576: int CString::FindOneOf(LPCTSTR lpszCharSet) const

579: LPTSTR lpsz = _tcspbrk(m_pchData, lpszCharSet);
5F42E312 mov edx,dword ptr [lpszCharSet]
5F42E315 push edx
5F42E316 mov eax,dword ptr [this]
5F42E319 mov ecx,dword ptr [eax]
5F42E31B push ecx
5F42E31C call _tcspbrk (5f4012b0)
5F42E321 add esp,8
5F42E324 mov dword ptr [lpsz],eax
 
35: LPTSTR result1 = _tcschr (_T(“Test”),_T(‘s’)) ;
00401D14 push 73h
00401D16 push offset string “Test” (004230b0)
00401D1B call @ILT+485(__tcschr) (004011ea)
00401D20 add esp,8
00401D23 mov dword ptr [ebp-14h],eax
36: LPTSTR result2 = _tcsstr (_T(“Test”),_T(“sp”)) ;
00401D26 mov esi,esp
00401D28 push offset string “sp” (004230ac)
00401D2D push offset string “Test” (004230b0)
00401D32 call dword ptr [__imp__strstr (00426668)]
00401D38 add esp,8
00401D3B cmp esi,esp
00401D3D call _chkesp (0040e246)
00401D42 mov dword ptr [ebp-18h],eax
37: LPTSTR result3 = _tcspbrk(_T(“Test”),_T(“sp”)) ;
00401D45 mov esi,esp
00401D47 push offset string “sp” (004230ac)
00401D4C push offset string “Test” (004230b0)
00401D51 call dword ptr [__imp__strpbrk (0042666c)]
00401D57 add esp,8
00401D5A cmp esi,esp
00401D5C call _chkesp (0040e246)
00401D61 mov dword ptr [ebp-1Ch],eax
38: size_t result4 = _tcsspn (_T(“Test”),_T(“sp”)) ;
00401D64 push offset string “sp” (004230ac)
00401D69 push offset string “Test” (004230b0)
00401D6E call @ILT+655(__tcsspn) (00401294)
00401D73 add esp,8
00401D76 mov dword ptr [ebp-20h],eax
 

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

VC 11 以降の ODMenu

自前の UndoRedo テンプレートで,VC 11 以降メニューの表示が更新されなくなった.
対応は,アプリケーションクラスのヘッダで,ODMRoot.hxx のインクルードを追加すれば良い.


これとは別の動的なメニューも正しく表示できてないが,こちらはまだ原因を特定できてない.
CCmdUI::SetText

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

コンストラクタで static

次の様なクラスで,VC 14 ではコンストラクタ内の static を呼出した段階で止まってしまう?
VC 12 まででは OK .


  class T_static {
  public:
    T_static () ;
    } ;
  T_static::T_static ()
  {
    {
      static T_static root ;
      }
    std::tout << _T("T_static") << std::endl ;
    }


コンストラクタの初期化動作を次の様に変更.
  T_static::T_static ()
  {
    static bool Initialized = false ;
    if (!Initialized) {
      Initialized = true ;
      static T_static root ;
      }
    std::tout << _T("T_static") << std::endl ;
    }

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

VC 6 コンソール AP を VC 11 で…

VC 6 コンソール AP を順にアップしたプロジェクトで, VC 11 でビルドすると,
—— すべてのリビルド開始: プロジェクト: T_DbgCls, 構成: Debug Win32 ——
T_DbgCls.cpp
_WIN32_WINNT not defined. Defaulting to _WIN32_WINNT_MAXVER (see WinSDKVer.h)
c:\program files (x86)\microsoft sdks\windows\v7.1a\include\sal_supp.h(57):
  warning C4005: ‘__useHeader’ : マクロが再定義されました。
  c:\program files (x86)\microsoft visual studio 11.0\vc\include\sal.h(2872) :
    ’__useHeader’ の前の定義を確認してください
c:\program files (x86)\microsoft sdks\windows\v7.1a\include\specstrings_supp.h(77):
  warning C4005: ‘__on_failure’ : マクロが再定義されました。
  c:\program files (x86)\microsoft visual studio 11.0\vc\include\sal.h(2882) :
    ’__on_failure’ の前の定義を確認してください
c:\program files (x86)\microsoft visual studio 11.0\vc\atlmfc\include\atlcore.h(638):
  error C2039: ‘SetDefaultDllDirectories’ : ‘`global namespace” のメンバーではありません。
c:\program files (x86)\microsoft visual studio 11.0\vc\atlmfc\include\atlcore.h(638):
  error C2065: ‘SetDefaultDllDirectories’ : 定義されていない識別子です。
c:\program files (x86)\microsoft visual studio 11.0\vc\atlmfc\include\atlcore.h(640):
  error C2065: ‘LOAD_LIBRARY_SEARCH_SYSTEM32’ : 定義されていない識別子です。
========== すべてリビルド: 0 正常終了、1 失敗、0 スキップ ==========


プロジェクト設定の,「プラットフォームツールセット」を「Visual Studio 2012 (v110) 」とすれば通る.


さらに,VC 12 では,
—— ビルド開始: プロジェクト:T_DbgCls, 構成:Debug Win32 ——
T_DbgCls.obj : warning LNK4075: /EDITANDCONTINUE は /OPT:LBR の指定によって無視されます。
LINK : fatal error LNK1104: ファイル ‘mfc120d.lib’ を開くことができません。
========== ビルド: 0 正常終了、1 失敗、0 更新不要、0 スキップ ==========

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.