>i have a compiled dll, and i want to see what values ar in certain methods
> during run time. i have built the release build . is there a way to write
> to
> a text file on my desktop or qa desktop?
Check the docs for SHGetFolderPath() with CSIDL_DESKTOPDIRECTORY. That will
get you the fully qualified path to the desktop folder. Use that to create a
file name.
You have a number of options to create a file name. For example, can use
SetCurrentDirectory() and then GetTempFileName() or _splitpath() and
_makepath().
Once you have a file name, you can create it however you like -
CreateFile(), fopen(), CFile class etc.
Regards.
Will
jigi - 19 Oct 2005 21:30 GMT
i keep getting error when using vc++.net with fopen
>>i have a compiled dll, and i want to see what values ar in certain methods
>> during run time. i have built the release build . is there a way to write
[quoted text clipped - 14 lines]
>Regards.
>Will
Tom Serface - 19 Oct 2005 21:44 GMT
For the most part if you are writing Windows programs I'd use CreateFile,
ReadFile, and WriteFile (or the Ex versions). I just wrote this routine
yesterday (uses MFC sorry) to create a temp file name:
CString GetTempFilePath(LPCTSTR strPattern)
{
CString csPath;
if(GetTempPath(_MAX_PATH,csPath.GetBuffer(_MAX_PATH+1)) != 0) {
csPath.ReleaseBuffer();
CString csTempFile;
if(GetTempFileName(csPath,strPattern,0,csTempFile.GetBuffer(_MAX_PATH+1))
!= 0) {
csTempFile.ReleaseBuffer();
return csTempFile;
}
}
return CString();
}
Using the functions that Will is referring to. It works pretty well
actually.
Tom
>i keep getting error when using vc++.net with fopen
>
[quoted text clipped - 20 lines]
>>Regards.
>>Will
William DePalo [MVP VC++] - 19 Oct 2005 22:25 GMT
>i keep getting error when using vc++.net with fopen
Which one?
Did you try to diagnose the problem looking at errno or strerror()?
Regards,
Will