Updated Windows application to support new desktop action framework. Updated project to build with Visual Studio 2005.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3511 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gary Spencer
2006-08-15 13:34:15 +00:00
parent dc51984cce
commit bafb261228
16 changed files with 886 additions and 734 deletions

View File

@@ -18,13 +18,13 @@
#include "stdafx.h" #include "stdafx.h"
#include "CAlfrescoApp.h" #include "CAlfrescoApp.h"
#include "CAlfrescoAppDlg.h" #include "CAlfrescoAppDlg.h"
#include "FileStatusDialog.h"
#include <stdlib.h> #include <stdlib.h>
#include "util\String.h" #include "util\String.h"
#include "util\DataBuffer.h" #include "util\DataBuffer.h"
#include "util\FileName.h" #include "util\FileName.h"
#include "util\Integer.h"
#include <shellapi.h> #include <shellapi.h>
@@ -82,6 +82,7 @@ BOOL CCAlfrescoAppApp::InitInstance()
// Get the path to the folder containing the application // Get the path to the folder containing the application
String folderPath = appPath.substring(0, pos); String folderPath = appPath.substring(0, pos);
String exeName = appPath.substring(pos + 1);
// Create the Alfresco interface // Create the Alfresco interface
@@ -90,27 +91,69 @@ BOOL CCAlfrescoAppApp::InitInstance()
try { try {
// If there are no file paths on the command line then display a status page for the files // Get the action information
// in the Alfresco folder
if ( __argc == 1) { AlfrescoActionInfo actionInfo = alfresco.getActionInformation(exeName);
// Display status for the files in the Alfresco folder // Check if the action should be confirmed
doFolderStatus( alfresco); if ( actionInfo.hasPreProcessAction(PreConfirmAction)) {
// Get the confirmation message
String confirmMsg = actionInfo.getConfirmationMessage();
if ( confirmMsg.length() == 0)
confirmMsg = L"Run action ?";
// Display a confirmation dialog
if ( AfxMessageBox( confirmMsg, MB_OKCANCEL | MB_ICONQUESTION) == IDCANCEL)
return FALSE;
} }
else {
// Build a list of the file names // Check if the action supports multiple paths, if not then call the action once for each supplied path
StringList fileList; if ( actionInfo.hasAttribute(AttrMultiplePaths)) {
// Build a list of paths from the command line arguments
StringList pathList;
for ( int i = 1; i < __argc; i++) for ( int i = 1; i < __argc; i++)
fileList.addString( String(__wargv[i])); pathList.addString( String(__wargv[i]));
// Process the file list and check in or out each file // Run the action
doCheckInOut( alfresco, fileList); runAction( alfresco, pathList, actionInfo);
}
// Check if the action supports file/folder targets
else if ( actionInfo.hasAttribute( AttrAnyFilesFolders) == true) {
// Pass one path at a time to the action
for ( int i = 1; i < __argc; i++) {
// Create a path list with a single path
StringList pathList;
pathList.addString( String(__wargv[i]));
// Run the action
runAction( alfresco, pathList, actionInfo);
}
}
// Action does not use targets, just run the action
else {
// Run the action
StringList emptyList;
runAction( alfresco, emptyList, actionInfo);
} }
} }
catch (Exception ex) { catch (Exception ex) {
@@ -124,128 +167,36 @@ BOOL CCAlfrescoAppApp::InitInstance()
return 1; return 1;
} }
// Run the main dialog // Exit the application
/**
CCAlfrescoAppDlg dlg;
m_pMainWnd = &dlg;
INT_PTR nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
// dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
// dismissed with Cancel
}
**/
// Since the dialog has been closed, return FALSE so that we exit the
// application, rather than start the application's message pump.
return FALSE; return FALSE;
} }
/** /**
* Display file status of the files in the target Alfresco folder * Process the command line arguments and build the parameter list for the desktop action
*
* @param AlfrescoInterface& alfresco
* @param const wchar_t* fileSpec
* @return bool
*/
bool CCAlfrescoAppApp::doFolderStatus( AlfrescoInterface& alfresco, const wchar_t* fileSpec) {
// Get the base UNC path
String uncPath = alfresco.getUNCPath();
uncPath.append(PathSeperator);
// Search the Alfresco folder
WIN32_FIND_DATA findData;
String searchPath = uncPath;
searchPath.append( fileSpec);
bool sts = false;
HANDLE fHandle = FindFirstFile( searchPath, &findData);
AlfrescoFileInfoList fileList;
if ( fHandle != INVALID_HANDLE_VALUE) {
// Loop until all files have been returned
PTR_AlfrescoFileInfo pFileInfo;
sts = true;
while ( fHandle != INVALID_HANDLE_VALUE) {
// Get the file name, ignore the '.' and '..' files
String fName = findData.cFileName;
if ( fName.equals(L".") || fName.equals(L"..")) {
// Get the next file/folder name in the search
if ( FindNextFile( fHandle, &findData) == 0)
fHandle = INVALID_HANDLE_VALUE;
continue;
}
// Get the file information for the current file folder
pFileInfo = alfresco.getFileInformation( findData.cFileName);
if ( pFileInfo.get() != NULL) {
// Add the file to the list
fileList.addInfo( pFileInfo);
}
// Get the next file/folder name in the search
if ( FindNextFile( fHandle, &findData) == 0)
fHandle = INVALID_HANDLE_VALUE;
}
}
// Display the file status dialog if there are files to display
if ( fileList.size() > 0) {
// Display the file status dialog
CFileStatusDialog dlg( fileList);
dlg.DoModal();
}
else {
CString msg;
msg.FormatMessage( L"No files found in %1", uncPath.data());
AfxMessageBox( msg, MB_OK | MB_ICONINFORMATION);
}
// Return status
return sts;
}
/**
* Process the list of files and check in or out each file
* *
* @param alfresco AlfrescoInterface& * @param alfresco AlfrescoInterface&
* @param files StringList& * @param paths StringList&
* @param actionInfo AlfrescoActionInfo&
* @param params DesktopParams&
* @return bool
*/ */
bool CCAlfrescoAppApp::doCheckInOut( AlfrescoInterface& alfresco, StringList& files) { bool CCAlfrescoAppApp::buildDesktopParameters( AlfrescoInterface& alfresco, StringList& paths, AlfrescoActionInfo& actionInfo,
DesktopParams& params) {
// If there are no paths then just return a success
if ( paths.numberOfStrings() == 0)
return true;
// Process the list of files and either check in the file if it is a working copy or check out // Process the list of files and either check in the file if it is a working copy or check out
// the file // the file
for ( unsigned int i = 0; i < files.numberOfStrings(); i++) { for ( unsigned int i = 0; i < paths.numberOfStrings(); i++) {
// Get the current file name // Get the current file name
String curFile = files.getStringAt( i); String curFile = paths.getStringAt( i);
// Check if the path is on an Alfresco mapped drive // Check if the path is on an Alfresco mapped drive
@@ -259,171 +210,181 @@ bool CCAlfrescoAppApp::doCheckInOut( AlfrescoInterface& alfresco, StringList& fi
curFile = uncPath; curFile = uncPath;
} }
// Check that the path is to a file // Check if the path is to a file/folder, and whether it is a local path
bool copyFile = false; bool copyFile = false;
DWORD attr = GetFileAttributes( curFile); DWORD attr = GetFileAttributes( curFile);
if ( attr != INVALID_FILE_ATTRIBUTES && (attr & FILE_ATTRIBUTE_DIRECTORY) == 0) {
if ( attr != INVALID_FILE_ATTRIBUTES) {
// Check if the action supports the file/folder type
bool isDir = (attr & FILE_ATTRIBUTE_DIRECTORY) != 0 ? true : false;
if ( isDir && actionInfo.supportsFolders() == false) {
AfxMessageBox(L"Action does not support folders", MB_OK | MB_ICONSTOP);
return false;
}
else if ( actionInfo.supportsFiles() == false) {
AfxMessageBox(L"Action does not support files", MB_OK | MB_ICONSTOP);
return false;
}
// Get the file name from the path // Get the file name from the path
StringList nameParts = FileName::splitPath( curFile); StringList nameParts = FileName::splitPath( curFile);
String curName = nameParts.getStringAt( 1); String curName = nameParts.getStringAt( 1);
// Get the Alfresco file status information
PTR_AlfrescoFileInfo pFileInfo = alfresco.getFileInformation( curName);
// If the path is to a file that is not on the Alfresco share the file will need to be copied, // If the path is to a file that is not on the Alfresco share the file will need to be copied,
// after checking the status of a matching file in the Alfresco folder // after checking the status of a matching file in the Alfresco folder
if ( curFile.length() >= 3 && curFile.substring(1,3).equals( L":\\")) { if ( curFile.length() >= 3 && curFile.substring(1,3).equals( L":\\")) {
// Check if there is an existing file with the same name // Check if the action supports local files
if ( pFileInfo.get() != NULL) { if ( isDir == false && actionInfo.hasAttribute(AttrClientFiles) == false) {
AfxMessageBox(L"Action does not support local files", MB_OK | MB_ICONSTOP);
return false;
}
else if ( isDir == true && actionInfo.hasAttribute(AttrClientFolders) == false) {
AfxMessageBox(L"Action does not support local folders", MB_OK | MB_ICONSTOP);
return false;
}
// Check if the file is a working copy // Check if there is an existing file in the Alfresco with the same name, check if the file is locked
PTR_AlfrescoFileInfo fInfo = alfresco.getFileInformation( curName);
if ( fInfo.get() != NULL) {
if ( pFileInfo->isWorkingCopy()) { // There is an existing file in the Alfresco folder with the same name, check if it is locked
// Local file matches a working copy file in the Alfresco folder if ( fInfo->getLockType() != LockNone) {
AfxMessageBox( L"Cannot copy file to Alfresco folder, destination file is locked", MB_OK | MB_ICONEXCLAMATION);
CString msg; return false;
msg.FormatMessage( L"Found matching working copy for local file %1", curName.data());
AfxMessageBox( msg, MB_OK | MB_ICONINFORMATION);
} }
else if ( pFileInfo->getLockType() != LockNone) { else if ( actionInfo.hasPreProcessAction(PreLocalToWorkingCopy) == true && fInfo->isWorkingCopy() == false) {
AfxMessageBox( L"Cannot copy to Alfresco folder, destination must overwrite a working copy", MB_OK | MB_ICONEXCLAMATION);
return false;
}
}
else if ( actionInfo.hasPreProcessAction(PreLocalToWorkingCopy) == true) {
// File is locked, may be the original document // Target folder does not contain a matching working copy of the local file
CString msg;
msg.FormatMessage( L"No matching working copy for %1", curName.data());
AfxMessageBox( msg, MB_OK | MB_ICONEXCLAMATION);
return false;
}
// Copy the files/folders using the Windows shell
bool copyAborted = false;
if ( copyFilesUsingShell( curFile, alfresco.getUNCPath(), copyAborted) == false) {
// Check if the copy failed or the user aborted the copy
if ( copyAborted == false) {
// File copy failed
CString msg; CString msg;
msg.FormatMessage( L"Destination file %1 is locked", curName.data()); msg.FormatMessage( isDir ? L"Failed to copy folder %1" : L"Failed to copy file %1", curFile.data());
AfxMessageBox( msg, MB_OK | MB_ICONSTOP); AfxMessageBox( msg, MB_OK | MB_ICONSTOP);
return false; return false;
} }
else { else {
// Indicate that we have copied a new file to the Alfresco share, do not check in/out // User aborted the file copy
copyFile = true; CString msg;
msg.FormatMessage( L"Copy aborted for %1", curFile.data());
AfxMessageBox( msg, MB_OK | MB_ICONSTOP);
return false;
} }
} }
else {
// Indicate that we have copied a new file to the Alfresco share, do not check in/out // Add a desktop target for the copied file
copyFile = true; params.addTarget( new DesktopTarget(isDir ? TargetCopiedFolder : TargetCopiedFile, curName));
}
// Build the from/to paths, must be double null terminated
wchar_t fromPath[MAX_PATH + 1];
wchar_t toPath[MAX_PATH + 1];
memset( fromPath, 0, sizeof( fromPath));
memset( toPath, 0, sizeof( toPath));
wcscpy( fromPath, curFile.data());
wcscpy( toPath, alfresco.getUNCPath());
// Copy the local file to the Alfresco folder
SHFILEOPSTRUCT fileOpStruct;
memset( &fileOpStruct, 0, sizeof(SHFILEOPSTRUCT));
fileOpStruct.hwnd = HWND_DESKTOP;
fileOpStruct.wFunc = FO_COPY;
fileOpStruct.pFrom = fromPath;
fileOpStruct.pTo = toPath;
fileOpStruct.fFlags= 0;
fileOpStruct.fAnyOperationsAborted =false;
// Copy the file to the Alfresco folder
if ( SHFileOperation( &fileOpStruct) != 0) {
// File copy failed
CString msg;
msg.FormatMessage( L"Failed to copy file %1", curFile.data());
AfxMessageBox( msg, MB_OK | MB_ICONSTOP);
return false;
}
else if ( fileOpStruct.fAnyOperationsAborted) {
// User aborted the file copy
CString msg;
msg.FormatMessage( L"Copy aborted for %1", curFile.data());
AfxMessageBox( msg, MB_OK | MB_ICONSTOP);
return false;
}
// Get the file information for the copied file
pFileInfo = alfresco.getFileInformation( curName);
} }
else {
// Check in or check out the file // Path is a UNC path, check if the file/folder is in the same folder as the action
if ( pFileInfo.get() != NULL) { DesktopTarget* pTarget = NULL;
// Check if the file should be checked in/out if ( curFile.startsWith( alfresco.getUNCPath())) {
if ( copyFile == false) { // Path is in the same folder as the application, or in a sub-folder
// Check if the file is a working copy, if so then check it in String relPath = curFile.substring( alfresco.getUNCPath().length() + 1);
if ( pFileInfo->isWorkingCopy()) { if ( relPath.indexOf( L"\\") == -1) {
// Check in the file // Create a target using the file name only
doCheckIn( alfresco, pFileInfo); pTarget = new DesktopTarget( isDir ? TargetFolder : TargetFile, relPath);
} }
else if ( pFileInfo->getLockType() == LockNone) { }
// Check out the file // If the target is not valid the file/folder is not in the same folder as the client-side application,
// copy the files/folders to the target folder or use the root relative path to the file/folder
doCheckOut( alfresco, pFileInfo); if ( pTarget == NULL) {
// Check if Alfresco files/folders should be copied to the target folder
if ( actionInfo.hasPreProcessAction(PreCopyToTarget)) {
// Copy the files/folders using the Windows shell
bool copyAborted = false;
if ( copyFilesUsingShell( curFile, alfresco.getUNCPath(), copyAborted) == false) {
// Check if the copy failed or the user aborted the copy
if ( copyAborted == false) {
// File copy failed
CString msg;
msg.FormatMessage( isDir ? L"Failed to copy folder %1" : L"Failed to copy file %1", curFile.data());
AfxMessageBox( msg, MB_OK | MB_ICONSTOP);
return false;
}
else {
// User aborted the file copy
CString msg;
msg.FormatMessage( L"Copy aborted for %1", curFile.data());
AfxMessageBox( msg, MB_OK | MB_ICONSTOP);
return false;
}
}
// Add a desktop target for the copied file
pTarget= new DesktopTarget(isDir ? TargetCopiedFolder : TargetCopiedFile, curName);
} }
else { else {
// File is locked, may already be checked out // Get the root relative path to the file/folder
CString msg; String rootRelPath = curFile.substring(alfresco.getRootPath().length());
msg.FormatMessage( L"File %1 is locked", curFile.data()); pTarget = new DesktopTarget( isDir ? TargetFolder : TargetFile, rootRelPath);
AfxMessageBox( msg, MB_OK | MB_ICONSTOP);
} }
} }
else {
// No existing file to link the copied file to // Add the desktop target
CString msg;
msg.FormatMessage( L"Copied file %1 to Alfresco folder", curFile.data());
AfxMessageBox( msg, MB_OK | MB_ICONINFORMATION);
}
params.addTarget( pTarget);
} }
else {
CString msg;
msg.FormatMessage( L"Failed to get file status for %1", curFile.data());
AfxMessageBox( msg, MB_OK | MB_ICONSTOP);
}
}
else {
// Check the error status
CString msg;
if ( attr != INVALID_FILE_ATTRIBUTES)
msg.FormatMessage( L"Path %1 is a folder, ignored", curFile.data());
else
msg.FormatMessage( L"File %1 does not exist", curFile.data());
AfxMessageBox( msg, MB_OK | MB_ICONSTOP);
} }
} }
@@ -433,74 +394,174 @@ bool CCAlfrescoAppApp::doCheckInOut( AlfrescoInterface& alfresco, StringList& fi
} }
/** /**
* Check in the specified file * Copy a file/folder using the Windows shell
* *
* @param alfresco AlfrescoInterface& * @param fromFileFolder const String&
* @param pFileInfo PTR_AlfrescoFileInfo& * @param toFolder const String&
* @param aborted bool&
* @return bool * @return bool
*/ */
bool CCAlfrescoAppApp::doCheckIn( AlfrescoInterface& alfresco, PTR_AlfrescoFileInfo& pFileInfo) { bool CCAlfrescoAppApp::copyFilesUsingShell(const String& fromFileFolder, const String& toFolder, bool& aborted) {
bool checkedIn = false; // Build the from/to paths, must be double null terminated
try { wchar_t fromPath[MAX_PATH + 1];
wchar_t toPath[MAX_PATH + 1];
// Check in the specified file memset( fromPath, 0, sizeof( fromPath));
memset( toPath, 0, sizeof( toPath));
alfresco.checkIn( pFileInfo->getName()); wcscpy( fromPath, fromFileFolder.data());
wcscpy( toPath, toFolder.data());
CString msg; // Copy the local file to the Alfresco folder
msg.FormatMessage( L"Checked in file %1", pFileInfo->getName().data());
AfxMessageBox( msg, MB_OK | MB_ICONINFORMATION);
// Indicate that the check in was successful SHFILEOPSTRUCT fileOpStruct;
memset( &fileOpStruct, 0, sizeof(SHFILEOPSTRUCT));
checkedIn = true; fileOpStruct.hwnd = HWND_DESKTOP;
fileOpStruct.wFunc = FO_COPY;
fileOpStruct.pFrom = fromPath;
fileOpStruct.pTo = toPath;
fileOpStruct.fFlags= 0;
fileOpStruct.fAnyOperationsAborted =false;
// Copy the file to the Alfresco folder
bool sts = false;
if ( SHFileOperation( &fileOpStruct) == 0) {
// File copy successful
sts = true;
} }
catch (Exception ex) { else if ( fileOpStruct.fAnyOperationsAborted) {
CString msg;
msg.FormatMessage( L"Error checking in file %1\n\n%2", pFileInfo->getName().data(), ex.getMessage().data()); // User aborted the file copy
AfxMessageBox( msg, MB_OK | MB_ICONSTOP);
aborted = true;
} }
// Return the check in status // Return the copy status
return checkedIn; return sts;
} }
/** /**
* Check out the specified file * Run an action
* *
* @param alfresco AlfrescoInterface& * @param alfresco AlfrescoInterface&
* @param pFileInfo PTR_AlfrescoFileInfo& * @param pathList StringList&
* @param actionInfo AlfrescoActionInfo&
* @return bool * @return bool
*/ */
bool CCAlfrescoAppApp::doCheckOut( AlfrescoInterface& alfresco, PTR_AlfrescoFileInfo& pFileInfo) { bool CCAlfrescoAppApp::runAction( AlfrescoInterface& alfresco, StringList& pathList, AlfrescoActionInfo& actionInfo) {
bool checkedOut = false; // Build the desktop action parameter list, perform any file copying of local files
try { bool sts = false;
DesktopParams desktopParams;
if ( buildDesktopParameters( alfresco, pathList, actionInfo, desktopParams)) {
// Check out the specified file // Run the desktop action
String workingCopy; DesktopResponse response = alfresco.runAction( actionInfo, desktopParams);
alfresco.checkOut( pFileInfo->getName(), workingCopy);
CString msg; // Check the response status
msg.FormatMessage( L"Checked out file %1 to %2", pFileInfo->getName().data(), workingCopy.data());
AfxMessageBox( msg, MB_OK | MB_ICONINFORMATION);
// Indicate that the check out was successful if ( response.getStatus() != StsSuccess) {
checkedOut = true; // Check if the status indicates a command line should be launched
}
catch (Exception ex) { if ( response.getStatus() == StsCommandLine) {
CString msg;
msg.FormatMessage( L"Error checking out file %1\n\n%2", pFileInfo->getName().data(), ex.getMessage().data()); // Initialize the startup information
AfxMessageBox( msg, MB_OK | MB_ICONSTOP);
STARTUPINFO startupInfo;
memset(&startupInfo, 0, sizeof(STARTUPINFO));
// Launch a process using the command line
PROCESS_INFORMATION processInfo;
memset(&processInfo, 0, sizeof(PROCESS_INFORMATION));
if ( CreateProcess( response.getStatusMessage().data(), NULL, NULL, NULL, true, 0, NULL, NULL,
&startupInfo, &processInfo) == false) {
CString msg;
msg.FormatMessage( L"Failed to launch command line\n\n%1\n\nError %2!d!", response.getStatusMessage().data(), GetLastError());
AfxMessageBox( msg, MB_OK | MB_ICONERROR);
}
else
sts = true;
}
// Check if a web browser should be launched with a URL
else if ( response.getStatus() == StsLaunchURL) {
// Use the Windows shell to open the URL
HINSTANCE shellSts = ShellExecute( NULL, NULL, response.getStatusMessage().data(), NULL, NULL, SW_SHOWNORMAL);
if (( int) shellSts < 32) {
CString msg;
msg.FormatMessage( L"Failed to launch URL\n\n%1", response.getStatusMessage().data());
AfxMessageBox( msg, MB_OK | MB_ICONERROR);
}
else
sts = true;
}
// Error status
else {
// Get the error message
String errMsg;
switch ( response.getStatus()) {
case StsFileNotFound:
errMsg = L"File not found";
break;
case StsAccessDenied:
errMsg = L"Access denied";
break;
case StsBadParameter:
errMsg = L"Bad parameter in request";
break;
case StsNoSuchAction:
errMsg = L"No such action";
break;
default:
errMsg = L"Error running action";
break;
}
// Display an error dialog
CString msg;
if ( response.hasStatusMessage())
msg.FormatMessage( L"%1\n\n%2", errMsg.data(), response.getStatusMessage().data());
else
msg = errMsg.data();
AfxMessageBox( msg, MB_OK | MB_ICONERROR);
}
}
else if ( response.hasStatusMessage()) {
// Display the message returned by the action
CString msg;
msg.FormatMessage( L"Action returned message\n\n%1", response.getStatusMessage().data());
AfxMessageBox( msg, MB_OK | MB_ICONINFORMATION);
}
} }
// Return the check out status // Return the action status
return checkedOut; return sts;
} }

