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

CreateDC fails on Windows 7 64bit for mirror driver

195 views
Skip to first unread message

Edigin

unread,
Oct 10, 2011, 9:39:37 AM10/10/11
to
I have a mirror driver for screen capture and a recording application
that works on XP and Windows 7 32bit. On Windows 7 64 bit, the call
to CreateDC fails with a last error = 0;

hdc = GDI32.CreateDC(driverName, devName, null, ref
devmode);

I am running in Session 1 as an application.
devName = "\\\\.\\DISPLAYV4"

There are 5 virtual displays and CreateDC fails on all of them not
just my mirror driver. I can CreateDC for DISPLAY1. Is there some
reason this code will run on 32bit Windows 7 and not 64bit? Is there
a reason you can't CreateDC on a virtual display in x64 Windows 7.

Leo Davidson

unread,
Oct 11, 2011, 4:33:40 AM10/11/11
to
On Oct 10, 2:39 pm, Edigin <developm...@edigin.com> wrote:
> Is there some
> reason this code will run on 32bit Windows 7 and not 64bit?  Is there
> a reason you can't CreateDC on a virtual display in x64 Windows 7.

This is probably a stupid question :) but have you compiled and
installed a 64bit version of your driver?

Edigin

unread,
Oct 11, 2011, 12:46:16 PM10/11/11
to
Yes I installed the 64bit version and the Device Manager shows its
functioning. I also install Ultra VNC 64bit driver and it is on
DISPLAYV5 and cannot CreateDC on it either.

Leo Davidson

unread,
Oct 12, 2011, 4:25:09 AM10/12/11
to

Is the driver signed? I think x64 Windows requires signed drivers by
default while x86 did not. (I'd expect the VNC driver to be signed,
but maybe it's failing to load for an unrelated reason.)

Sorry if that is also an obvious thing. :) I don't know much about
writing drivers so I'm just trying to think of things that are
different between x64 and x86 Windows.

Edigin

unread,
Oct 12, 2011, 2:23:36 PM10/12/11
to
No the driver is not signed, but I have the system running in test
mode for now to get around that requirement during development.
0 new messages