Vermutliche Fehlerpunte:
Bei remote access von ferner Client kann diese Fehler erscheinen. Weil die Pfad"C:\Dokumente und Einstellung\LocalService\Desktop" enthält kein Benutzer, welche Benutzer-name kann auf remote computer eingelogen? anonymouse? Guest? oder "LocalService"?
Mögliche Lösung:
in Public.cpp add:
CPublic::CPublic()
{
...
CPublic::sSicherungDir = ( ( CPublic::sSicherungDir == _T("") || !existsDir(CPublic::sSicherungDir) ) ? _T("C:\\") : CPublic::sSicherungDir );
}
in CUnpackView.cpp CALLBACK CUnpackView::BrowseCallbackProc() ändert:
////////////////////////////////////////////////////////
//'d:\\' can not be recognised by SHGetPathFromIDList()
// must be changed into 'd:\'
////////////////////////////////////////////////////////
dir.Replace("\\\\","\\");
...
switch(uMsg)
{
case BFFM_INITIALIZED: //initial
hasInitial =true;
::SendMessage(hwnd,BFFM_SETSELECTION,TRUE,(LPARAM)(LPCTSTR)dir ); //"d:\\datenversicherung"
//AfxMessageBox("BFFM_INITIALIZED");
break;
case BFFM_SELCHANGED: //path changed
{
/////////////////////////////////////////////////////}
// * modified by zengzn@gmail.com on 14.03.08
// * to avoid SHGetPathFromIDList()twice running
// * before "case BFFM_INITIALIZED" has been done
/////////////////////////////////////////////////////
if (hasInitial)
{
char curr[MAX_PATH];
SHGetPathFromIDList((LPCITEMIDLIST)lParam,curr);
//CString s;
//s.Format("BFFM_SELCHANGED, curr: %s",curr);
//AfxMessageBox(s);
if(curr[strlen(curr)-1]==92)
sprintf(curr,"%s",curr);
else
sprintf(curr,"%s\\",curr);
::SendMessage(hwnd,BFFM_SETSTATUSTEXT,0,(LPARAM)curr);
}
break;
没有评论:
发表评论