Re: Interaction with office programs

From: R. Hendriks (R.Hendriks_1_at_uvt.nl)
Date: 12/27/03

  • Next message: Doug Scott: "Re: CoBOL moved to OO"
    Date: Sat, 27 Dec 2003 20:42:44 +0100
    
    

    > One additional follow up tip. Use the Release method against any
    > selection object you obtain when you are finished. In fact, use the
    > Release method for each interface (object reference) obtained when you
    > are finished. I found through experience that under Windows 9x this
    > limitation can be reached without being in a tight loop but instead
    > just by not releasing references no longer used. I do not *KNOW* that
    > Fujitsu calls the Release method if the reference is set to Null.
    > Since Fujitsu COBOL does know that the object is an OLE object - it
    > might.

    And it seems to do just that! At least page 854 of the NetCOBOL users guide
    states:

    'The special classes *COM, *COM-ARRAY, *COM-EXCEPTION used in COM client
    function internally hold the COM server, COM array, and COM exception
    information.
    They are simultaneously released when objects holding them are released. Be
    sure
    to release these objects to be used in COM client function, when they have
    been
    used. An object is released by setting another object reference (NULL object
    is used
    only for releasing) in the object reference data item.'

    I'll keep your experiences with COM in mind, thanks!


  • Next message: Doug Scott: "Re: CoBOL moved to OO"

    Relevant Pages

    • Re: Proper Cleanup of Variables in VFP 6.0
      ... It's not releasing the variable, ... When an object reference is set to null, ... In VFP, variables get released automatically when they go out of scope, ... > I'm developed .NET apps for the past 2 years and now I'm working with ...
      (microsoft.public.fox.helpwanted)
    • Re: How do I use a TOleServer derived object properly? (Yet another interface question).
      ... I think you're ok with using the object as an object reference, ... By the way, when you imported the TLB, did you tell it to support events? ... > TConnection = class ... > look like they're intended to implement the _IConnectionEvents interface ...
      (borland.public.delphi.language.objectpascal)
    • Re: Return collection interfaces or collection objects???
      ... I like returning an interface better than ... Create sone specific collection instance, ... dependancy - the caller will be returned an object reference and will ...
      (microsoft.public.dotnet.languages.csharp)
    • Re: Interface as Object. can I do this?
      ... Because of interface reference counting using an object reference is ... I don't think that technique is "nasty hacking". ...
      (borland.public.delphi.language.objectpascal)
    • Re: dynamic runtime casting?
      ... dynamic_cast is identical to the VB TryCast function - they both compile to ... interface on an object by name. ... All you have is a univeral object reference ...
      (microsoft.public.dotnet.languages.vc)