Visual Basic Code , VB.NET Code, VB Code
  Home   :  Code   :  Forums   :  Submit   :  Mailing List   :  About   :  Contact


How to use COM API??[Google Earth]


How to use COM API??[Google Earth]

Author
Message
soham.m17
soham.m17
Forum God
Forum God (311 reputation)Forum God (311 reputation)Forum God (311 reputation)Forum God (311 reputation)Forum God (311 reputation)Forum God (311 reputation)Forum God (311 reputation)Forum God (311 reputation)Forum God (311 reputation)

Group: Forum Members
Posts: 1, Visits: 2
I'm relatively new to VB.NET programming.I am a C,C++ Programmer.but I know a little bit of VB.NET programming as I knew VB6 a little bit.



I want to use Google Earth COM API.Please give me some thought about Interfaces and Classes and how to use it for API.



My Code is :

Public Class Form1

Private GE As EARTHLib.ApplicationGE

Public SC As EARTHLib.ISearchControllerGE

Private PID As Integer



Private Sub func_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles func.Click

Dim src, dest As String

Dim prg As Boolean

Dim feature_clct As EARTHLib.FeatureCollectionGE



GE = New EARTHLib.ApplicationGE

SC = New EARTHLib.SearchControllerGE()

src = txtsrc.Text

dest = txtdest.Text



While StrComp(src, "") <> 0 And StrComp(dest, "") <> 0

SC.Search(src)

Do

prg = SC.IsSearchInProgress()

Loop While prg = True

feature_clct = SC.GetResults()

End While



End Sub

End Class




This is throwing an error :

Unable to cast COM object of type 'EARTHLib.SearchControllerGEClass' to interface type 'EARTHLib.ISearchControllerGE'.

This operation failed because the QueryInterface call on the COM component for the interface with IID

'{524E5B0F-D593-45A6-9F87-1BAE7D338373}' failed due to the following error: Class not registered

(Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).




This is in the line no:

SC.Search(src)




So,plz give me necessarry suggestions.:confused:

Soham Sinha

A C,C++ Programmer
GO


Similar Topics


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....

















A1VBCode Forums


Search