C++/VB - IDirect3D9::RegisterSoftwareDevice fails from service in win7

Asked By johno
19-Nov-09 06:50 PM
Hello,

I have an existing Direct3D9 based application that uses the Direct3D9
software rasterizer (rgb9rast) to perform a simple thumbnail generation of 3D
scenes.  The thumbnails are dumped to JPGs for use in a web based GUI.  The
application is launched from a tomcat running in session 0, so it also
launches in session 0.  The system can be headless, so no user may log into
it.  I am aware of session 0 isolation would prevent hardware from being
available there, but this does not use hardware.  It is using the software
rasterizer.

Is this a bug or misfeature of RegisterSoftwareDevice?  Is there a way
around this that does not require a user to log on so there is another logon
session to work from?


--Johno
D3D9GetSWInfo
(1)
Windows 7
(1)
Vista
(1)
XP
(1)
RegisterSoftwareDevice
(1)
GetProcAddress
(1)
JPGs
(1)
LoadLibrary
(1)
  legalize+jeeve replied to johno
20-Nov-09 05:08 PM
[Please do not mail me a copy of your followup]



Umm... near as I can tell, rgb9rast is something installed by the
.NET Framework 3 or 3.5.

You should never need to call RegisterSoftwareDevice yourself.

A technology like "WARP" (Windows Advanced Rasterization Platform) is
more like what you should be using, but that is for D3D10 and higher,
not D3D9.

Look in the DirectX Graphics Documentation (August 2009) section
titled "How To: Create a WARP Device".
--
  John replied to legalize+jeeve
21-Nov-09 08:36 PM
I believe that is the same rasterizer, but it is not specific to .NET.
Microsoft provides a software rasterizer download for distribution to XP
and lesser systems.  The download is still available as "Software
Rasterizer for the Microsoft DirectX 9.0 Software Development Kit (SDK)":

http://www.microsoft.com/downloads/details.aspx?familyid=57d03491-6c49-4429-bff7-130408b5f410&displaylang=en


With Vista and beyond, the software rasterizer comes with the OS so
there is nothing to install.


The directions that come with the redistributable (rgbrast.htm)
specifically state otherwise:

To use the Microsoft Software Rasterizer an application must do the
following:

1) Perform a LoadLibrary of the Microsoft Software Rasterizer.

HModule hRast =
LoadLibrary("C:\Windows\System32\RGB9Rast_1.dll");

2) Get the Microsoft Software Rasterizer entry point.

FARPROC D3D9GetSWInfo = GetProcAddress( hRast, "D3D9GetSWInfo");

3) Pass the Microsoft Software Rasterizer entry point to the Direct 3D
9.0 runtime.

IDirect3D9::RegisterSoftwareDevice( D3D9GetSWInfo);


I am mostly familiar with what DX11 offers but a DX9 to DX11 conversion
project is not in the cards right now.  It would take a few months of
programming and QA to switch from D3D9 to D3D11.  That would be a
ridiculous amount of work just to get back something that works fine in
XP and is likely an oversight.

--Johno
  legalize+jeeve replied to John
23-Nov-09 07:51 AM
[Please do not mail me a copy of your followup]

John <johnperiodorr@scalaperiodcom> spake the secret code


Interesting, I was unaware of this and its been around for 4 years :-).

If you have an MSDN subscription, I would use one of your technical
support incidents on this to get it resolved.  It sounds like it could
just be a bug in the way they are doing things either in the software
rasterizer or in the D3D runtime because they are not expecting that the
API will be used in this scenario.

--
  John replied to legalize+jeeve
23-Nov-09 10:57 AM
OK, will do.  Thanks for your help!

--Johno
  John replied to John
21-Dec-09 03:31 PM
Just to follow up, as a result of my MSDN technical support incident,
Microsoft issued this:

http://support.microsoft.com/kb/978635

D3D9 in Vista and Windows 7 fails from a service.  This is on purpose
and will not be fixed.  Although that article does not specifically state
it, this is true even with a software rasterizer registered via
IDirect3D9::RegisterSoftwareDevice.

--Johno
Create New Account
help
Visual C++ version 6 and Windows 7 C++ / VB I use Visual C++ Version 6. It works great on XP and at works on some Vista computers, but not others. Does anyone know if it works on Windows 7? Windows 7 has XP compatibility mode. Does Version 6 work that way? VC MFC Discussions Visual Studio 2008 (1) Windows 7 (1) Vista (1) XP (1) February (1) PSDK (1) Lest (1) I believe VC6 works
Windows XP MFC program on Windows 7 issue C++ / VB I have a Windows XP application written in MFC. Can it runs on Windows 7 (32-bit)? Can Windows XP device driver work on Windows 7 (32-bits)? My application uses some drivers which works on 32-bit Windows XP
Windows 7 logon vbscript not working C++ / VB Any help on why windows 7 does not process logon vbscripts? Our logon vb scripts no longer works in windows 7. VBScript Discussions Windows 7 (1) See your first post on the same subject. keywords: Windows, 7, logon, vbscript, not
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7