ホーム » 2010 » 2月

月別アーカイブ: 2月 2010

2010年2月
 123456
78910111213
14151617181920
21222324252627
28  

カテゴリー

アーカイブ

ブログ統計情報

  • 77,333 アクセス



CommonAppDataFolder にインストールしたい

CommonAppDataFolder 以下に,ファイルをインストールする

  1. 「特別なフォルダの追加」-「カスタムフォルダ」でフォルダを作成.
  2. プロパティの「DefaultLocation」を "[CommonAppDataFolder]" と入力.
    [CommonAppDataFolder][Manufacturer][ProductName] などとしても良い.

System Folder Properties
http://msdn.microsoft.com/en-us/library/aa372057(VS.85).aspx

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

Outlook で配信不能になる

2018/04/06 新しく書き直し


受信者をコードで指定していると Outlook で配信不能になる(OE では問題ない).

配信不能 : Subject
システム管理者
送信日時 2010/02/19(金) 21:20
宛先   **********


このメールは、受信者全員または一部に届きませんでした。
件名: Subject
送信日時: 2010/02/19 21:20
以下の受信者にメールを配信できません: 
‘user@*******.com’ 2010/02/19 21:20
この受信者へ配信できる電子メール アカウントはありません。


受信者のメールアドレスを設定する時,_T("smtp:") を付加する

// DOCMAPI.CPP  CDocument::OnFileSendMail
//*******************************************************************************
// 関数名 :ファイルの送信
// 作成日 :’06/06/23
//*******************************************************************************

BOOL SendMail::Send (void) const
{
  if (!IsSupport()) { return FALSE ; }
  CheckSizeAlert() ;
  // MultiByte の必要があるようなので,UNICODE の時のバッファをここに登録する
  LateDelete ld ;
  // 添付ファイルの準備
   int fileCount = 0 ;
   CArray<MapiFileDesc,MapiFileDesc> fileDescA ;
   int index = 0 ;
   for (index=0 ; index<PathNames.GetSize() ; index++) {
      CString pathName = PathNames[index] ;
      if (::FileIsNothing (pathName)) { continue ; }
      if (::FileIsDirectory(pathName)) { continue ; }
      MapiFileDesc fileDesc ;
      memset(&fileDesc,0,sizeof(MapiFileDesc)) ;
      fileDesc.nPosition = (ULONG)-1 ;
      #ifdef _UNICODE
        fileDesc.lpszPathName = SendMail__ChangeMultiByte(PathNames[index],&ld) ;
        fileDesc.lpszFileName = SendMail__ChangeMultiByte(FileNames[index],&ld) ;
      #else
        fileDesc.lpszPathName = LPSTR(LPCTSTR(PathNames[index])) ;
        fileDesc.lpszFileName = LPSTR(LPCTSTR(FileNames[index])) ;
      #endif
      fileDescA.Add(fileDesc) ;
      fileCount++ ;
      }
    // 受信者の準備
    int recipCount = 0 ;
    CArray<MapiRecipDesc,MapiRecipDesc> recipDescA ;
    CStringArray recipName ;
    CStringArray recipAddr ;
    for (index=0 ; index<Recipient.GetSize() ; index++) {
        recipName.SetAtGrow(index,Recipient[index]) ;
        recipAddr.SetAtGrow(index,Recipient[index]) ;
        if (IsAddressAddSMTP()) {
            recipAddr.SetAtGrow(index,_T("smtp:")+Recipient[index]) ;
            }
        }
    for (index=0 ; index<Recipient.GetSize() ; index++) {
      MapiRecipDesc recipDesc ;
      memset(&recipDesc,0,sizeof(MapiRecipDesc)) ;
      recipDesc.ulRecipClass = MAPI_TO ;
      #ifdef _UNICODE
        recipDesc.lpszName = SendMail__ChangeMultiByte(recipName[index],&ld) ;
        recipDesc.lpszAddress = SendMail__ChangeMultiByte(recipAddr[index],&ld) ;
      #else
        recipDesc.lpszName = (LPSTR)((LPCTSTR)(recipName[index])) ;
        recipDesc.lpszAddress = (LPSTR)((LPCTSTR)(recipAddr[index])) ;
      #endif
      recipDescA.Add(recipDesc) ;
      recipCount++ ;
      }
    MapiMessage message ;
    memset(&message,0,sizeof(message)) ;
    message.nFileCount = fileCount ;
    message.lpFiles = fileDescA.GetData() ;
    message.nRecipCount = recipCount ;
    message.lpRecips = recipDescA.GetData() ;
    #ifdef _UNICODE
       message.lpszSubject = SendMail__ChangeMultiByte(GetSubject(), &ld) ;
       message.lpszNoteText = SendMail__ChangeMultiByte(GetNoteText(), &ld) ;
    #else
       message.lpszSubject = LPSTR(LPCTSTR(Subject)) ;
       message.lpszNoteText = LPSTR(LPCTSTR(NoteText)) ;
    #endif
    CWnd* mainWnd = AfxGetMainWnd() ;
    #if(_MFC_VER >= 0x0700)
       ULONG_PTR hWnd = (ULONG_PTR)mainWnd->GetSafeHwnd() ;
    #else
       ULONG hWnd = (ULONG) mainWnd->GetSafeHwnd() ;
    #endif
    int nError = pSendMail(0, hWnd,&message, MAPI_LOGON_UI|MAPI_DIALOG, 0);
    if (nError != SUCCESS_SUCCESS &&
        nError != MAPI_USER_ABORT &&
        nError != MAPI_E_LOGIN_FAILURE) {
        AfxMessageBox(AFX_IDP_FAILED_MAPI_SEND) ;
        Copy() ;
        }
     return TRUE ;
     }

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

