[shell-coding] try() catch()
- From: Bgvinyard@xxxxxxx
- To: shell-coding@xxxxxxxxxxxxx
- Date: Mon, 20 Jan 2003 21:20:09 EST
Ok... im not too sure on this so thought i would get some expert help...
given this:
class Localization
{
public:
Localization();
~Localization();
void LoadLanguage(LANGID wLanguageID);
int LoadString(UINT uID, LPTSTR ptzBuffer, size_t cchMax);
int MessageBox(HWND hWnd, UINT uText, UINT uCaption, UINT uType);
int MessageBox(HWND hWnd, LPCTSTR ptzText, UINT uCaption, UINT
uType);
private:
HINSTANCE m_hRes;
LANGID m_wLanguageID;
};
I want to do something like this:
try
{
...
}
catch(...)
{
TCHAR tzError[MAX_LINE_LENGTH];
Localization lError;
if (lError.LoadString(IDS_MODULEINITEXCEPTION_ERROR, tzError,
MAX_LINE_LENGTH))
{
TCHAR tzErrorEx[MAX_LINE_LENGTH];
StringCchPrintf(tzErrorEx, MAX_LINE_LENGTH, tzError, iter->
first.c_str());
lError.MessageBox(NULL, tzErrorEx, IDS_LITESTEP_TITLE_ERROR);
}
}
I'm not sure this would affect object unwinding because its withing the catch
block, unless
the code within the catch block throws an exception... any comments?
suggestions?
Thanks
Message
- Follow-Ups:
- [shell-coding] Re: try() catch()
- From: Shaheen Gandhi
- [shell-coding] Re: try() catch()
- From: Daij-Djan
- [shell-coding] Remoting mp3 players
- From: Daij-Djan
Other related posts:
- » [shell-coding] try() catch()
- » [shell-coding] Re: try() catch()
- » [shell-coding] Re: try() catch()
- » [shell-coding] Re: try() catch()
- [shell-coding] Re: try() catch()
- From: Shaheen Gandhi
- [shell-coding] Re: try() catch()
- From: Daij-Djan
- [shell-coding] Remoting mp3 players
- From: Daij-Djan