]> git.saurik.com Git - wxWidgets.git/commitdiff
No real changes, just use ProgID term instead of incorrect CLSID.
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 26 Nov 2010 13:30:25 +0000 (13:30 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 26 Nov 2010 13:30:25 +0000 (13:30 +0000)
CLSID was used instead of ProgID in several places in the code and the
documentation but they are different things so clear up the confusion.

See #12489.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66261 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/msw/ole/automtn.h
interface/wx/msw/ole/automtn.h
src/msw/ole/automtn.cpp

index 41db5772842df41743e63b8f41da0d9a78082432..7ea70f8e4c77e6260f75ab653ce77e9b3d71c5b2 100644 (file)
@@ -43,11 +43,11 @@ public:
     bool IsOk() const { return m_dispatchPtr != NULL; }
 
     // Get a dispatch pointer from the current object associated
-    // with a class id, such as "Excel.Application"
-    bool GetInstance(const wxString& classId) const;
+    // with a ProgID, such as "Excel.Application"
+    bool GetInstance(const wxString& progId) const;
 
     // Get a dispatch pointer from a new instance of the the class
-    bool CreateInstance(const wxString& classId) const;
+    bool CreateInstance(const wxString& progId) const;
 
     // Low-level invocation function. Pass either an array of variants,
     // or an array of pointers to variants.
index 9e0359177b0cb65275eef42a180146745aa7850f..397703cbe8cb18e5c75e04aadf38e9eff064736f 100644 (file)
@@ -75,11 +75,11 @@ public:
     //@}
 
     /**
-        Creates a new object based on the class id, returning @true if the object was
+        Creates a new object based on the ProgID, returning @true if the object was
         successfully created,
         or @false if not.
     */
-    bool CreateInstance(const wxString& classId) const;
+    bool CreateInstance(const wxString& progId) const;
 
     /**
         Checks if the object is in a valid state.
@@ -100,16 +100,17 @@ public:
     void* GetDispatchPtr() const;
 
     /**
-        Retrieves the current object associated with a class id, and attaches the
-        IDispatch pointer
-        to this object. Returns @true if a pointer was successfully retrieved, @false
+        Retrieves the current object associated with the specified ProgID, and
+        attaches the IDispatch pointer to this object.
+
+        Returns @true if a pointer was successfully retrieved, @false
         otherwise.
         Note that this cannot cope with two instances of a given OLE object being
         active simultaneously,
         such as two copies of Excel running. Which object is referenced cannot
         currently be specified.
     */
-    bool GetInstance(const wxString& classId) const;
+    bool GetInstance(const wxString& progId) const;
 
     /**
         Retrieves a property from this object, assumed to be a dispatch pointer, and
index 9ab7f7897cfe5ed3158a28604113ad6096452730..f047bda3d48887ba3f986304a6f53f7a25fde5c8 100644 (file)
@@ -490,8 +490,8 @@ bool wxAutomationObject::GetObject(wxAutomationObject& obj, const wxString& prop
 }
 
 // Get a dispatch pointer from the current object associated
-// with a class id
-bool wxAutomationObject::GetInstance(const wxString& classId) const
+// with a ProgID
+bool wxAutomationObject::GetInstance(const wxString& progId) const
 {
     if (m_dispatchPtr)
         return false;
@@ -500,12 +500,12 @@ bool wxAutomationObject::GetInstance(const wxString& classId) const
     CLSID clsId;
     IUnknown * pUnk = NULL;
 
-    wxBasicString unicodeName(classId);
+    wxBasicString unicodeName(progId);
 
     hr = CLSIDFromProgID((BSTR) unicodeName, &clsId);
     if (FAILED(hr))
     {
-        ShowException(classId, hr, NULL, 0);
+        ShowException(progId, hr, NULL, 0);
         wxLogWarning(wxT("Cannot obtain CLSID from ProgID"));
         return false;
     }
@@ -513,7 +513,7 @@ bool wxAutomationObject::GetInstance(const wxString& classId) const
     hr = GetActiveObject(clsId, NULL, &pUnk);
     if (FAILED(hr))
     {
-        ShowException(classId, hr, NULL, 0);
+        ShowException(progId, hr, NULL, 0);
         wxLogWarning(wxT("Cannot find an active object"));
         return false;
     }
@@ -521,7 +521,7 @@ bool wxAutomationObject::GetInstance(const wxString& classId) const
     hr = pUnk->QueryInterface(IID_IDispatch, (LPVOID*) &m_dispatchPtr);
     if (FAILED(hr))
     {
-        ShowException(classId, hr, NULL, 0);
+        ShowException(progId, hr, NULL, 0);
         wxLogWarning(wxT("Cannot find IDispatch interface"));
         return false;
     }
@@ -530,8 +530,8 @@ bool wxAutomationObject::GetInstance(const wxString& classId) const
 }
 
 // Get a dispatch pointer from a new object associated
-// with the given class id
-bool wxAutomationObject::CreateInstance(const wxString& classId) const
+// with the given ProgID
+bool wxAutomationObject::CreateInstance(const wxString& progId) const
 {
     if (m_dispatchPtr)
         return false;
@@ -539,12 +539,12 @@ bool wxAutomationObject::CreateInstance(const wxString& classId) const
     HRESULT hr;
     CLSID clsId;
 
-    wxBasicString unicodeName(classId);
+    wxBasicString unicodeName(progId);
 
     hr = CLSIDFromProgID((BSTR) unicodeName, &clsId);
     if (FAILED(hr))
     {
-        ShowException(classId, hr, NULL, 0);
+        ShowException(progId, hr, NULL, 0);
         wxLogWarning(wxT("Cannot obtain CLSID from ProgID"));
         return false;
     }
@@ -558,7 +558,7 @@ bool wxAutomationObject::CreateInstance(const wxString& classId) const
                                 (void**)&m_dispatchPtr);
     if (FAILED(hr))
     {
-        ShowException(classId, hr, NULL, 0);
+        ShowException(progId, hr, NULL, 0);
         wxLogWarning(wxT("Could not start an instance of this class."));
         return false;
     }