|
// MyServer.cpp : Implementation of CMyServer
#include "stdafx.h"
#include "SystemTrayDemo.h"
#include "MyServer.h"
/////////////////////////////////////////////////////////////////////////////
// CMyServer
STDMETHODIMP CMyServer::InterfaceSupportsErrorInfo(REFIID riid)
{
static const IID* arr[] =
{
&IID_IMyServer
};
for (int i=0; i < sizeof(arr) / sizeof(arr[0]); i++)
{
if (InlineIsEqualGUID(*arr[i],riid))
return S_OK;
}
return S_FALSE;
}
STDMETHODIMP CMyServer::SetText(BSTR Text)
{
// Convert from BSTR to std::string (avoiding zero length strings)
USES_CONVERSION;
m_CurrentText = (Text == NULL) ? std::string("") : OLE2A (Text) ;
// Immediately update the tip text
SetShellTipText (m_CurrentText);
return S_OK;
}
STDMETHODIMP CMyServer::Animate(VARIANT_BOOL Animate, LONG Duration)
{
m_bAnimate = (Animate == VARIANT_TRUE) ? true : false;
// Update the timer in the shell
SetShellTimer (m_bAnimate, Duration);
return S_OK;
}
STDMETHODIMP CMyServer::Visible(VARIANT_BOOL Visible)
{
SetShellVisible (Visible == VARIANT_TRUE ? true : false);
return S_OK;
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here
I first started tinkering with a ZX81 back in 1981 and it's lovely blocky graphics, teaching myself Z80 assembler and BASIC. I come from a hardware background and electronics - I started out in embedded software for avionics but soon moved onto PC platforms.
Java and C++ are my prefered language but also dabble in VB and .NET.
I'm a team leader with Nokia developing Series 40 features - it's a cool place to work!