View File

@@ -26,6 +26,7 @@
// Includes // Includes
#include "alfresco\Alfresco.hpp" #include "alfresco\Alfresco.hpp"
#include "alfresco\Desktop.hpp"
using namespace Alfresco; using namespace Alfresco;
@@ -49,10 +50,15 @@ public:
private: private:
// Main Alfresco interface functions // Main Alfresco interface functions
bool doFolderStatus( AlfrescoInterface& alfresco, const wchar_t* fileSpec = L"*.*"); bool buildDesktopParameters( AlfrescoInterface& alfresco, StringList& paths, AlfrescoActionInfo& actionInfo, DesktopParams& params);
bool doCheckInOut( AlfrescoInterface& alfresco, StringList& files);
bool doCheckIn( AlfrescoInterface& alfresco, PTR_AlfrescoFileInfo& fileInfo); // Copy files/folders using the Windows shell
bool doCheckOut( AlfrescoInterface& alfresco, PTR_AlfrescoFileInfo& fileInfo);
bool copyFilesUsingShell(const String& fromPath, const String& toPath, bool& aborted);
// Run the action
bool runAction( AlfrescoInterface& alfresco, StringList& pathList, AlfrescoActionInfo& actionInfo);
}; };
extern CCAlfrescoAppApp theApp; extern CCAlfrescoAppApp theApp;

