C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,995 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I'm continually getting this error message but I can't find the source. Here's a link to the .dll class I want to utilize:
And here's the c# class I'm calling it from:
There are two initial problems with the projects in the posted links.
I quickly tested your DLL and you create m_pDirect2dFactory after InitD3D where you call it in
hr = m_pDirect2dFactory->CreateDxgiSurfaceRenderTarget(pBackBuffer, &props, &m_pBackBufferRT);
so it crashes as m_pDirect2dFactory = NULL.
(and you don't need any DLL for Direct2D, you can use P/Invoke in WPF (like in the WinUI 3 samples I posted...)