Today Screen Item with WebService possible?

I have created a Today Screen Item application. It works fine. Right now it simply adds a string of text and an icon to the Today Screen. But the goal is to access data from the internet to display in this Today Item. Coming from the manage code world I thought using a WebService would be much easier than coming up with the native code to connect and access the data from the web. I gave that a try I can add the WebService and call it from my code. But it will only compile if I I add the following definition:

_CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA

Otherwise I get the following compilation error:

fatal error C1189: #error : atlsoap.h requires Windows CE platform to have DCOM support or _CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA needs to be defined. C:\Program Files\Microsoft Visual Studio 8\VC\ce\atlmfc\include\atlsoap.h 8101

I don't really understand what this means other than the define gets rid of it. But adding that define causes the .dll not to be loaded, it does not show in the Settings->Today->Items list.

So I wonder if it's even possible to use WebServices from these Today Item Screen dlls If so, how do I resolve the above error

Thanks in advance




Answer this question

Today Screen Item with WebService possible?

  • tayside

    In your com object class definition change CComSingleThreadModel to CComMultiThreadModel (in one of the parent classes)

  • Today Screen Item with WebService possible?