View File

@@ -27,29 +27,25 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
// //
IDD_ABOUTBOX DIALOGEX 0, 0, 235, 55 IDD_ABOUTBOX DIALOGEX 0, 0, 235, 55
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
WS_SYSMENU
CAPTION "About CAlfrescoApp" CAPTION "About CAlfrescoApp"
FONT 8, "MS Shell Dlg", 0, 0, 0x1 FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN BEGIN
ICON 128,IDC_STATIC,11,17,20,20 ICON 128,IDC_STATIC,11,17,20,20
LTEXT "CAlfrescoApp Version 1.0",IDC_STATIC,40,10,119,8, LTEXT "CAlfrescoApp Version 1.0",IDC_STATIC,40,10,119,8,SS_NOPREFIX
SS_NOPREFIX
LTEXT "Copyright (C) 2005",IDC_STATIC,40,25,119,8 LTEXT "Copyright (C) 2005",IDC_STATIC,40,25,119,8
DEFPUSHBUTTON "OK",IDOK,178,7,50,16,WS_GROUP DEFPUSHBUTTON "OK",IDOK,178,7,50,16,WS_GROUP
END END
IDD_CALFRESCOAPP_DIALOG DIALOGEX 0, 0, 469, 156 IDD_CALFRESCOAPP_DIALOG DIALOGEX 0, 0, 469, 156
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_APPWINDOW EXSTYLE WS_EX_APPWINDOW
CAPTION "Alfresco Check In/Out" CAPTION "Alfresco Check In/Out"
FONT 8, "MS Shell Dlg", 0, 0, 0x1 FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN BEGIN
PUSHBUTTON "OK",IDOK,209,130,50,13 PUSHBUTTON "OK",IDOK,209,130,50,13
LTEXT "Checked in 99 files",IDC_MSGTEXT,25,22,418,8 LTEXT "Checked in 99 files",IDC_MSGTEXT,25,22,418,8
LISTBOX IDC_FILELIST,23,38,424,83,LBS_SORT | LISTBOX IDC_FILELIST,23,38,424,83,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
END END
@@ -83,13 +79,13 @@ BEGIN
BLOCK "040904e4" BLOCK "040904e4"
BEGIN BEGIN
VALUE "CompanyName", "Alfresco" VALUE "CompanyName", "Alfresco"
VALUE "FileDescription", "Alfresco Check In/Out" VALUE "FileDescription", "Alfresco Drag And Drop"
VALUE "FileVersion", "1.0.0.1" VALUE "FileVersion", "1.0.0.2"
VALUE "InternalName", "CAlfrescoApp.exe" VALUE "InternalName", "CAlfrescoApp.exe"
VALUE "LegalCopyright", "(c) Alfresco. All rights reserved." VALUE "LegalCopyright", "(c) Alfresco. All rights reserved."
VALUE "OriginalFilename", "CAlfrescoApp.exe" VALUE "OriginalFilename", "CAlfrescoApp.exe"
VALUE "ProductName", "Alfresco" VALUE "ProductName", "Alfresco"
VALUE "ProductVersion", "1.0.0.1" VALUE "ProductVersion", "1.0.0.2"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"
@@ -149,6 +145,40 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK
#pragma code_page(1252) #pragma code_page(1252)
#endif //_WIN32 #endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
IDD_FILESTATUS DIALOGEX 0, 0, 448, 332
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Alfresco File Status"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "OK",IDOK,391,311,50,14
CONTROL "",IDC_FILELIST,"SysListView32",LVS_REPORT | LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,7,7,434,299
END
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO
BEGIN
IDD_FILESTATUS, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 441
TOPMARGIN, 7
BOTTOMMARGIN, 325
END
END
#endif // APSTUDIO_INVOKED
#ifdef APSTUDIO_INVOKED #ifdef APSTUDIO_INVOKED
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// //
@@ -193,42 +223,6 @@ END
// Icon with lowest ID value placed first to ensure application icon // Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems. // remains consistent on all systems.
IDI_ICON1 ICON "alfresco.ico" IDI_ICON1 ICON "alfresco.ico"
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
IDD_FILESTATUS DIALOGEX 0, 0, 448, 332
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION |
WS_SYSMENU
CAPTION "Alfresco File Status"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "OK",IDOK,391,311,50,14
CONTROL "",IDC_FILELIST,"SysListView32",LVS_REPORT |
LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,7,7,434,299
END
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO
BEGIN
IDD_FILESTATUS, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 441
TOPMARGIN, 7
BOTTOMMARGIN, 325
END
END
#endif // APSTUDIO_INVOKED
#endif // English (U.K.) resources #endif // English (U.K.) resources
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////

