Results 1 to 9 of 9

Thread: Calling a method on a .NET COM Object

  1. #1
    Member
    Join Date
    May 2012
    Posts
    37

    Calling a method on a .NET COM Object

    I have a simple COM object created in .NET (i.e. specifically made visible to COM in the normal way). It exposes one method called 'Test' that returns a string.

    In VFP I can instantiate it and call the method using:

    Code:
    loDotNet = CreateObject("SimpleCCWTest.SimpleInterface")
    debugout loDotNet.Test()
    In Lianja it seems to create the object but attempts to call Test() result in METHOD 'test' NOT FOUND

    Is this a sort of further-down-the-roadmap thing as we stand or should it work ?

    Thanks

  2. #2
    Lianja Team yvonne.milne's Avatar
    Join Date
    Feb 2012
    Location
    Berkshire, UK
    Posts
    1,666
    Hi Alan,

    Before running this, can you 'set debug on' in the Lianja/VFP command window in the Console?
    Then run your test and exit the App Builder and Submit a Ticket attaching the lianja\debug\debug_client.txt file to the ticket so we can take a closer look.

    Thanks,

    Yvonne

  3. #3
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    6,246
    No, this should be all working as COM/ActiveX is supported. I see you have submitted a ticket and I'll take a look at the debug file to see what's going on.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  4. #4
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    6,246
    After looking at the debug_client.txt file that you attached to the ticket you submitted it would appear that the method 'test' is not being exposed in the COM/ActiveX.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  5. #5
    Lianja MVP
    Join Date
    Dec 2012
    Location
    Croatia, Zagreb
    Posts
    1,121
    Hi Barry,

    I tried this and get the same error.
    I am sure the method is exposed because it works from VFP and I can attach to the process in .NET and see it is executed.
    The object is created in Lianja ("O"), but strange: all properties get value .f.

    I think something is broken (v1.3RC14)

    Josip

    P.S.
    I can attach in .NET to the process Lianja too, but it seems the method is not accessed from Lianja call.
    I try createobject with name and with UUID too.

    *** ERROR *** called from lib_object.c at line 7608 n=303 g_cmdpos=34 g_cmdlen=35 lex=201, g_uci=-1
    on error:
    error number: 303
    error message: METHOD 'DOTNET_BUILDVERZIJA' not found
    cmdbuf: ?liderserver.DOTNET_buildverzija()
    Last edited by josipradnik; 2015-01-30 at 02:52.

  6. #6
    Member
    Join Date
    May 2012
    Posts
    37
    It could be something on the .NET side, I will investigate that.

  7. #7
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    6,246
    Hi Josip,

    COM/ActiveX is working fine (We just tested against Excel). This is a .net specific COM issue.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  8. #8
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    6,246
    This article may provide you with some pointers.

    https://code.msdn.microsoft.com/wind...tivex-b86194f8

    Also, this article explains the various ways you can use ActiveX in Lianja/VFP

    http://www.lianja.com/resources/blog...nja-on-windows
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  9. #9
    Member
    Join Date
    May 2012
    Posts
    37
    Yeah, Excel certainly fires up OK and as COM goes that's a pretty hefty one!

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us