|
|
От: |
sokel
|
|
| Дата: | 04.08.06 07:02 | ||
| Оценка: | |||
HANDLE h1, h2, h3, h4;
h1 = h2 = h3 = h4 = NULL;
int ret = ERROR_CODE;
if((h1 = SomeFunc1()) && (h2 = SomeFunc2()) && (h3 = SomeFunc3()) && (h4 = SomeFunc4()))
{
if (Condition1) { DoSomething(); ret = OK_1; }
else if (Condition2) { DoSomething(); ret = OK_2; }
//..
else ret = OK_7;
}
if(h1)CloseHandle(h1);
if(h2)CloseHandle(h2);
if(h3)CloseHandle(h3);
if(h4)CloseHandle(h4);
return ret;