Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Direct2D, suspicious error output in console

90 views
Skip to first unread message

docschnipp

unread,
Nov 1, 2009, 11:13:02 AM11/1/09
to
when using Direct2D, I am getting a suspicious error message in the console
during the RenderTarget->BeginDraw() call:

First-chance exception at 0x75bfb727 in testd2dui.exe: Microsoft C++
exception: _com_error at memory location 0x0018ea60..

the code that creates my DCRenderTarget is as follows:

...
mHelper = new ContextInternals();
mHelper->mTargetProperties = D2D1::RenderTargetProperties();
mHelper->mTargetProperties.pixelFormat.format =
DXGI_FORMAT_B8G8R8A8_UNORM;
mHelper->mTargetProperties.pixelFormat.alphaMode =
D2D1_ALPHA_MODE_IGNORE;
mHelper->mTargetProperties.usage =
D2D1_RENDER_TARGET_USAGE_GDI_COMPATIBLE;

HRESULT f =
mHelper->mFactory->CreateDCRenderTarget(&mHelper->mTargetProperties,&(mHelper->mGraphics));
mHelper->mRect = rect;
mHelper->mGraphics->BindDC( (HDC) systemContext, &mHelper->mRect);
mHelper->mGraphics->BeginDraw(); //<- issues error message
...

can anyone give me a hint why this is happening? Is one of the parameters
for the TargetProperties not chosen well?

thanks
doc

Richard [Microsoft Direct3D MVP]

unread,
Nov 1, 2009, 5:45:11 PM11/1/09
to
[Please do not mail me a copy of your followup]

=?Utf-8?B?ZG9jc2NobmlwcA==?= <docsc...@newsgroup.nospam> spake the secret code
<C3852427-9859-4A8F...@microsoft.com> thusly:

>First-chance exception at 0x75bfb727 in testd2dui.exe: Microsoft C++
>exception: _com_error at memory location 0x0018ea60..

Does that exception come all the way out to your code, or is it
handled by MS code?
--
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
<http://legalizeadulthood.wordpress.com/the-direct3d-graphics-pipeline/>

Legalize Adulthood! <http://legalizeadulthood.wordpress.com>

docschnipp

unread,
Nov 2, 2009, 2:02:01 PM11/2/09
to
"Richard [Microsoft Direct3D MVP]" wrote:

The exception seems to be handled in MS code, but logged to the console.
I just wonder if it is something I need to be concerned about, maybe wrong
parameters to the TargetProperties or so...?

I've seen that more people found this, but yet, no one had a good answer to
it, just the usual hints to check your parameters to the function.

thanks
doc

docschnipp

unread,
Nov 2, 2009, 5:47:01 PM11/2/09
to

"docschnipp" wrote:


> I've seen that more people found this, but yet, no one had a good answer to
> it, just the usual hints to check your parameters to the function.

actually it only seems to happen, when I am debugging via remote terminal,
not when I am sitting right in front..

could this be it?

thanks
doc

Richard [Microsoft Direct3D MVP]

unread,
Nov 2, 2009, 5:48:05 PM11/2/09
to
[Please do not mail me a copy of your followup]

=?Utf-8?B?ZG9jc2NobmlwcA==?= <docsc...@newsgroup.nospam> spake the secret code

<EE8BAD8F-1BD3-43BE...@microsoft.com> thusly:

>The exception seems to be handled in MS code, but logged to the console.

If it doesn't come back to your code as a failed error code or
anything else, then its nothing you need to be concerned about.

0 new messages