View File

@@ -1,21 +1,19 @@
Microsoft Visual Studio Solution File, Format Version 8.00 Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CAlfrescoApp", "CAlfrescoApp.vcproj", "{055DCC85-2D1A-4594-B2BE-ED292D2BF26D}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CAlfrescoApp", "CAlfrescoApp.vcproj", "{055DCC85-2D1A-4594-B2BE-ED292D2BF26D}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject EndProject
Global Global
GlobalSection(SolutionConfiguration) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug = Debug Debug|Win32 = Debug|Win32
Release = Release Release|Win32 = Release|Win32
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{055DCC85-2D1A-4594-B2BE-ED292D2BF26D}.Debug.ActiveCfg = Debug|Win32 {055DCC85-2D1A-4594-B2BE-ED292D2BF26D}.Debug|Win32.ActiveCfg = Debug|Win32
{055DCC85-2D1A-4594-B2BE-ED292D2BF26D}.Debug.Build.0 = Debug|Win32 {055DCC85-2D1A-4594-B2BE-ED292D2BF26D}.Debug|Win32.Build.0 = Debug|Win32
{055DCC85-2D1A-4594-B2BE-ED292D2BF26D}.Release.ActiveCfg = Release|Win32 {055DCC85-2D1A-4594-B2BE-ED292D2BF26D}.Release|Win32.ActiveCfg = Release|Win32
{055DCC85-2D1A-4594-B2BE-ED292D2BF26D}.Release.Build.0 = Release|Win32 {055DCC85-2D1A-4594-B2BE-ED292D2BF26D}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(SolutionProperties) = preSolution
EndGlobalSection HideSolutionNode = FALSE
GlobalSection(ExtensibilityAddIns) = postSolution
EndGlobalSection EndGlobalSection
EndGlobal EndGlobal

View File

