Home
:
Code
:
Forums
:
Submit
:
Mailing List
:
About
:
Contact
A1VBCode Forums
Home
Search
Members
Calendar
Who's On
Welcome Guest
(
Login
|
Register
)
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
»
Classic Visual Basic (VB 6 or earlier)
»
API
»
How to use COM API??[Google Earth]
How to use COM API??[Google Earth]
Rate Topic
Display Mode
Topic Options
Author
Message
soham.m17
soham.m17
Posted 6/24/2011 9:23:16 PM
Forum Newbie
Group: Forum Members
Last Login: 6/24/2011 9:23:53 PM
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 :
[highlight]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[/highlight]
This is throwing an error :
[quote]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)).[/quote]
This is in the line no:
SC.Search(src)
So,plz give me necessarry suggestions.:confused:
Soham Sinha
A C,C++ Programmer
Post #30453
« Prev Topic
|
Next Topic »
Reading This Topic
Active Users: 1 (1 guest, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators:
Admin
,
Mod
,
Mark
,
Keithuk
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
may
send private messages.
You
cannot
send email's.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Forum Jump...
----------------
Forum Home
Search
Members List
Calendar
Who's Online
----------------
Announcements
|-- Announcements
.NET Programming (VB 2010 or earlier)
|-- Visual Basic .NET
|-- ASP.NET
|-- C#
Classic Visual Basic (VB 6 or earlier)
|-- General Visual Basic
|-- Database Programming
|-- COM/ActiveX
|-- API
|-- Internet/Communications Programming
|-- VBA(Excel, Word, etc...)
|-- Game Programming
General Discussion
|-- Forum Feedback
|-- Member Chat
|-- Introductions
All times are GMT -5:00, Time now is 2:19am