X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=activex%2Futils.h;h=c7ac574a10c05c46d1bd4c05e597d78b5029df0d;hb=15f7f7c14458f55ccd4c25cfdd4b038bdb407e03;hp=58cd6557c335136dd61b1682c247774a7a867d10;hpb=3d831e04ece115bb9ca379b9552370755453e46e;p=vlc diff --git a/activex/utils.h b/activex/utils.h index 58cd6557c3..c7ac574a10 100644 --- a/activex/utils.h +++ b/activex/utils.h @@ -1,7 +1,7 @@ /***************************************************************************** * utils.h: ActiveX control for VLC ***************************************************************************** - * Copyright (C) 2005 VideoLAN + * Copyright (C) 2005 the VideoLAN team * * Authors: Damien Fouilleul * @@ -17,7 +17,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ #ifndef __UTILS_H__ @@ -28,12 +28,18 @@ #include // utilities -extern char *CStrFromBSTR(int codePage, BSTR bstr); -extern BSTR BSTRFromCStr(int codePage, const char *s); +extern char *CStrFromBSTR(UINT codePage, BSTR bstr); +extern BSTR BSTRFromCStr(UINT codePage, LPCSTR s); // properties extern HRESULT GetObjectProperty(LPUNKNOWN object, DISPID dispID, VARIANT& v); +// properties +extern HDC CreateDevDC(DVTARGETDEVICE *ptd); +extern void DPFromHimetric(HDC hdc, LPPOINT pt, int count); +extern void HimetricFromDP(HDC hdc, LPPOINT pt, int count); + + // enumeration template class VLCEnum : IUnknown { @@ -57,7 +63,6 @@ public: STDMETHODIMP Reset(void); // cloning is implemented by subclasses and must use copy constructor //STDMETHODIMP Clone(VLCEnum **); - // cloning is implemented by subclasses and must use copy constructor typedef void (*retainer)(T); @@ -97,6 +102,7 @@ VLCEnum& VLCEnum::operator=(const VLCEnum &e) this->_riid = e._riid; this->_v = e._v; this->_i = e._i; + return this; }; template