Necesito una mano con un problema que no detecto.
En este código:
/**********************/
hRes = ::SafeArrayUnlock(m_pSafeStore);
fprintf(m_pfData, "SafeArrayUnlock");
fprintf(m_pfData, "\tS_OK = %s", (hRes==S_OK)?"Sí":"No");
//rgsabound[0].lLbound = 0;
rgsabound = m_pSafeStore->rgsabound[0];
rgsabound.cElements = m_lLengthStore + count;
hRes = ::SafeArrayRedim(m_pSafeStore, &rgsabound);
if ( FAILED (hRes) ) {
fprintf(m_pfData, "Redim Failed");
fprintf(m_pfData, "\tDISP_E_ARRAYISLOCKED = %s",
(hRes==DISP_E_ARRAYISLOCKED)?"Sí":"No");
fprintf(m_pfData, "\tE_INVALIDARG = %s",
(hRes==E_INVALIDARG)?"Sí":"No");
::SafeArrayLock(m_pSafeStore);
LeaveCriticalSection(&CriticalSectionSafeStore);
return;
}
::SafeArrayLock(m_pSafeStore);
/**********************/
El llamado a SafeArrayUnlock, devuelve S_OK, sin embargo SafeArrayRedim,
devuelve DISP_E_ARRAYISLOCKED, me estoy olvidando de algo? Que no estoy
teniendo en cuenta?
Gracias a todos.
Sebastián Flores.
Leer las respuestas