X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6bcfd974ef26faf6f91a62cac09827e09463fd1..ce7208d49d5ce2ca1dc0b3b83f14f1d04f29c4bf:/src/msw/ole/uuid.cpp diff --git a/src/msw/ole/uuid.cpp b/src/msw/ole/uuid.cpp index 9436536733..0b1020d849 100644 --- a/src/msw/ole/uuid.cpp +++ b/src/msw/ole/uuid.cpp @@ -1,22 +1,18 @@ /////////////////////////////////////////////////////////////////////////////// -// Name: ole/uuid.cpp +// Name: src/msw/ole/uuid.cpp // Purpose: implements Uuid class, see uuid.h for details // Author: Vadim Zeitlin -// Modified by: +// Modified by: // Created: 12.09.96 // RCS-ID: $Id$ // Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows license +// Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// // ============================================================================ // Declarations // ============================================================================ -#ifdef __GNUG__ -#pragma implementation "uuid.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -24,11 +20,12 @@ #pragma hdrstop #endif -#include "wx/setup.h" +#if wxUSE_OLE && ( wxUSE_DRAG_AND_DROP || (defined(__WXDEBUG__) && wxUSE_DATAOBJ) ) -#if wxUSE_DRAG_AND_DROP +#ifndef WX_PRECOMP + #include "wx/msw/wrapwin.h" +#endif -// standard headers #include // UUID related functions #include "wx/msw/ole/uuid.h" @@ -45,8 +42,8 @@ // copy ctor Uuid::Uuid(const Uuid& uuid) { - // bitwise copy Ok for UUIDs - m_uuid = uuid.m_uuid; + // bitwise copy Ok for UUIDs + m_uuid = uuid.m_uuid; // force the string to be allocated by RPC // (we free it later with RpcStringFree) @@ -86,11 +83,11 @@ Uuid& Uuid::operator=(const Uuid& uuid) } // dtor -Uuid::~Uuid() -{ +Uuid::~Uuid() +{ // this string must be allocated by RPC! // (otherwise you get a debug breakpoint deep inside RPC DLL) - if ( m_pszUuid ) + if ( m_pszUuid ) #ifdef _UNICODE RpcStringFree((unsigned short **)&m_pszUuid); #else @@ -126,7 +123,7 @@ void Uuid::Create() // can't fail UuidCreate(&uuid); - + Set(uuid); } @@ -140,7 +137,7 @@ bool Uuid::Set(const wxChar *pc) if ( UuidFromString((wxUChar *)pc, &m_uuid) != RPC_S_OK) #endif // failed: probably invalid string - return FALSE; + return false; // transform it back to string to normalize it #ifdef _UNICODE @@ -152,7 +149,7 @@ bool Uuid::Set(const wxChar *pc) // update m_pszCForm UuidToCForm(); - return TRUE; + return true; } // stores m_uuid in m_pszCForm in a format required by @@ -167,8 +164,8 @@ void Uuid::UuidToCForm() wsprintf(m_pszCForm, wxT("0x%8.8X,0x%4.4X,0x%4.4X,0x%2.2X,0x2.2%X,0x2.2%X,0x2.2%X,0x2.2%X,0x2.2%X,0x2.2%X,0x2.2%X"), m_uuid.Data1, m_uuid.Data2, m_uuid.Data3, - m_uuid.Data4[1], m_uuid.Data4[2], m_uuid.Data4[3], m_uuid.Data4[4], - m_uuid.Data4[5], m_uuid.Data4[6], m_uuid.Data4[7], m_uuid.Data4[8]); + m_uuid.Data4[0], m_uuid.Data4[1], m_uuid.Data4[2], m_uuid.Data4[3], + m_uuid.Data4[4], m_uuid.Data4[5], m_uuid.Data4[6], m_uuid.Data4[7]); } #endif