クリップボードへのテキストの転送

//  WinMFC.hxx
//*******************************************************************************
// 関数名 :クリップボードへのテキストの転送
// 作成日 :’01/07/13
// 変更日 :’07/12/14 UNICODE テキスト対応
//*******************************************************************************
inline
BOOL SetClipboardText (LPCTSTR text)
{
 CString   str = text ;
 GLOBALHANDLE hGMemText = 0 ;
 {
  hGMemText = ::GlobalAlloc(GHND,(DWORD)(str.GetLength()+1)*sizeof(TCHAR)) ;
  LPSTR  lpText = (LPSTR)::GlobalLock(hGMemText) ;
  memmove(lpText,str,str.GetLength()*sizeof(TCHAR)) ;
  ::GlobalUnlock(hGMemText) ;
  }
 {
  BOOL ret = ::OpenClipboard(NULL) ;
  if (ret == FALSE) {
   ::GlobalFree(hGMemText) ;
   ::MessageBeep(0) ;
   ::MessageBox(NULL,_T("ERROR: Cannot access the Clipboard!"),AfxGetAppName(),MB_OK|MB_ICONEXCLAMATION) ;
   return FALSE ;
   }
  else {
   ::EmptyClipboard() ;
   #ifdef _UNICODE
   ::SetClipboardData(CF_UNICODETEXT, hGMemText) ;
   #else
   ::SetClipboardData(CF_TEXT,   hGMemText) ;
   #endif
   ::CloseClipboard() ;
   }
  }
 return TRUE ;
 }
 
Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

Win7 が勝手に起動する

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

VC6 , VC8 リモートデバッグ

VC6
mk:@MSITStore:J:MSDNvccore.chm::/html/_core_setting_up_the_remote_debug_monitor.htm
http://support.microsoft.com/kb/241848/ja
https://www.betaarchive.com/wiki/index.php?title=Microsoft_KB_Archive/241848
以下のファイルをターゲット PC にコピー

1998-07-06 00:00 24,651 MSVCMON.EXE
2004-02-27 00:00 106,566 DM.DLL
2000-07-15 00:00 184,320 MSDIS110.DLL
2008-04-14 11:25 413,696 MSVCP60.DLL
2004-02-17 00:00 278,581 MSVCRT.DLL
2000-07-15 00:00  28,746 TLN0T.DLL

VC7
ms-help://MS.VSCC/MS.MSDNVS.1041/vsdebug/html/vctskInstallingRemoteDebugMonitor.htm
http://msdn.microsoft.com/ja-jp/library/aa291492(VS.71).aspx
C:\Program Files\Microsoft Visual Studio .NET\Common7\Packages\Debugger\
 msvcmon.exe
 msvcr70.dll
 NatDbgTLNet.dll
 NatDbgDM.dll
