Página 1 de 1

Is there a way to get more properties from WIN_OLEAUTO object?

Publicado: Vie Jun 17, 2022 10:00 pm
por DC
Hi,

I'm working on an Outlook 365 email retrieval project, using CreateObject("Outlook.Application").

It's going fine, it's based on something I built in Harbour a couple of years ago.

I'm just wondering if there's a way to get more debugger information from some of the objects.


So for example, after executing this:

Código: Seleccionar todo

TRY
   Outlook_o = CreateObject( "Outlook.Application" )

CATCH
   Alert( "Problem generating Outlook object " + Ole2TxtError() )
   Outlook_o := NIL
   Return .f.
END



IF Outlook_o != NIL

     NameSpace_o := Outlook_o:GetNamespace("MAPI")
     NameSpaceFolders_o := NameSpace_o:Folders
     Folders_n := NameSpaceFolders_o:Count

EndIf


The Outlook and Namespace objects contain only the basic properties __CARGO, __HOBJ, __HOBJENUM, __HSINK.

Aside from assigning the needed properties into variables, as in above looking at the Count property of NameSpaceFolders_o

Código: Seleccionar todo

Folders_n := NameSpaceFolders_o:Count
, is there any way to examine these WinOle properties in the Xailer debugger, by double-clicking on the specific object?

Re: Is there a way to get more properties from WIN_OLEAUTO object?

Publicado: Sab Jun 18, 2022 2:17 pm
por jfgimenez
Hi Dwayne,

I'm affraid it's not possible, sorry. Well, in fact it could be possible, but TOleAuto was not designed to work that way, so in practice it's not possible.

TOleAuto uses "dynamic binding" to call OLE servers. That is, when you write "oObj:cProperty", TOleAuto just check if "cProperty" is a valid member for that "oObj" OLE server, and then calls it. But it has no list of properties the debugger can look into to show you all properties.

Re: Is there a way to get more properties from WIN_OLEAUTO object?

Publicado: Sab Jun 18, 2022 11:15 pm
por DC
I understand, thanks José.


Regards,


jfgimenez escribió: Sab Jun 18, 2022 2:17 pm Hi Dwayne,

I'm affraid it's not possible, sorry. Well, in fact it could be possible, but TOleAuto was not designed to work that way, so in practice it's not possible.

TOleAuto uses "dynamic binding" to call OLE servers. That is, when you write "oObj:cProperty", TOleAuto just check if "cProperty" is a valid member for that "oObj" OLE server, and then calls it. But it has no list of properties the debugger can look into to show you all properties.