Skip to content

small code fix to avoid timeout in GetDeviceInfo() call #13

@erkr

Description

@erkr

This line seems to intermittently cause a timeout in my code:
status = ml.getDevInfo(&(devices.m_psa), &(ledCount.m_psa)); //the function will modify the pointer to the descriptor .m_psa, which is itself a pointer to the actual safearray
better seems to be:
SAFEARRAY *psad = NULL, *psal = NULL; status = _GetDeviceInfo(&(psad), &(psal)); if (status == MLAPI_OK) { devices.Attach(psad); ledCount.Attach(psal); // do your stuff }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions