0

I've a number of rather old in-proc ATL COM servers, formerly built using VC++ 2005.

Now these projects were ported to VC++ 2015.
Since I need to support legacy Win XP systems, platform toolset is "VS 2015 - Windows XP". Also, according to this issue, /Zc:threadSafeInit- compiler option is set.

All of servers are written using ATL attributes, there are something like this in each project:

[module(dll, uuid = "{E49F47F5-C0E2-4C1D-8C66-BF8AE6DDF5A1}",
    name = "MyLib",
    helpstring = "MyLib 1.0 Type Library",
    resource_name = "IDR_MYLIB")]
class CMyLibModule
{
public:
    // Override CAtlDllModuleT members
};

The problem. All these projects runs fine on WinXP Pro. But when I try to register them on XP Embedded machine, I get 0xC000001D error code on LoadLibrary call.

How can I fix/diagnose this error?

P.S. If this makes sense, XP embedded system is built on top AMD Geode processor, while XP Pro system is on top of regular Intel processor.

Dennis
  • 37,026
  • 10
  • 82
  • 150

1 Answers1

0

I've figured out, what's the problem.
The issue is in combination of Geode processor and instruction set used by VC++ compiler by default - SSE2 for x86 projects. This works on modern and/or "mature" processors, but fails on Geode.

After changing this option to SSE, everything works fine:

enter image description here

Dennis
  • 37,026
  • 10
  • 82
  • 150
  • VS 2015 does indeed default to ``/arch:SSE2`` for 32-bit projects. SSE2 is already implicit for x64 native codegen. Windows 8.1 and Windows 10 will not install on a system that lacks SSE2 support. See [DirectXMath: SSE, SSE2, and ARM-NEON](http://blogs.msdn.com/b/chuckw/archive/2012/09/11/directxmath-sse-sse2-and-arm-neon.aspx) for a bit more background here. For 32-bit on ancient processors, you can use ``/arch:SSE`` or even ``/arch:IA32``. – Chuck Walbourn Jan 26 '16 at 06:25
  • @ChuckWalbourn: thanks for the link, I'll read it. Well, I understand, that modern processors support SSE2, but in embedded world there are tons of legacy hardware and software, WinXP and RS232 still widespread there. This default behavior wasn't obvious for me, though. – Dennis Jan 26 '16 at 07:11
  • Visual C++ started to default to ``/arch:SSE2`` as of VS 2012. – Chuck Walbourn Jan 26 '16 at 18:26