[PATCH 2/2] d3dxof: Use sizeof(GUID) instead of hardcoding the value.

Rico Schüller kgbricola at web.de
Sun Oct 21 09:21:16 CDT 2012


Why is there a "static guid" used in GetType? What happens if you query:
hr = IDirectXFileData_GetType(lpDirectXFileData, &clsid_type);
hr = IDirectXFileData_GetType(lpDirectXFileData2, &clsid_type2);
Are thy both containing the value to clsid_type2 then? Do clsid_type and 
clsid_type2 match in that case to the same pointer both pointing to the 
same static guid? I don't see a test for this. Why doesn't *pguid = 
&This->pobj->type; do the job in that case?

While trying to check the cases above, I got the following problem...
Under which circumstances is the test_dump test run? It looks like the 
tests are never run because there is no objects.txt, see:
     hFile = CreateFileA("objects.txt", GENERIC_READ, FILE_SHARE_READ, 
NULL, OPEN_EXISTING, 0, NULL);
     if (hFile == INVALID_HANDLE_VALUE)
       return;
     CloseHandle(hFile);

All machines (http://test.winehq.org/data/tests/d3dxof:d3dxof.html) seem 
to run 107 tests or skip all of them, which is the same on my machine (I 
got 107 tests), so none of them is running the whole test_dump ... How 
is this supposed to work?

Cheers
Rico

On 21.10.2012 14:50, Christian Costa wrote:
> @@ -647,7 +647,7 @@ static HRESULT WINAPI IDirectXFileDataImpl_GetType(IDirectXFileData* iface, cons
>     if (!pguid)
>       return DXFILEERR_BADVALUE;
>
> -  memcpy(&guid, &This->pobj->type, 16);
> +  memcpy(&guid, &This->pobj->type, sizeof(GUID));
>     *pguid = &guid;
>
>     return DXFILE_OK;




More information about the wine-devel mailing list