Closed wxtrac closed 2 years ago
Logged In: NO
File apparently was not attached (browser showed an error message).
Here's the file:
diff -rbu2 WX-CVS1\include\wx\msw\ole\automtn.h WX-CVS2 \include\wx\msw\ole\automtn.h --- WX-CVS1\include\wx\msw\ole\automtn.h Fri Feb 22 15:35:52 2002 +++ WX-CVS2\include\wx\msw\ole\automtn.h Thu Feb 14 22:50:40 2002 @@ -56,4 +56,5 @@ // Invoke a member function wxVariant CallMethod(const wxString& method, int noArgs, wxVariant args[]);
wxVariant CallMethodArray(const wxString& method, int noArgs, const wxVariant **args);
// Convenience function @@ -65,4 +66,5 @@ // Get/Put property wxVariant GetProperty(const wxString& property, int noArgs # 0, wxVariant args NULL) const;
wxVariant GetPropertyArray(const wxString& property, int noArgs, const wxVariant **args) const; wxVariant GetProperty(const wxString& property, const wxVariant& arg1, const wxVariant& arg2 = wxNullVariant, @@ -70,4 +72,5 @@ const wxVariant& arg5 = wxNullVariant, const wxVariant& arg6 = wxNullVariant);
bool wxAutomationObject::PutPropertyArray(const wxString& property, int noArgs, const wxVariant *args); bool PutProperty(const wxString& property, int noArgs, wxVariant args[]) ; bool PutProperty(const wxString& property, @@ -81,8 +84,10 @@ // with it and letting the destructor call Release. WXIDISPATCH GetDispatchProperty(const wxString& property, int noArgs, wxVariant args[]) const;
WXIDISPATCH* GetDispatchProperty(const wxString& property, int noArgs, const wxVariant **args) const;
// A way of initialising another wxAutomationObject with a dispatch object, // without having to deal with nasty IDispatch pointers. bool GetObject(wxAutomationObject& obj, const wxString& property, int noArgs # 0, wxVariant args NULL) const;
bool GetObject(wxAutomationObject& obj, const wxString& property, int noArgs, const wxVariant **args) const;
public: diff -rbu2 WX-CVS1\src\msw\ole\automtn.cpp WX-CVS2 \src\msw\ole\automtn.cpp --- WX-CVS1\src\msw\ole\automtn.cpp Fri Feb 22 15:37:42 2002 +++ WX-CVS2\src\msw\ole\automtn.cpp Thu Feb 14 22:50:40 2002 @@ -268,4 +268,14 @@ }
+wxVariant wxAutomationObject::CallMethodArray(const wxString& member, int noArgs, const wxVariant **args) +{
wxVariant wxAutomationObject::CallMethod(const wxString& member, const wxVariant& arg1, const wxVariant& arg2, @@ -315,4 +325,13 @@
// Get/Set property +wxVariant wxAutomationObject::GetPropertyArray(const wxString& property, int noArgs, const wxVariant **args) const +{
+bool wxAutomationObject::PutPropertyArray(const wxString& property, int noArgs, const wxVariant **args) +{
bool wxAutomationObject::PutProperty(const wxString& property, const wxVariant& arg1, const wxVariant& arg2, @@ -443,4 +472,23 @@ }
+// Uses DISPATCH_PROPERTYGET +// and returns a dispatch pointer. The calling code should call Release +// on the pointer, though this could be implicit by constructing an wxAutomationObject +// with it and letting the destructor call Release. +WXIDISPATCH* wxAutomationObject::GetDispatchProperty(const wxString& property, int noArgs, const wxVariant **args) const +{
// A way of initialising another wxAutomationObject with a dispatch object bool wxAutomationObject::GetObject(wxAutomationObject& obj, const wxString& property, int noArgs, wxVariant args []) const @@ -456,4 +504,17 @@ }
+// A way of initialising another wxAutomationObject with a dispatch object +bool wxAutomationObject::GetObject(wxAutomationObject& obj, const wxString& property, int noArgs, const wxVariant **args) const +{
WXIDISPATCH* dispatch = GetDispatchProperty (property, noArgs, args);
if (dispatch)
{
obj.SetDispatchPtr(dispatch);
return TRUE;
}
else
return FALSE; +}
// Get a dispatch pointer from the current object associated // with a class id @@ -528,5 +589,10 @@ wxString type(variant.GetType());
if (type == wxT("long"))
if (type == wxT("char"))
{
oleVariant.vt=VT_I1;
// Signed Char
oleVariant.cVal=variant.GetChar();
}
else if (type == wxT("long")) { oleVariant.vt = VT_I4;
There is/are no file(s) attached to this patch. Maybe you hadn't logged in before attaching them? Please note that you must be logged in to be able to attach any files (this is a SF feature). Please retry attaching the files after logging in. Thank you!
Issue migrated from trac ticket # 5285
component: wxMSW | priority: normal
2002-02-23 00:01:46: anonymous created the issue
Let's try this again. The patch file did not attach to the last patch submit.
New OLE Auto. Types & Array Functions -Added support for signed char OLE Automation type.
-Added methods to pass dynamic arrays of wxVariants into OLE Automation methods.
Thanks,
John H. Bergman johnb@zortec.com