デバッグを開始できません.
プログラム ” を開始できません。
現在のユーザーのコンテキストで実行中のリモート コンピュータに MSVCMON がありません。

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Machine Debug Manager]
"AllowLaunchAsOtherUser"=dword:00000001
うまく起動できない


VC8
http://msdn.microsoft.com/ja-jp/library/ey7ec813.aspx
http://msdn.microsoft.com/ja-jp/library/ey7ec813(VS.80).aspx
http://msdn.microsoft.com/ja-jp/library/bt727f1t(VS.80).aspx
 MSVSMon.exe
 DbgHelp.dll
 MSDbgUI.dll

http://support.microsoft.com/kb/908099/ja


VC9
http://msdn.microsoft.com/ja-jp/library/bt727f1t.aspx
http://msdn.microsoft.com/ja-jp/library/bt727f1t(VS.100).aspx
 MSVSMon.exe


リモートデバッグ

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

VC7 マルチバイト→UNICODE

マルチバイトから UNICODE への変更で以下のエラーになることがある.

libcmtd.lib(wwincrt0.obj) : error LNK2019: 未解決の外部シンボル _wWinMain@16 が関数 _wWinMainCRTStartup で参照されました。

*.vcproj をエディタで開き,"$(NoInherit)" を削除

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

157 – 1 – 4 – 4

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

起動時 kstartup.exe がない

Kinoma Play の Storage Card へのインストールで起動時にメッセージが表示される.
「マイ デバイス」内へインストールし直しで OK.

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

アドレス帳の移行

V601T から X02T へのアドレス帳(連絡先)の移行手順

  1. V601T でメモリカードに「データ一括転送」.
  2. メモリカード内の VCF を PC に取り込み(コピー).
  3. VCF を WinXP 環境で開く(ダブルクリック).
    アドレス帳(wab.exe)の機能を利用.
  4. アドレス帳の「エクスポート」機能で CSV に.
  5. CSV を Outlook 2007 でインポート.
  6. ActiveSync で同期.
Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

メモリカードにアクセスできない

エクスプローラーに Storage Card が表示されなくなった.
「スタート」-「設定」-「システム」-「メモリ」にも表示されない.
メモリにインストールした Skype が起動できない.

電源を入れなおして,正しく認識できるようになったみたい.

但し,電源投入時の「ファイル ‘kstartup’ を開けません…」のメッセージは直らず
https://mish.myds.me/wordpress/dev/2010/02/10/missing-kstartup-exe-at-startup/

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

Win2K に VCReDist 2008 がインストールできない

「Microsoft Visual C++ 2008 再頒布可能パッケージ (x86)」のインストールで,
"HeapSetInformation … KERNEL32.dll から …"
Win2000 に VCReDist 2008 インストールでエラー
Windows 2000 SP4 用の更新プログラム ロールアップ 1」のインストールで OK.
http://www.microsoft.com/downloads/details.aspx?FamilyID=B54730CF-8850-4531-B52B-BF28B324C662&displaylang=ja
Windows2000-KB891861-v2-x86-JPN.EXE

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

Win 2000 に VCReDist がインストールできない

"Microsoft Visual C++ 2005 再頒布可能パッケージ (x86)" のインストールで Error 1723

Windows インストーラが 2.0 だったので,3.1 をインストール,再起動後,VCReDist のインストールで OK .

以下は,msiexec 実行時のバージョンの表示.


これとは別に,VCReDist 2005 は Win2K,XP などの環境で,全角のユーザ名ではインストールできない.
途中で "Command line option syntax error. Type Command /? for Help." が表示される

"VCReDist_x86.exe /t:c:Temp" などとして,全角文字を含まないフォルダを一時フォルダとして指定する.
コマンドの詳細は,"VCReDist_x86.exe /?" で確認のこと.

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

Windows インストーラのバージョンの確認方法

コマンドプロンプトなどで
  msiexec

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

利用可能なドライブ名の列挙 GetLogicalDrives

GetLogicalDrives

//*******************************************************************************
// 関数名 :利用可能なドライブ名の列挙
// 作成日 :’10/02/02
//*******************************************************************************
CString GetLogicalDriveName (void)
{
    DWORD drives = ::GetLogicalDrives() ;
    long defaultDrive = -1 ;
    CString driveName ;
    for (int index=0 ; index<30 ; index++) {
        if (drives & (1<<index)) {
            driveName += 'A'+index ;
            }
        }
    return driveName ;
    }
Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.