[MPlayer-dev-eng] Re: Frapsvid.dll

Gianluigi Tiesi mplayer at netfarm.it
Thu May 12 08:03:04 CEST 2005


I've found what the dll does:

IDirect3D9 *dx;
char x = 0; /* in memory at 0x02950000 */
D3DADAPTER_IDENTIFIER9 identifier;
dx = Direct3DCreate9(31);
dx->GetAdapterIdentifier(D3DADAPTER_DEFAULT, 0, &identifier);
if (strstr("ATI", identifier.Driver)) x = 1;


anyway in this case I'm using direct link to d3d9, but with loadlibrary
and getprocaddress works in the same way.

IDirect3D9 is an opaque object (IUnknown), but inside has a vtable
of possible methods.
Methods are described here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_c/directx/graphics/reference/d3d/interfaces/idirect3d9/_idirect3d9.asp

the dll calls GetAdapterIdentifier, that fills D3DADAPTER_IDENTIFIER9
structure:

/* Adapter Identifier */

#define MAX_DEVICE_IDENTIFIER_STRING        512
typedef struct _D3DADAPTER_IDENTIFIER9
{
    char            Driver[MAX_DEVICE_IDENTIFIER_STRING];
    char            Description[MAX_DEVICE_IDENTIFIER_STRING];
    char            DeviceName[32];         /* Device name for GDI (ex.  \\.\DISPLAY1) */

#ifdef _WIN32
    LARGE_INTEGER   DriverVersion;          /* Defined for 32 bit components */
#else
    DWORD           DriverVersionLowPart;   /* Defined for 16 bit driver
components */
    DWORD           DriverVersionHighPart;
#endif

    DWORD           VendorId;
    DWORD           DeviceId;
    DWORD           SubSysId;
    DWORD           Revision;

    GUID            DeviceIdentifier;

    DWORD           WHQLLevel;

} D3DADAPTER_IDENTIFIER9;

in my case Driver field is:
"nv4_disp.dll"

I really doubt that using an ati card this field can be "ATI" as the
driver checks.

These info are just to known what it does, they are not needed
for correct dll usage, but they can used to fake the dll.
I think I can make this without memory patch, but the driver
should work before doing this. So to test it I suggest the memory
patch for now. I think the driver crashes in decoding functions,
also not the dll has inside some mmx code (this info can be usefull).

Bye

-- 
Gianluigi Tiesi <sherpya at netfarm.it>
EDP Project Leader
Netfarm S.r.l. - http://www.netfarm.it/
Free Software: http://oss.netfarm.it/




More information about the MPlayer-dev-eng mailing list