I am using the DirectWrite API and I am implementing my own layout and text rendering engine. I have already created my IDWriteTextLayout
object successfully. When I make the following call I receive an Access Violation error and I have no idea why:
DWRITE_LINE_METRICS m_lineMetrics;
UINT32 m_lineCount;
DX::ThrowIfFailed(
m_textLayout->GetLineMetrics(&m_lineMetrics,31,&m_lineCount)
);