COM Programming

Looking for a method for using an ActiveX in-process server
that provides COM access to data.  I had previously been
advised to Lookup ConnectToObject/ConnectToObject in
help...but the COM object that I am trying to use is not an
OLE object - it is an ActiveX in-process server that is in
the form of a .dll file.  The kit goes on to indicate that
it can be called from any language that supports COM
programming.  I can see where Powerbuilder supports its own
generated COM objects, but I can't see where it supports
external using COM libraries/objects.

Any help would be appreciated.
0
P
5/25/2004 5:37:09 PM
sybase.powerbuilder.general 62418 articles. 19 followers. Follow

3 Replies
346 Views

Similar Articles

[PageSpeed] 18
Get it on Google Play
Get it on Apple App Store

<P Cloes> wrote in message news:40b38445.112e.1681692777@sybase.com...
> Looking for a method for using an ActiveX in-process server
> that provides COM access to data.  I had previously been
> advised to Lookup ConnectToObject/ConnectToObject in
> help...but the COM object that I am trying to use is not an
> OLE object - it is an ActiveX in-process server that is in
> the form of a .dll file.  The kit goes on to indicate that
> it can be called from any language that supports COM
> programming.  I can see where Powerbuilder supports its own
> generated COM objects, but I can't see where it supports
> external using COM libraries/objects.
>
> Any help would be appreciated.


PB absolutely supports calling external COM objects.  You have to know the COM class name to call it.

integer        result
OLEObject   myComObject
myComObject  = CREATE OLEObject

//  Replace "excel.application" with the COM class name of the object you're trying to use.result =
myComObject.ConnectToNewObject( "excel.application")

myComObject.foo()

-- 
Paul Horan[TeamSybase]


0
Paul
5/25/2004 5:42:06 PM
> <P Cloes> wrote in message
> > news:40b38445.112e.1681692777@sybase.com... Looking for
> > a method for using an ActiveX in-process server that
> > provides COM access to data.  I had previously been
> > advised to Lookup ConnectToObject/ConnectToObject in
> help...but the COM object that I am trying to use is not
> > an OLE object - it is an ActiveX in-process server that
> > is in the form of a .dll file.  The kit goes on to
> > indicate that it can be called from any language that
> > supports COM programming.  I can see where Powerbuilder
> > supports its own generated COM objects, but I can't see
> > where it supports external using COM libraries/objects.
> >
> > Any help would be appreciated.
>
>
> PB absolutely supports calling external COM objects.  You
> have to know the COM class name to call it.
>
> integer        result
> OLEObject   myComObject
> myComObject  = CREATE OLEObject
>
> //  Replace "excel.application" with the COM class name of
> the object you're trying to use.result =
> myComObject.ConnectToNewObject( "excel.application")
>
> myComObject.foo()
>
> --
> Paul Horan[TeamSybase]
>
> Thanks - I think the problem is that I don't know what
class to specify.  Is this provided by the vendor of the
developer's kit?  The COM object that I am trying to connect
to is OSISoft's SDK.  The file is a .dll file.
0
P
5/25/2004 6:00:23 PM
<P Cloes> wrote in message news:40b389b7.1182.1681692777@sybase.com...
<snip>

> > Thanks - I think the problem is that I don't know what
> class to specify.  Is this provided by the vendor of the
> developer's kit?  The COM object that I am trying to connect
> to is OSISoft's SDK.  The file is a .dll file.

Yes - if the vendor intends for application developers to use their DLL, they've got to tell you what the class name
is...  If it's not in their documentation, you can do a scan through your Registry, looking for the DLL file name.

When you find it, it should be in a key called "InProcServer32", which should be underneath a key whose value is some
long GUID string.  The COM class name for that GUID will be in the ProgID or VersionIndependentProgID keys under that
same GUID.

-- 
Paul Horan[TeamSybase]


0
Paul
5/25/2004 6:29:39 PM
Reply:

Similar Artilces:

troubles in programming ESRI ArcMap via COM from a Powerbuilder application
Dear Sirs, I have troubles to program ArcMap from ESRI via COM. I have a Visual Basic demo program that: 1) Open an ArcMap document 2) Get the application reference from parameter "parent" This application works fine and the extract of the code is the following: Private m_pDoc As IDocument Private m_pApp As IApplication Set m_pDoc = New MxDocument Set m_pApp = m_pDoc.Parent I tried to make the same with Powerbuilder 7.0.3 with the following code: OleObject lole_mx OleObject lole_mxDoc lole_mxDoc.ConnectToNewObject("EsriCore.MxDocument") lole_mx...