@@ -1,127 +1,191 @@
<?xml version="1.0" encoding="Windows-1252"?> <?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject <VisualStudioProject
ProjectType="Visual C++" ProjectType="Visual C++"
Version="7.10" Version="8.00"
Name="CAlfrescoApp" Name="CAlfrescoApp"
ProjectGUID="{055DCC85-2D1A-4594-B2BE-ED292D2BF26D}" ProjectGUID="{055DCC85-2D1A-4594-B2BE-ED292D2BF26D}"
RootNamespace="CAlfrescoApp" RootNamespace="CAlfrescoApp"
Keyword="MFCProj"> Keyword="MFCProj"
>
<Platforms> <Platforms>
<Platform <Platform
Name="Win32"/> Name="Win32"
/>
</Platforms> </Platforms>
<ToolFiles>
</ToolFiles>
<Configurations> <Configurations>
<Configuration <Configuration
Name="Debug|Win32" Name="Debug|Win32"
OutputDirectory="Debug" OutputDirectory="Debug"
IntermediateDirectory="Debug" IntermediateDirectory="Debug"
ConfigurationType="1" ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="2" UseOfMFC="2"
CharacterSet="1"> CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="false"
/>
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories=".\includes" AdditionalIncludeDirectories=".\includes"
PreprocessorDefinitions="UNICODE" PreprocessorDefinitions="UNICODE,_CRT_SECURE_NO_DEPRECATE"
MinimalRebuild="TRUE" MinimalRebuild="true"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="3" RuntimeLibrary="3"
TreatWChar_tAsBuiltInType="TRUE" TreatWChar_tAsBuiltInType="true"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3" WarningLevel="3"
Detect64BitPortabilityProblems="TRUE" Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"/> DebugInformationFormat="4"
/>
<Tool <Tool
Name="VCCustomBuildTool"/> Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"
AdditionalIncludeDirectories="$(IntDir)"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"
AdditionalDependencies="mpr.lib shell32.lib" AdditionalDependencies="mpr.lib shell32.lib"
OutputFile="$(OutDir)/Alfresco.exe" OutputFile="$(OutDir)/Alfresco.exe"
LinkIncremental="2" LinkIncremental="2"
GenerateDebugInformation="TRUE" GenerateDebugInformation="true"
SubSystem="2" SubSystem="2"
TargetMachine="1"/> TargetMachine="1"
/>
<Tool <Tool
Name="VCMIDLTool" Name="VCALinkTool"
PreprocessorDefinitions="_DEBUG" />
MkTypLibCompatible="FALSE"/>
<Tool <Tool
Name="VCPostBuildEventTool"/> Name="VCManifestTool"
/>
<Tool <Tool
Name="VCPreBuildEventTool"/> Name="VCXDCMakeTool"
/>
<Tool <Tool
Name="VCPreLinkEventTool"/> Name="VCBscMakeTool"
/>
<Tool <Tool
Name="VCResourceCompilerTool" Name="VCFxCopTool"
PreprocessorDefinitions="_DEBUG" />
Culture="1033"
AdditionalIncludeDirectories="$(IntDir)"/>
<Tool <Tool
Name="VCWebServiceProxyGeneratorTool"/> Name="VCAppVerifierTool"
/>
<Tool <Tool
Name="VCXMLDataGeneratorTool"/> Name="VCWebDeploymentTool"
/>
<Tool <Tool
Name="VCWebDeploymentTool"/> Name="VCPostBuildEventTool"
<Tool />
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration> </Configuration>
<Configuration <Configuration
Name="Release|Win32" Name="Release|Win32"
OutputDirectory="Release" OutputDirectory="Release"
IntermediateDirectory="Release" IntermediateDirectory="Release"
ConfigurationType="1" ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="2" UseOfMFC="2"
CharacterSet="1"> CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="false"
/>
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
AdditionalIncludeDirectories=".\includes" AdditionalIncludeDirectories=".\includes"
PreprocessorDefinitions="UNICODE" PreprocessorDefinitions="UNICODE,_CRT_SECURE_NO_DEPRECATE"
MinimalRebuild="FALSE" MinimalRebuild="false"
RuntimeLibrary="2" RuntimeLibrary="2"
TreatWChar_tAsBuiltInType="TRUE" TreatWChar_tAsBuiltInType="true"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3" WarningLevel="3"
Detect64BitPortabilityProblems="TRUE" Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"/> DebugInformationFormat="3"
/>
<Tool <Tool
Name="VCCustomBuildTool"/> Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"
AdditionalIncludeDirectories="$(IntDir)"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"
AdditionalDependencies="mpr.lib shell32.lib" AdditionalDependencies="mpr.lib shell32.lib"
OutputFile="$(OutDir)/Alfresco.exe" OutputFile="$(OutDir)/Alfresco.exe"
LinkIncremental="1" LinkIncremental="1"
GenerateDebugInformation="TRUE" GenerateDebugInformation="true"
SubSystem="2" SubSystem="2"
OptimizeReferences="2" OptimizeReferences="2"
EnableCOMDATFolding="2" EnableCOMDATFolding="2"
TargetMachine="1"/> TargetMachine="1"
/>
<Tool <Tool
Name="VCMIDLTool" Name="VCALinkTool"
PreprocessorDefinitions="NDEBUG" />
MkTypLibCompatible="FALSE"/>
<Tool <Tool
Name="VCPostBuildEventTool"/> Name="VCManifestTool"
/>
<Tool <Tool
Name="VCPreBuildEventTool"/> Name="VCXDCMakeTool"
/>
<Tool <Tool
Name="VCPreLinkEventTool"/> Name="VCBscMakeTool"
/>
<Tool <Tool
Name="VCResourceCompilerTool" Name="VCFxCopTool"
PreprocessorDefinitions="NDEBUG" />
Culture="1033"
AdditionalIncludeDirectories="$(IntDir)"/>
<Tool <Tool
Name="VCWebServiceProxyGeneratorTool"/> Name="VCAppVerifierTool"
/>
<Tool <Tool
Name="VCXMLDataGeneratorTool"/> Name="VCWebDeploymentTool"
/>
<Tool <Tool
Name="VCWebDeploymentTool"/> Name="VCPostBuildEventTool"
<Tool />
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration> </Configuration>
</Configurations> </Configurations>
<References> <References>
@@ -130,165 +194,227 @@
<Filter <Filter
Name="Source Files" Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"> UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File <File
RelativePath=".\CAlfrescoApp.cpp"> RelativePath=".\CAlfrescoApp.cpp"
>
</File> </File>
<File <File
RelativePath=".\CAlfrescoAppDlg.cpp"> RelativePath=".\CAlfrescoAppDlg.cpp"
>
</File> </File>
<File <File
RelativePath=".\FileStatusDialog.cpp"> RelativePath=".\stdafx.cpp"
</File> >
<File
RelativePath=".\stdafx.cpp">
<FileConfiguration <FileConfiguration
Name="Debug|Win32"> Name="Debug|Win32"
>
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
UsePrecompiledHeader="1"/> UsePrecompiledHeader="1"
/>
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release|Win32"> Name="Release|Win32"
>
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
UsePrecompiledHeader="1"/> UsePrecompiledHeader="1"
/>
</FileConfiguration> </FileConfiguration>
</File> </File>
<Filter <Filter
Name="util" Name="util"
Filter=""> >
<File <File
RelativePath=".\source\util\ByteArray.cpp"> RelativePath=".\source\util\ByteArray.cpp"
>
</File> </File>
<File <File
RelativePath=".\source\util\DataBuffer.cpp"> RelativePath=".\source\util\DataBuffer.cpp"
>
</File> </File>
<File <File
RelativePath=".\source\util\DataPacker.cpp"> RelativePath=".\source\util\DataPacker.cpp"
>
</File> </File>
<File <File
RelativePath=".\source\util\Exception.cpp"> RelativePath=".\source\util\Exception.cpp"
>
</File> </File>
<File <File
RelativePath=".\source\util\FileName.cpp"> RelativePath=".\source\util\FileName.cpp"
>
</File> </File>
<File <File
RelativePath=".\source\util\Integer.cpp"> RelativePath=".\source\util\Integer.cpp"
>
</File> </File>
<File <File
RelativePath=".\source\util\Long.cpp"> RelativePath=".\source\util\Long.cpp"
>
</File> </File>
<File <File
RelativePath=".\source\util\String.cpp"> RelativePath=".\source\util\String.cpp"
>
</File> </File>
<File <File
RelativePath=".\source\util\System.cpp"> RelativePath=".\source\util\System.cpp"
>
</File> </File>
</Filter> </Filter>
<Filter <Filter
Name="alfresco" Name="alfresco"
Filter=""> >
<File <File
RelativePath=".\source\alfresco\Alfresco.cpp"> RelativePath=".\source\alfresco\Alfresco.cpp"
>
</File>
<File
RelativePath=".\source\alfresco\Desktop.cpp"
>
</File> </File>
</Filter> </Filter>
</Filter> </Filter>
<Filter <Filter
Name="Header Files" Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd" Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"> UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File <File
RelativePath=".\CAlfrescoApp.h"> RelativePath=".\CAlfrescoApp.h"
>
</File> </File>
<File <File
RelativePath=".\CAlfrescoAppDlg.h"> RelativePath=".\CAlfrescoAppDlg.h"
>
</File> </File>
<File <File
RelativePath=".\FileStatusDialog.h"> RelativePath=".\Resource.h"
>
</File> </File>
<File <File
RelativePath=".\Resource.h"> RelativePath=".\stdafx.h"
</File> >
<File
RelativePath=".\stdafx.h">
</File> </File>
<Filter <Filter
Name="util" Name="util"
Filter=""> >
<File <File
RelativePath=".\includes\util\ByteArray.h"> RelativePath=".\includes\util\ByteArray.h"
>
</File> </File>
<File <File
RelativePath=".\includes\util\DataBuffer.h"> RelativePath=".\includes\util\DataBuffer.h"
>
</File> </File>
<File <File
RelativePath=".\includes\util\DataPacker.h"> RelativePath=".\includes\util\DataPacker.h"
>
</File> </File>
<File <File
RelativePath=".\includes\util\Exception.h"> RelativePath=".\includes\util\Exception.h"
>
</File> </File>
<File <File
RelativePath=".\includes\util\FileName.h"> RelativePath=".\includes\util\FileName.h"
>
</File> </File>
<File <File
RelativePath=".\includes\util\Integer.h"> RelativePath=".\includes\util\Integer.h"
>
</File> </File>
<File <File
RelativePath=".\includes\util\JavaTypes.h"> RelativePath=".\includes\util\JavaTypes.h"
>
</File> </File>
<File <File
RelativePath=".\includes\util\Long.h"> RelativePath=".\includes\util\Long.h"
>
</File> </File>
<File <File
RelativePath=".\includes\util\String.h"> RelativePath=".\includes\util\String.h"
>
</File> </File>
<File <File
RelativePath=".\includes\util\System.h"> RelativePath=".\includes\util\System.h"
>
</File> </File>
<File <File
RelativePath=".\includes\util\Types.h"> RelativePath=".\includes\util\Types.h"
>
</File> </File>
</Filter> </Filter>
<Filter <Filter
Name="alfresco" Name="alfresco"
Filter=""> >
<File <File
RelativePath=".\includes\alfresco\Alfresco.hpp"> RelativePath=".\includes\alfresco\Alfresco.hpp"
>
</File>
<File
RelativePath=".\includes\alfresco\Desktop.hpp"
>
</File> </File>
</Filter> </Filter>
</Filter> </Filter>
<Filter <Filter
Name="Resource Files" Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"> UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
<File <File
RelativePath=".\alfresco.ico"> RelativePath=".\alfresco.ico"
>
</File> </File>
<File <File
RelativePath=".\res\CAlfrescoApp.ico"> RelativePath=".\res\CAlfrescoApp.ico"
>
</File> </File>
<File <File
RelativePath=".\CAlfrescoApp.rc"> RelativePath=".\CAlfrescoApp.rc"
>
</File> </File>
<File <File
RelativePath=".\res\CAlfrescoApp.rc2"> RelativePath=".\res\CAlfrescoApp.rc2"
>
</File> </File>
</Filter> </Filter>
<File <File
RelativePath=".\CAlfrescoApp.htm" RelativePath=".\CAlfrescoApp.htm"
DeploymentContent="TRUE"> DeploymentContent="true"
>
</File> </File>
<File <File
RelativePath=".\res\CAlfrescoApp.manifest"> RelativePath=".\res\CAlfrescoApp.manifest"
>
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCustomBuildTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCustomBuildTool"
/>
</FileConfiguration>
</File> </File>
<File <File
RelativePath=".\ReadMe.txt"> RelativePath=".\ReadMe.txt"
>
</File> </File>
</Files> </Files>
<Globals> <Globals>
<Global <Global
Name="RESOURCE_FILE" Name="RESOURCE_FILE"
Value="CAlfrescoApp.rc"/> Value="CAlfrescoApp.rc"
/>
</Globals> </Globals>
</VisualStudioProject> </VisualStudioProject>

