"Hans Leidekker" hans@it.vu.nl wrote:
Here's the beginnings of an MSCMS.DLL (color management) on top of the LittleCMS library. I had to resort to some rather ugly preprocessor trickery to be able to include lcms.h, since it happens to define basic Windows types when not compiled on Windows ;-(.
Then perhaps it's better to make lcms.h think that it's used in a Windows environment (define WIN32 or whatever it wants to see before inclusion). That will help to completely avoid all the ugliness with redefined stuff.
+HPROFILE WINAPI OpenColorProfileA( PPROFILE profile, DWORD access, DWORD sharing, DWORD creation ) +{
- TRACE("stub ( %p, %lx, %lx, %lx )\n", profile, access, sharing, creation );
- return NULL;
+}
+HPROFILE WINAPI OpenColorProfileW( PPROFILE profile, DWORD access, DWORD sharing, DWORD creation ) +{
- TRACE("stub ( %p, %lx, %lx, %lx )\n", profile, access, sharing, creation );
- return NULL;
+}
+BOOL WINAPI CloseColorProfile( HPROFILE profile ) +{
- TRACE("stub ( %p )\n", profile );
- return FALSE;
+}
You have to use FIXMEs not TRACEs above to clearly indicate the status of the APIs.
On Sunday 19 September 2004 06:06, Dmitry Timoshkov wrote:
LittleCMS library. I had to resort to some rather ugly preprocessor trickery to be able to include lcms.h, since it happens to define basic Windows types when not compiled on Windows ;-(.
Then perhaps it's better to make lcms.h think that it's used in a Windows environment (define WIN32 or whatever it wants to see before inclusion). That will help to completely avoid all the ugliness with redefined stuff.
Yes, I tried that option but it has even bigger problems. First, the header doesn't have such a define! It defaults to building on non-windows platforms and requires you to edit the file if you want a Windows build.
Furthermore, when you do so it immediately includes windows.h, which is not allowed within Wine.
You have to use FIXMEs not TRACEs above to clearly indicate the status of the APIs.
Yes, thanks for pointing that out. I'll send an updated patch.
-Hans
On Sun, Sep 19, 2004 at 09:29:39AM +0200, Hans Leidekker wrote:
On Sunday 19 September 2004 06:06, Dmitry Timoshkov wrote:
Yes, I tried that option but it has even bigger problems. First, the header doesn't have such a define! It defaults to building on non-windows platforms and requires you to edit the file if you want a Windows build.
Furthermore, when you do so it immediately includes windows.h, which is not allowed within Wine.
It's probably best to also try to submit a patch to the Little CMS folks so we can have a better solution in the future.
On Sunday 19 September 2004 17:31, Dimitrie O. Paun wrote:
It's probably best to also try to submit a patch to the Little CMS folks so we can have a better solution in the future.
Sure, will do.
-Hans