[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: [programs/winetest] Extend PATH if we have dll's that only come
From:       Nicolas Le Cam <niko.lecam () gmail ! com>
Date:       2009-02-25 11:23:56
Message-ID: d7e62e980902250323m461ff2c1u32eb60c2873edb60 () mail ! gmail ! com
[Download RAW message or body]

2009/2/25 Paul Vriens <paul.vriens.wine@gmail.com>:
> Nicolas Le Cam wrote:
>>>>>
>>>>> +
>>>>> +            /* We have a dll that cannot be found through
>>>>> LoadLibraryExA.
>>>>> This
>>>>> +             * is the case for .NET provided dll's. We will add the
>>>>> directory
>>>>> +             * where the dll resides to the PATH variable when dealing
>>>>> with
>>>>> +             * the tests for this dll.
>>>>> +             */
>>>>> +            GetModuleFileNameA(dll, dllpath, MAX_PATH);
>>>>> +            *strrchr(dllpath, '\\') = '\0';
>>>>> +            wine_tests[nr_of_files].maindllpath =
>>>>> xmalloc(strlen(dllpath) +
>>>>> 1);
>>>>> +            strcpy(wine_tests[nr_of_files].maindllpath, dllpath);
>>>>> +        }
>>>>
>>>> This won't work if test needs more than one dll found through
>>>> LoadLibraryShim
>>>>
>>> Not sure what you mean as LoadLibraryShim will only return 1 dll.
>>
>> I mean if the test imports more than one dll that can only be found by
>> LoadLibraryShim it will replace the first PATH you retrieved by the
>> second one, and a message will be displayed for the first d. In my
>> test I did something like that :
>>
>>        else
>>        {
>>            char dllpath[MAX_PATH];
>>
>>            /* We have a dll that cannot be found through LoadLibraryExA.
>> This
>>             * is the case for .NET provided dll's. We will add the
>> directory
>>             * where the dll resides to the PATH variable when dealing with
>>             * the tests for this dll.
>>             */
>>            GetModuleFileNameA(dll, dllpath, MAX_PATH);
>>            *strrchr(dllpath, '\\') = '\0';
>>            if (!wine_tests[nr_of_files].maindllpath)
>>                wine_tests[nr_of_files].maindllpath = strmake ( NULL,
>> ";%s", dllpath);
>>            else
>>            {
>>                char *newpath = wine_tests[nr_of_files].maindllpath;
>>
>>                wine_tests[nr_of_files].maindllpath = strmake ( NULL,
>> "%s;%s", newpath, dllpath);
>>                free(newpath);
>>            }
>>        }
>>
>> and wine_tests[nr_of_files].maindllpath = NULL; wasn't set in
>> extract_test_proc
>>
> I still don't get it.
>
> The only dll that we try to load is the main dll. We don't care about all
> the other imports.
>
> --
> Cheers,
>
> Paul.
>

Now I get it.
I thought we were trying to resolve every imports. Seems that I didn't
understand the first part of extract_test_proc as I should.
Sorry, I was mistaken.

-- 
Nicolas Le Cam



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic