[PATCH 2/2] d3dxof: Use sizeof(GUID) instead of hardcoding the value.
Christian Costa
titan.costa at gmail.com
Sun Oct 21 10:24:34 CDT 2012
Le 21/10/2012 16:21, Rico Schüller a écrit :
> 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.
I think because some brain dead apps write at this location. it's to
preserve the object value.
That said it has been a long time I wrote this code. I don't remember
and it's curious I didn't left a comment for that.
I will check if I can find something.
> Why doesn't *pguid = &This->pobj->type; do the job in that case?
>
Indeed. This can be changed. Let's discard this patch.
That said few time ago I have problem with this in some d3drm code and
had to change to use memcpy.
I didn't investigate much tough.
> 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?
>
It's for debug. But it does not check much thing. Only display.
It's very usefull to compare outputs with both native and builtin.
More information about the wine-devel
mailing list