COM programming
Hi, I'm allmost new in COM programming. An actuall excample for me to do this would be MS Outlook. I found several excamples in visual basic. But one thing I don't know how to make it with pb: how could I script some code in events of a specific object, how would the object variable be declared? Could somebody give me some help. thanks in advance jonny ...

What generals generally do
Reading a McChrystal thread elsewhere, I came across someone quoting a US general http://en.wikipedia.org/wiki/Smedley_Butler > I spent 33 years and four months in active military service and > during that period I spent most of my time as a high class thug for > Big Business, for Wall Street and the bankers. In short, I was a > racketeer, a gangster for capitalism. I helped make Mexico and > especially Tampico safe for American oil interests in 1914. I helped > make Haiti and Cuba a decent place for the National City Bank boys to > collect revenues in. I ...

powerbuilder program in citrix environment
We have a program written in powerbuilder deployed using citrix. Users connect to our program through citrix log on. The program runs in citrix server and user sees the seamless screen. From this program we need to execute a client program such as excel, acrobat reader or Internet explorer . 1) Used run command in powerbuilder but excel or iexplore runs in server side and screen transmit to user. 2) Tried using ole and show the files but same thing. can anyone help with this? Thank you in advance If not "seamless" does it work? (ie - log into a Citrix deskto...

Announcing the PowerBuilder 10 Public Beta Program!Join the PowerBuilder 10.0 Beta Team!
Join the PowerBuilder 10.0 Beta Team! PowerBuilder is getting ready for the 10.0 release and would like to invite you to join the Beta Team! The exciting new developments you will have early access to as a member of the Beta Team include: Unicode support DataWindow.NET Object Oriented Modeling with PowerDesigner plug-in UDDI search ADO.NET support NETXML Web Datawindow Your participation in the beta test cycle is an opportunity to provide valuable feedback to engineering regarding the quality and capabilities of this release. As a member of the team, you will learn from the e...

geobutton.com geoup.com, geobytes.com networldmap.com?
Do these website have the potensial for privacy 'invasion'? If you just to be on the safe side want them in your host file (I did a DNS Zone Query): # Geobutton.com 127.0.0.1 geobutton.com 127.0.0.1 radev.geobutton.com 127.0.0.1 devadmin.geobutton.com 127.0.0.1 ra.geobutton.com 127.0.0.1 new.geobutton.com 127.0.0.1 comdev.geobutton.com 127.0.0.1 buttondev.geobutton.com 127.0.0.1 mail.geobutton.com 127.0.0.1 www.geobutton.com 127.0.0.1 image.geobutton.com 127.0.0.1 dev.geobutton.com 127.0.0.1 button.geobutton.com 127.0.0.1 map.geoup.com # Geoup.com ...

PowerBuilder, COM and databases
Does anybody know if there are any restrictions or limitations on what backend databases can be connected to using a COM object created in PowerBuilder? I guess the answer depends on which PB version is used, so assume I'm using PowerBuilder 6. Will I need any patches to standard PB6 to reliably create COM components? John Waller ============================================================ John Waller Technosys Ltd. Email: WallerJ@technosys.co.uk Stonecourt Tel: (01203) 240431 Siskin Drive ...

COM equivalent in Powerbuilder
Below is example code for calling a COM object method in VB. The parameters are defined as OPTIONAL in the Add() call below: Dim Account1 As Account Dim Account2 As Account Dim ret As Long Set Account1 = Accounts.Add(AccountType:=qbBank, Name:="Checking1234") Set Account2 = Accounts.Add(AccountType:=qbBank, Name:="Savings1234") ret = Accounts.Commit Here is what we are trying in PB: accounts = Create OLEObject result = accounts.ConnectToNewObject("CoreObjx.Accounts") accounts.Add(type, "checking") We are getting an "Error ca...

General programming question
Hello, I need to include the nsISound.h file into mailnews/base/search/src/nsMsgFilterService.cpp. How do I do that? The compiler reports that it cannot find the include file. The mozilla.org hacking page tells me that all include files get copied to dist/include during the build process. Regards, Mark Mark Stier wrote: > Hello, > > I need to include the nsISound.h file into > mailnews/base/search/src/nsMsgFilterService.cpp. > > How do I do that? The compiler reports that it cannot find the include > file. The mozilla.org hacking page tells me ...

COM iteration in PowerBuilder
Hi, I am not a PB user - my customer is. In Visual Basic it is possible to do "COM Iteration" over a collection. For example, VB one could use the Excel object model thus: Dim sheet as Worksheet ' Declare an Excel Worksheet Foreach sheet in WorkSheets Do ' Iterate over the list Debug.Print Sheet.Name ' Print the sheet's name Next Sheet Could somebody tell me whether PB supports this method of iteration, and if so what the syntax would be for the above VB example, and what version of PB is necessary for doing th...

COM+ problems with powerbuilder
I've got 2 applications. The one is a web page(not creatd in powerbuilder) that connects to a COM object. The COM object resides in my main Powerbuilder Application. I want to enter a parameter in the Wep Page that I want to send to my main powerbuilder application. I can connect to the COM object from the web page, but I can't access any windows or global variables in my main Powerbuilder application. In other words I can just bring up a MessageBox once I connect to the COM object, but when I try to access anything outside the COM nothing happens. The COM object resides in a...

Powerbuilder COM object
Hi All, I am using powrbuilder(6.5) created DLL(Machine code) and i have following code in VB to call function from that DLL. Private Sub Command1_Click() Dim pbo As New PBCOM.CoMsg Dim ret As Integer ->ret = pbo.of_status(6) 'This line got error message End Sub Error message : Run Time Error 429 ActiveX component cant create object. Here is PB DLL detail: PB COM Server File Name: C:\mdesai\pbcom\PBCOM.dll Interface Definition File Name: C:\mdesai\pbcom\PBCOM.idl PB COM Server Type: In Process Server Object :uo_msg COM ClassName:CoMsg Program ID:PB60CO...

Is PowerBuilder COM compliant ?
This is a general query : Is PowerBuilder COM compliant ? If yes, then from which version ? Regards A. Chatterjee PB has a COM generator, and has for some time (at least PB6, I'm not sure about earlier versions). Is that what you're getting at? On Tue, 21 Sep 1999 21:26:52 +0530, in powersoft.public.powerbuilder.distributed Anirban Chatterjee <anirbanc@cal2.vsnl.net.in> wrote: >This is a general query : Is PowerBuilder COM compliant ? If yes, then from >which version ? > >Regards > >A. Chatterjee > > --- Bruce Armstrong [T...

powerbuilder and com port
Using PB5 I need to read data from a bar code reader attached to a com port. Is it possible to do this without any 3rd party product abd is ther any examples ? Thanks See my post on 10/29/99 titled COM Port Usage in PB. gakyuz wrote: > Using PB5 I need to read data from a bar code reader attached to a com port. > Is it possible to do this without any 3rd party product abd is ther any > examples ? > > Thanks We've used this approach already in a few applications - it works OK. Wanda J. Parnell <wparnell@perigee.net> wrote in message news:3...

Web resources about - COM Programming - sybase.powerbuilder.general

Mercury (programming language) - Wikipedia, the free encyclopedia
11.07.2 (August 3, 2012 ; 2 months ago ( 2012-08-03 ) ) Mercury is a functional logic programming language geared towards real-world applications. ...

The sheer volume and quality of Netflix’s original programming is unprecedented
... on its laurels, Netflix CEO Reed Hastings said in an earnings press release that Netflix plans to launch at least 600 hours of original programming ...

Learn any of these 16 programming languages and you'll always have a job
... world," venture capitalist Marc Andreessen famously declared. Someone has to write that software. Why not you? There are thousands of programming ...

Microsoft offers developers free tools for its R programming language software
Microsoft is giving developers and students a free crack at its new server software for the R programming language. [ Want to learn R? Download ...

Pay what you want to learn programming for web, Apple Watch, iOS 9 and more
The world of programming is wide and wild, bristling with enough different languages, platforms and workflows to leave anyone dizzy. These 10 ...

CBS, Sky Enter Major Pan-European Deal For Showtime Programming
Sky Atlantic is to become the exclusive home to Showtime programming in major European markets under a new long-term licensing agreement between ...

Verizon's CFO: Custom TV will 'refresh' to comply with programming contracts
Verizon CFO Fran Shammo said his company will make changes to its FiOS Custom TV product, which granularly controls which programming networks ...

The CW Doesn't Care About Live Views Because The CW Doesn't Have Major Stake In Its Programming
CW president Mark Pedowitz says he doesn't care about live viewership... but it's not for the reasons you think.

New Donald Trump programming language seeks to make programming great again
A team of software engineers at Rice University has introduced a new programming language called TrumpScript. Based on Python, the new language ...

There's a Donald Trump Programming Language
If programming isn’t political enough for you, maybe you need to try a new language. How about TrumpScript, which lets you create code that the ...

Resources last updated: 1/23/2016 2:24:03 PM