View File

@@ -1,111 +0,0 @@
/*
* Copyright (C) 2005-2006 Alfresco, Inc.
*
* Licensed under the Mozilla Public License version 1.1
* with a permitted attribution clause. You may obtain a
* copy of the License at
*
* http://www.alfresco.org/legal/license.txt
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the
* License.
*/
#include "stdafx.h"
#include "CAlfrescoApp.h"
#include "FileStatusDialog.h"
#include "util\Long.h"
// CFileStatusDialog dialog
IMPLEMENT_DYNAMIC(CFileStatusDialog, CDialog)
CFileStatusDialog::CFileStatusDialog(AlfrescoFileInfoList& fileList, CWnd* pParent /*=NULL*/)
: CDialog(CFileStatusDialog::IDD, pParent),
m_fileList( fileList)
{
}
CFileStatusDialog::~CFileStatusDialog()
{
}
void CFileStatusDialog::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
DDX_Control(pDX, IDC_FILELIST, m_listCtrl);
}
BEGIN_MESSAGE_MAP(CFileStatusDialog, CDialog)
END_MESSAGE_MAP()
/**
* Initialize the dialog
*/
BOOL CFileStatusDialog::OnInitDialog() {
// Call the base class
CDialog::OnInitDialog();
// Add headers to the list control
m_listCtrl.InsertColumn( 0, L"Name", LVCFMT_LEFT, 200);
m_listCtrl.InsertColumn( 1, L"Mime-type", LVCFMT_LEFT, 140);
m_listCtrl.InsertColumn( 2, L"Size", LVCFMT_RIGHT, 80);
m_listCtrl.InsertColumn( 3, L"Status", LVCFMT_LEFT, 100);
m_listCtrl.InsertColumn( 4, L"Owner", LVCFMT_LEFT, 100);
// Add the list view data
for ( unsigned int i = 0; i < m_fileList.size(); i++) {
// Get the current file information
const AlfrescoFileInfo* pInfo = m_fileList.getInfoAt( i);
// Add the item to the list view
if ( pInfo != NULL) {
// Insert a new item in the view
int nIndex = m_listCtrl.InsertItem( 0, pInfo->getName());
if ( pInfo->isType() == TypeFile) {
// Display the mime-type and content length
m_listCtrl.SetItemText( nIndex, 1, pInfo->getContentType());
m_listCtrl.SetItemText( nIndex, 2, Long::toString( pInfo->getContentLength()));
String status;
String owner;
if ( pInfo->isWorkingCopy()) {
status = L"Work";
}
else if ( pInfo->getLockType() != LockNone) {
status = L"Locked";
owner = pInfo->getLockOwner();
}
m_listCtrl.SetItemText( nIndex, 3, status);
m_listCtrl.SetItemText( nIndex, 4, owner);
}
}
}
// Clear the file info list
m_fileList.clear();
return FALSE;
}
// CFileStatusDialog message handlers

View File

@@ -1,50 +0,0 @@
/*
* Copyright (C) 2005-2006 Alfresco, Inc.
*
* Licensed under the Mozilla Public License version 1.1
* with a permitted attribution clause. You may obtain a
* copy of the License at
*
* http://www.alfresco.org/legal/license.txt
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the
* License.
*/
#pragma once
#include "afxcmn.h"
#include "alfresco\Alfresco.hpp"
// CFileStatusDialog dialog
class CFileStatusDialog : public CDialog
{
DECLARE_DYNAMIC(CFileStatusDialog)
public:
CFileStatusDialog( AlfrescoFileInfoList& fileList, CWnd* pParent = NULL); // standard constructor
virtual ~CFileStatusDialog();
// Dialog Data
enum { IDD = IDD_FILESTATUS };
// Initialize the dialog
BOOL OnInitDialog();
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
DECLARE_MESSAGE_MAP()
CListCtrl m_listCtrl;
protected:
// File information list
AlfrescoFileInfoList& m_fileList;
};

View File

@@ -1,40 +0,0 @@
// FileStatusView.cpp : implementation file
//
#include "stdafx.h"
#include "CAlfrescoApp.h"
#include "FileStatusView.h"
// CFileStatusView
IMPLEMENT_DYNCREATE(CFileStatusView, CListView)
CFileStatusView::CFileStatusView()
{
}
CFileStatusView::~CFileStatusView()
{
}
BEGIN_MESSAGE_MAP(CFileStatusView, CListView)
END_MESSAGE_MAP()
// CFileStatusView diagnostics
#ifdef _DEBUG
void CFileStatusView::AssertValid() const
{
CListView::AssertValid();
}
void CFileStatusView::Dump(CDumpContext& dc) const
{
CListView::Dump(dc);
}
#endif //_DEBUG
// CFileStatusView message handlers

View File

@@ -1,24 +0,0 @@
#pragma once
// CFileStatusView view
class CFileStatusView : public CListView
{
DECLARE_DYNCREATE(CFileStatusView)
protected:
CFileStatusView(); // protected constructor used by dynamic creation
virtual ~CFileStatusView();
public:
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
DECLARE_MESSAGE_MAP()
};

View File

