| || |
Downloading attachments via API
I am writing a C programm for exporting all tests attachments.
Code is like:
<font class="small">Code:</font><hr /><pre>
IAttachmentFactoryPtr attFact = test->GetAttachments();
IListPtr attList = attFact->NewList("");
for (int att_c=1; att_c<=attList->GetCount(); att_c++)
IAttachmentPtr att = attList->GetItem(att_c);
if(att->GetType() == TDATT_FILE)
HRESULT res = att->Load(TRUE,"C:\");
1) First problem is that I can't load it to "C:/". By some reason this parameter repla&#1089;ed by att->FileName value.
2) Second problem appears when there are two or more files attached to single test. Load function returns "OK" code for fist file but then stops and no files are loaded.
Any help is appreciated!