With this option you get the COM object. It supports only 2 mnethods for OLE automation: DO and EVAL and I think you can't manage the mapinfo ribbon.
How Cliff says you have to use SystemInfo(SYS_INFO_IMAPINFOAPPLICATION) for get mapinfo object and pass to .net
Theese are the steps
1. In .net you have to reference MapInfo.Types.dll in a class library
2. In .net you have to use MapInfo instance like this
Imports MapInfo.Types
Namespace MapInfo.MiPro.Samples.BasicRibbon
Public Class Class1
Public Shared Function getCountTabs(ByVal mapInfoApplication As IMapInfoPro) As Integer
Dim count As Integer
count = mapInfoApplication.Ribbon.Tabs.Count
Return count
End Function
End Class
End Namespace
3. In Mapbasic you have to get instance of MapInfo Pro x64
This is the full code in Mapbasic
Include "mapbasic.def"
Include "IMapInfoPro.def"
Declare Method getCountTabs Class "MapInfo.MiPro.Samples.BasicRibbon.Class1" Lib "BasicRibbon.dll" Alias getCountTabs (ByVal p1 as refptr) as integer
Declare sub main()
Sub main()
Dim mapinfoApplication as This
Dim nTabs as integer
mapinfoApplication = SYSTEMINFO(SYS_INFO_IMAPINFOAPPLICATION)
nTabs = getCountTabs (mapinfoApplication)
note nTabs
End Sub