@@ -25,17 +25,22 @@
#include <vector> #include <vector>
#include <algorithm> #include <algorithm>
#include "util\Exception.h" #include "util\Exception.h"
#include "util\String.h" #include "util\String.h"
#include "util\DataBuffer.h" #include "util\DataBuffer.h"
#include "alfresco\Desktop.hpp"
// Classes defined in this header file // Classes defined in this header file
namespace Alfresco { namespace Alfresco {
class AlfrescoInterface; class AlfrescoInterface;
class AlfrescoFileInfo; class AlfrescoFileInfo;
class AlfrescoFileInfoList; class AlfrescoFileInfoList;
class AlfrescoActionInfo;
typedef std::auto_ptr<AlfrescoFileInfo> PTR_AlfrescoFileInfo; typedef std::auto_ptr<AlfrescoFileInfo> PTR_AlfrescoFileInfo;
typedef std::auto_ptr<AlfrescoActionInfo> PTR_AlfrescoActionInfo;
} }
// Constants // Constants
@@ -44,10 +49,12 @@ namespace Alfresco {
// Alfresco I/O control codes // Alfresco I/O control codes
#define FSCTL_ALFRESCO_PROBE CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 0x800, METHOD_BUFFERED, FILE_ANY_ACCESS) #define FSCTL_ALFRESCO_PROBE CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 0x800, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define FSCTL_ALFRESCO_FILESTS CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 0x801, METHOD_BUFFERED, FILE_ANY_ACCESS) #define FSCTL_ALFRESCO_FILESTS CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 0x801, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define FSCTL_ALFRESCO_CHECKOUT CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 0x802, METHOD_BUFFERED, FILE_WRITE_DATA) // Version 1 FSCTL_ALFRESCO_CHECKOUT - 0x802
#define FSCTL_ALFRESCO_CHECKIN CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 0x803, METHOD_BUFFERED, FILE_WRITE_DATA) // Version 1 FSCTL_ALFRESCO_CHECKIN - 0x803
#define FSCTL_ALFRESCO_GETACTIONINFO CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 0x804, METHOD_BUFFERED, FILE_WRITE_DATA)
#define FSCTL_ALFRESCO_RUNACTION CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 0x805, METHOD_BUFFERED, FILE_WRITE_DATA)
// Request signature bytes // Request signature bytes
@@ -68,6 +75,9 @@ namespace Alfresco {
#define StsAccessDenied 3 #define StsAccessDenied 3
#define StsBadParameter 4 #define StsBadParameter 4
#define StsNotWorkingCopy 5 #define StsNotWorkingCopy 5
#define StsNoSuchAction 6
#define StsLaunchURL 7
#define StsCommandLine 8
// Boolean field values // Boolean field values
@@ -86,6 +96,26 @@ namespace Alfresco {
#define LockNone 0 #define LockNone 0
#define LockRead 1 #define LockRead 1
#define LockWrite 2 #define LockWrite 2
// Desktop action attributes
#define AttrTargetFiles 0x0001
#define AttrTargetFolders 0x0002
#define AttrClientFiles 0x0004
#define AttrClientFolders 0x0008
#define AttrAlfrescoFiles 0x0010
#define AttrAlfrescoFolders 0x0020
#define AttrMultiplePaths 0x0040
#define AttrAnyFiles (AttrTargetFiles + AttrClientFiles + AttrAlfrescoFiles)
#define AttrAnyFolders (AttrTargetFolders + AttrClientFolders + AttrAlfrescoFolders)
#define AttrAnyFilesFolders (AttrAnyFiles + AttrAnyFolders)
// Desktop action pre-processing actions
#define PreCopyToTarget 0x0001
#define PreConfirmAction 0x0002
#define PreLocalToWorkingCopy 0x0004
} }
// Define Alfresco interface exceptions // Define Alfresco interface exceptions
@@ -122,17 +152,21 @@ public:
bool isAlfrescoFolder( void); bool isAlfrescoFolder( void);
// Return the protocol version of the server
inline const unsigned int isProtocolVersion( void) const { return m_protocolVersion; }
// Return the Alfresco file information for a file/folder within the current folder // Return the Alfresco file information for a file/folder within the current folder
PTR_AlfrescoFileInfo getFileInformation(const wchar_t* fileName); PTR_AlfrescoFileInfo getFileInformation(const wchar_t* fileName);
// Check in a working copy file // Get action information, map the executable name to a server action
void checkIn( const wchar_t* fileName, bool keepCheckedOut = false); AlfrescoActionInfo getActionInformation(const wchar_t* exeName);
// Check out a file // Run a desktop action and return the server response
void checkOut( const wchar_t* fileName, String& workingCopy); DesktopResponse runAction(AlfrescoActionInfo& action, DesktopParams& params);
private: private:
// Send an I/O control request, receive and validate the response // Send an I/O control request, receive and validate the response
@@ -160,6 +194,9 @@ private:
HANDLE m_handle; HANDLE m_handle;
// Protocol version
unsigned int m_protocolVersion;
}; };
/** /**
@@ -292,4 +329,82 @@ private:
std::vector<AlfrescoFileInfo*> m_list; std::vector<AlfrescoFileInfo*> m_list;
}; };
/**
* Alfresco Action Info Class
*/
class Alfresco::AlfrescoActionInfo {
public:
// Default constructor
AlfrescoActionInfo(void);
// Class constructor
AlfrescoActionInfo( const String& name, const unsigned int attr, const unsigned int preActions);
// Return the action name, pseudo file name
inline const String& getName(void) const { return m_name; }
inline const String& getPseudoName(void) const { return m_pseudoName; }
// Return the action attributes, action pre-processing flags
inline unsigned int getAttributes(void) const { return m_attributes; }
inline unsigned int getPreProcessActions(void) const { return m_clientPreActions; }
// Check if the action has the specifed attribute/pre-processing action
inline bool hasAttribute(const unsigned int attr) const { return (m_attributes & attr) != 0 ? true : false; }
inline bool hasPreProcessAction(const unsigned int pre) const { return (m_clientPreActions & pre) != 0 ? true : false; }
// Check if the confirmation message is valid, return the confirmation message
inline bool hasConfirmationMessage(void) const { return m_confirmMsg.length() > 0 ? true : false; }
inline const String& getConfirmationMessage(void) const { return m_confirmMsg; }
// Check if the action supports file or folder paths
inline bool supportsFiles(void) const { return hasAttribute(AttrTargetFiles+AttrClientFiles+AttrAlfrescoFiles); }
inline bool supportsFolders(void) const { return hasAttribute(AttrTargetFolders+AttrClientFolders+AttrAlfrescoFolders); }
// Set the action name, pseudo name, set the confirmation message
inline void setName(const String& name) { m_name = name; }
inline void setPseudoName(const String& pseudo) { m_pseudoName = pseudo; }
inline void setConfirmationMessage(const String& msg) { m_confirmMsg = msg; }
// Set the action attributes and pre-processing actions
inline void setAttributes(const unsigned int attr) { m_attributes = attr; }
inline void setPreProcessActions(const unsigned int pre) { m_clientPreActions = pre; }
// Return the action information as a string
const String toString(void) const;
// Assignment operator
AlfrescoActionInfo& operator=( const AlfrescoActionInfo& actionInfo);
private:
// Instance variables
//
// Action name
String m_name;
// Pseudo file name
String m_pseudoName;
// Action attributes and pre-processing flags
unsigned int m_attributes;
unsigned int m_clientPreActions;
// Action confirmation message
String m_confirmMsg;
};
#endif #endif

View File

@@ -40,6 +40,10 @@ AlfrescoInterface::AlfrescoInterface(String& path) {
m_handle = INVALID_HANDLE_VALUE; m_handle = INVALID_HANDLE_VALUE;
// Default the protocol version
m_protocolVersion = 1;
// Check if the path is to a mapped drive // Check if the path is to a mapped drive
String alfPath = path; String alfPath = path;
@@ -136,8 +140,17 @@ bool AlfrescoInterface::isAlfrescoFolder( void) {
bool alfFolder = false; bool alfFolder = false;
try { try {
// Check if the remote server is an Alfresco CIFS server
sendIOControl( FSCTL_ALFRESCO_PROBE, reqbuf, respbuf); sendIOControl( FSCTL_ALFRESCO_PROBE, reqbuf, respbuf);
alfFolder = true; alfFolder = true;
// Get the protocol version, if available
respbuf.getInt(); // status
if ( respbuf.getAvailableLength() >= 4)
m_protocolVersion = respbuf.getInt();
} }
catch ( Exception ex) { catch ( Exception ex) {
} }
@@ -229,102 +242,102 @@ PTR_AlfrescoFileInfo AlfrescoInterface::getFileInformation( const wchar_t* fileN
} }
/** /**
* Check in a working copy file * Return Alfresco action information for the specified executable
* *
* @param fileName const wchar_t* * @param fileName const wchar_t*
* @param keepCheckedOut bool * @return AlfrescoActionInfo
*/ */
void AlfrescoInterface::checkIn( const wchar_t* fileName, bool keepCheckedOut) { AlfrescoActionInfo AlfrescoInterface::getActionInformation( const wchar_t* exeName) {
// Check if the folder handle is valid // Check if the folder handle is valid
if ( m_handle == INVALID_HANDLE_VALUE) if ( m_handle == INVALID_HANDLE_VALUE)
throw BadInterfaceException(); throw BadInterfaceException();
// Build the file information I/O control request // Build the action information I/O control request
DataBuffer reqbuf( 256); DataBuffer reqbuf( 256);
DataBuffer respbuf( 128); DataBuffer respbuf( 512);
reqbuf.putFixedString( IOSignature, IOSignatureLen); reqbuf.putFixedString( IOSignature, IOSignatureLen);
reqbuf.putString( fileName); reqbuf.putString( exeName);
reqbuf.putInt( keepCheckedOut ? True : False);
sendIOControl( FSCTL_ALFRESCO_CHECKIN, reqbuf, respbuf); sendIOControl( FSCTL_ALFRESCO_GETACTIONINFO, reqbuf, respbuf);
// Get the status code // Unpack the request status
unsigned int stsCode = respbuf.getInt(); AlfrescoActionInfo actionInfo;
if ( stsCode == StsSuccess)
return;
else {
// Get the error message, if available unsigned int reqSts = respbuf.getInt();
if ( reqSts == StsSuccess) {
String errMsg; // Unpack the action name, attributes and pre-action flags
if ( respbuf.getAvailableLength() > 0) String name = respbuf.getString();
errMsg = respbuf.getString(); unsigned int attr = respbuf.getInt();
else { unsigned int preActions = respbuf.getInt();
errMsg = "Error code "; String confirmMsg = respbuf.getString();
errMsg.append( Integer::toString( stsCode));
}
// Throw an exception // Create the action information
throw Exception( errMsg); actionInfo.setName(name);
actionInfo.setAttributes(attr);
actionInfo.setPreProcessActions(preActions);
actionInfo.setPseudoName( exeName);
actionInfo.setConfirmationMessage( confirmMsg);
} }
// Return the action information
return actionInfo;
} }
/** /**
* Check out a file and return the working copy file name * Run a desktop action
* *
* @param fileName const wchar_t* * @param action AlfrescoActionInfo&
* @param workingCopy String& * @param params DesktopParams&
* @return DesktopResponse
*/ */
void AlfrescoInterface::checkOut( const wchar_t* fileName, String& workingCopy) { DesktopResponse AlfrescoInterface::runAction(AlfrescoActionInfo& action, DesktopParams& params) {
// Check if the folder handle is valid // Check if the folder handle is valid
if ( m_handle == INVALID_HANDLE_VALUE) if ( m_handle == INVALID_HANDLE_VALUE)
throw BadInterfaceException(); throw BadInterfaceException();
// Build the file information I/O control request // Build the run action I/O control request
DataBuffer reqbuf( 256); DataBuffer reqbuf( 1024);
DataBuffer respbuf( 256); DataBuffer respbuf( 256);
reqbuf.putFixedString( IOSignature, IOSignatureLen); reqbuf.putFixedString( IOSignature, IOSignatureLen);
reqbuf.putString( fileName); reqbuf.putString( action.getName());
reqbuf.putInt((unsigned int)params.numberOfTargets());
sendIOControl( FSCTL_ALFRESCO_CHECKOUT, reqbuf, respbuf); for ( unsigned int i = 0; i < params.numberOfTargets(); i++) {
// Get the status code // Pack the current target details
unsigned int stsCode = respbuf.getInt(); const DesktopTarget* pTarget = params.getTarget(i);
if ( stsCode == StsSuccess) {
// Get the working copy file name reqbuf.putInt(pTarget->isType());
reqbuf.putString(pTarget->getTarget());
workingCopy = respbuf.getString();
} }
else {
// Get the error message, if available // Send the run action request
String errMsg; sendIOControl( FSCTL_ALFRESCO_RUNACTION, reqbuf, respbuf);
if ( respbuf.getAvailableLength() > 0) // Unpack the run action response
errMsg = respbuf.getString();
else {
errMsg = "Error code ";
errMsg.append( Integer::toString( stsCode));
}
// Throw an exception unsigned int actionSts = respbuf.getInt();
String actionMsg = respbuf.getString();
throw Exception( errMsg); // Return the desktop response
}
DesktopResponse response(actionSts, actionMsg);
return response;
} }
/** /**
@@ -439,3 +452,67 @@ bool AlfrescoFileInfo::operator<( const AlfrescoFileInfo& finfo) {
return true; return true;
return false; return false;
} }
/**
* Default constructor
*/
AlfrescoActionInfo::AlfrescoActionInfo(void) {
m_attributes = 0;
m_clientPreActions = 0;
}
/**
* Class constructor
*
* @param name const String&
* @param attr const unsigned int
* @param preActions const unsigned int
*/
AlfrescoActionInfo::AlfrescoActionInfo( const String& name, const unsigned int attr, const unsigned int preActions) {
m_name = name;
m_attributes = attr;
m_clientPreActions = preActions;
}
/**
* Return the action information as a string
*
* @return const String
*/
const String AlfrescoActionInfo::toString(void) const {
String str = L"[";
str.append(getName());
str.append(L":");
str.append(getPseudoName());
str.append(L":Attr=0x");
str.append(Integer::toHexString(getAttributes()));
str.append(L":preActions=0x");
str.append(Integer::toHexString(getPreProcessActions()));
if ( hasConfirmationMessage()) {
str.append(L":Conf=");
str.append(getConfirmationMessage());
}
str.append(L"]");
return str;
}
/**
* Assignment operator
*
* @param actionInfo const AlfrescoActionInfo&
* @return AlfrescoActionInfo&
*/
AlfrescoActionInfo& AlfrescoActionInfo::operator=( const AlfrescoActionInfo& actionInfo) {
setName(actionInfo.getName());
setPseudoName(actionInfo.getPseudoName());
setAttributes(actionInfo.getAttributes());
setPreProcessActions(actionInfo.getPreProcessActions());
setConfirmationMessage(actionInfo.getConfirmationMessage());
return *this;
}

View File

@@ -27,7 +27,7 @@ using namespace Alfresco;
*/ */
String Integer::toHexString( const unsigned int ival) { String Integer::toHexString( const unsigned int ival) {
char buf[32]; char buf[32];
itoa(ival, buf, 16); _itoa(ival, buf, 16);
return String(buf); return String(buf);
} }
@@ -52,7 +52,7 @@ String Integer::toHexString( BUFPTR ptr) {
*/ */
String Integer::toString( unsigned int ival, unsigned int radix) { String Integer::toString( unsigned int ival, unsigned int radix) {
char buf[32]; char buf[32];
itoa(ival, buf, radix); _itoa(ival, buf, radix);
return String(buf); return String(buf);
} }

View File

@@ -695,7 +695,7 @@ void String::append (const String& str) {
*/ */
void String::append (const unsigned int ival) { void String::append (const unsigned int ival) {
wchar_t buf[32]; wchar_t buf[32];
swprintf( buf, L"%u", ival); swprintf( buf, 32, L"%u", ival);
m_string += buf; m_string += buf;
} }
@@ -707,7 +707,7 @@ void String::append (const unsigned int ival) {
*/ */
void String::append (const unsigned long lval) { void String::append (const unsigned long lval) {
wchar_t buf[32]; wchar_t buf[32];
swprintf( buf, L"%lu", lval); swprintf( buf, 32, L"%lu", lval);
m_string += buf; m_string += buf;
} }
@@ -719,7 +719,7 @@ void String::append (const unsigned long lval) {
*/ */
void String::append (const LONG64 l64val) { void String::append (const LONG64 l64val) {
wchar_t buf[32]; wchar_t buf[32];
swprintf( buf, L"%I64u", l64val); swprintf( buf, 32, L"%I64u", l64val);
m_string += buf; m_string += buf;
} }