|
Hi all,
I'm a home-based developer who has a single desktop machine with Visual SourceSafe 6 installed. I recently purchased a notebook.
I'd like to know how can I share a single codebase between the 2 computers, considering that they will not always be connected to each other. i.e. I want to be able to sync both machines, take my notebook offsite, make various code changes to the notebook's VSS database, and later reconnect the 2 machines and sync the changes with my desktop machine's VSS database.
Can I use XP Pro's Offline Files capabilities to keep both versions in sync? Is it safe to just sync the files under VSS\data? Does anyone have any alternative suggestions or caveats?
Many thanks,
Gary
|
|
|
|
|
I do not see how this situation differs from any other networked enviroment. My VSS database resides on a server machine in the computer room, and I check out files from my desktop. If my desktop loses its connection to the network, I can still work on those files and check them in when I am done (and the network connection has been restored). I do not need to keep a separate VSS database on my desktop.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
I should have been more specific. Ideally I want to run VSS on the laptop so I can do several days of development (including being able to undo checkouts when I really screw things up) between syncs.
Gary
|
|
|
|
|
i need to be able to dial a phone number from my modem.
|
|
|
|
|
|
Using fprintf? Thanks
<italic>Work hard and a bit of luck is the key to success. You don`t need to be genius, to be rich.
|
|
|
|
|
Why are you using C instead of C++ ? Surely it would be easier to direct an ifstream to the printer ?
You can use any sort of output method you like to print, so long as you direct it to the print DC.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
My intention was to print like a DOS application would do? You know, like the printing output of a chashier machine. I hope you understand what I meant. I think, I got the wrong concept about this printing thing. Any idea how to print like the DOS? Do I have to code for that, or set the printer?
<italic>Work hard and a bit of luck is the key to success. You don`t need to be genius, to be rich.
|
|
|
|
|
You can open a file handle to the printer using "LPT1" as the file name in the fopen function.
FILE *pPrinter = fopen(_T("LPT1"), _T("w"));
if (pPrinter)
{
fprintf(pPrinter, _T("Hello World"));
}
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
Thank you.
<italic>Work hard and a bit of luck is the key to success. You don`t need to be genius, to be rich.
|
|
|
|
|
Hello guys,
Does anyone have a suggestion on how to write XML function "translate" in C++?
Thank you in advance,
Ruta
|
|
|
|
|
What does the translate() function do? Did you mean transcode() ?
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
|
Smells like homework. See strlen() and strchr() to get started.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
it is the homework, indeed
|
|
|
|
|
Dear ALL
I want to define a new library in Microsoft VC++.
Here is the link of instructions to install the library,
http://lancet.mit.edu/galib-2.4/Installation.html#win
but I am not an expert programmer, so if anyone give me a simple procedure to install this library, I would be so grateful.
Thanks a lot
|
|
|
|
|
I want to connect to a running instance of Mozilla Firefox. I
would like to change the URL in the address bar or to fill
input-boxes with text. This is an easy task in Microsoft Internet
Explorer using IWebBrowser2, IHTMLDocument2, IHTMLElement or
others but how do I do this in Mozilla Firefox?
|
|
|
|
|
which one can tell me this answer?
thanks!
|
|
|
|
|
Can anybody indicate me to code that lists the content of a directory on a FAT32 drive? I'm not using MFC...
|
|
|
|
|
|
FindFirstFile ... FindNextFile
MSDN has some examples
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Dear ALL
I want to define a new library in Microsoft VC++.
Here is the link of instructions to install the library, but I am not an expert programmer, so if anyone give me a simple procedure to install this library, I would be so grateful.
Thanks a lot
|
|
|
|
|
I'm coding a set a functions to help me debugging by printing messages. I currently have 2 options; either on the console or in a file. That's enough for what I need but I'm just curious to know if it would be possible to do the same with a message box. That's what I have so far.
<br />
enum modes {<br />
CONSOLE, <br />
FILE,<br />
MSG_BOX,<br />
};<br />
<br />
class ErrorLogger {<br />
std::ostream *stream;<br />
std::ofstream *fileOut;<br />
public:<br />
ErrorLogger(modes mode) {<br />
if (mode == CONSOLE)<br />
stream = new std::ostream(std::cout.rdbuf());<br />
else if (mode == FILE) {<br />
fileOut = new std::ofstream("message.log");<br />
stream = new std::ostream(fileOut->rdbuf());<br />
}<br />
else if (mode == MSG_BOX) {<br />
stream = new std::ostream()<br />
}<br />
}<br />
std::ostream &GetStream() { return (*stream); }<br />
};<br />
<br />
template<class T> <br />
void Print(ErrorLogger &logger, T _data) {<br />
logger.GetStream() << _data;<br />
}<br />
Thank you.
-edit-
I need to do something else than code tags for correct formating?
|
|
|
|
|
try swprintf
You will get a string with your message in it. Then, just use Windows API AfxMessageBox to display the string on the Message Box
"Aerodynamically, the bumble bee shouldn't be able to fly, but the
bumble bee doesn't know it so it goes on flying anyway." - Mary Kay Ash
My Articles
|
|
|
|
|
i tried to get filename by a filehandle that was obtained by CreatFile func.
but after checking all MSDN reference,i found there is no API func can implement it directly.
the only way to do is that use the CreateFileMapping and MapViewOfFile functions to create the mapping and then use the GetMappedFileName function to obtain the file name;
such as the following code(copied from MSDN):
BOOL GetFileNameFromHandle(HANDLE hFile)
{
BOOL bSuccess = FALSE;
TCHAR pszFilename[MAX_PATH+1];
HANDLE hFileMap;
// Get the file size.
DWORD dwFileSizeHi = 0;
DWORD dwFileSizeLo = GetFileSize(hFile, &dwFileSizeHi);
if( dwFileSizeLo == 0 && dwFileSizeHi == 0 )
{
printf("Cannot map a file with a length of zero.\n");
return FALSE;
}
// Create a file mapping object.
hFileMap = CreateFileMapping(hFile,
NULL,
PAGE_READONLY,
0,
1,
NULL);
if (hFileMap)
{
// Create a file mapping to get the file name.
void* pMem = MapViewOfFile(hFileMap, FILE_MAP_READ, 0, 0, 1);
if (pMem)
{
if (GetMappedFileName (GetCurrentProcess(),
pMem,
pszFilename,
MAX_PATH))
{
// Translate path with device name to drive letters.
TCHAR szTemp[BUFSIZE];
szTemp[0] = '\0';
if (GetLogicalDriveStrings(BUFSIZE-1, szTemp))
{
TCHAR szName[MAX_PATH];
TCHAR szDrive[3] = TEXT(" :");
BOOL bFound = FALSE;
TCHAR* p = szTemp;
do
{
// Copy the drive letter to the template string
*szDrive = *p;
// Look up each device name
if (QueryDosDevice(szDrive, szName, BUFSIZE))
{
UINT uNameLen = _tcslen(szName);
if (uNameLen < MAX_PATH)
{
bFound = _tcsnicmp(pszFilename, szName,
uNameLen) == 0;
if (bFound)
{
// Reconstruct pszFilename using szTemp
// Replace device path with DOS path
TCHAR szTempFile[MAX_PATH];
_stprintf(szTempFile,
TEXT("%s%s"),
szDrive,
pszFilename+uNameLen);
_tcsncpy(pszFilename, szTempFile, MAX_PATH);
}
}
}
// Go to the next NULL character.
while (*p++);
} while (!bFound && *p); // end of string
}
}
bSuccess = TRUE;
UnmapViewOfFile(pMem);
}
CloseHandle(hFileMap);
}
printf("File name is %s\n", pszFilename);
return(bSuccess);
}
i wanna know why MS not provide a func to get filename by file handle directly but to use MapView,I guess that must be with some reasons.
Thanks!;P
Stick to C++
|
|
|
|