Rob Groves
Posts
-
Send Print Job -
FTP and Ident Server :: WinsockThis may help..... http://www.faqs.org/rfcs/rfc2228.html Rob.
-
EDIT BOX Control-Text alignment...RICHEDIT provides right justification, but I'm not sure about Right-To-Left-Reading-Order Cheers, Rob.
-
CString parsingThe quoted article will help I'm sure, but I have found the following 2 approaches to be useful, alone or in combination. 1) The MFC COleDateTime class provides some string parsing capabilities, and you can then check the GetStatus() return code. 2) Alternatively, you could try something like: bool ConvertTimeStr(const CString& TimeStr, CTime& Dest) { int hh, mi, ss; char ch; // ch catches junk beyond end of string if (sscanf(TimeStr, "%d:%d:%d%c", &hh, &mi, &ss, &ch) != 3) return false // now check for valid days of month etc. // The MFC classes can be used to do this. return whatever!! }
-
I am confused ... Unhandled Exception in server.exe (NTDLL.DLL): 0xC0000008: Invalid Handle.You need to be more specific about the problem, without this you will not be able to get help. Reproduce your problem in a few lines of code. In doing so you may solve the problem yourself, but if not you will be able to be more specific and others can help you. Cheers, Rob.
-
Changing a project to Statically LinkYou may also need to select project, settings, c++, code generation (from memory) and make sure that the C runtime is also statically linked. Cheers, Rob.
-
Returning a file nameRalfPeter wrote: How can I check for the existence of a file in a directory? I need to check it before overwriting the file. Thx, Ralf. Windows, C runtime versions already submitted, but if you are addicted to MFC try the following...
BOOL FileUtil::FileExists(const CString& strFile)
{
CFileStatus fs;
if (!CFile::GetStatus(strFile, fs))
return FALSE;
else
return TRUE;
} -
Build #'s, Version Tracking and suchI saw something that might meet you needs here, haven't tried it myself though... http://www.codeguru.com/devstudio\_macros/build\_number.shtml
-
Does this code leaks memory?I don't think there are leaks in your code. It could be that the complaint is about the line below //HERE, as your tool has no way of knowing that SafeArrayDestroy() will delete the BSTRs in the array. Also, in my opinion, your calls to ReleaseBuffer() and FreeExtra() are not necessary. Cheers, Rob.