Calling msvcp90 (C++) functions from Wine code

Lauri Kenttä lauri.kentta at gmail.com
Tue Dec 6 03:25:29 CST 2016


On 2016-12-06 11:15, Nikolay Sivov wrote:
> On Mon, 05 Dec 2016 23:35:37 +0200
> Lauri Kenttä <lauri.kentta at gmail.com> wrote:
> 
>> Hey,
>> 
>> In a patch [1] I ended up recreating a function that practically 
>> exists
>> already in msvcp90 as tr2_sys__Equivalent_wchar. However, I'm guessing
>> it's not okay to call tr2_sys__Equivalent_wchar directly, since it's
>> really a C++ function.
>> 
>> Is there some valid and portable way to use this
>> tr2_sys__Equivalent_wchar within another part of Wine (in this case,
>> cmd.exe), to avoid duplicate code?
> 
> In this case just duplicate it. Starting with Windows 10 there's a new
> API called CompareObjectHandles(),
> I have no idea if it works with file handles too, but it's worth 
> trying.
> 

Ok, thanks. Even linking with msvcp90 seems to be almost impossible
without hacks like EXTRALIBS = ../../dlls/msvcp90/msvcp90.dll.so,
so clearly it's not meant to be.

CompareObjectHandles probably wouldn't work, because the file handles
are actually distinct anyway (different modes and positions etc.).

-- 
Lauri Kenttä



More information about the wine-devel mailing list