ホーム » VC » _MBCS _tcspbrk

2016年5月
1234567
891011121314
15161718192021
22232425262728
293031  

カテゴリー

アーカイブ

ブログ統計情報

  • 79,542 アクセス



_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.

コメントする

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

%d人のブロガーが「いいね」をつけました。