Calling msvcp90 (C++) functions from Wine code

Nikolay Sivov bunglehead at gmail.com
Tue Dec 6 03:15:36 CST 2016


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.

> 
> [1] http://source.winehq.org/patches/data/128310
> 




More information about the wine-devel mailing list