Returning OleObjects from a PowerBuilder COM object.

Hi,

    I have the following proble,:

    I'm trying to return a OleObject that is created in a COM Object (PB).

Code PB Com object:

OleObject  lole
Integer   lerr

lole = Create OleObject
lerr =  lole.ConnectToNewObject("pbobject.comobject")
MessageBox("Com Error ", String(lerr))

Return lole

When I call this function I get the MessageBox with error value 0 (all is
ok) and than
I get  a GPF: PB60 caused an invalid page fault in module <unknown> at
000de:0000013

Has any one managed to return OleObjects from PBCom objects?

Thanks,

Marc







0
Marc
5/12/1999 11:05:21 AM
sybase.ole-ocx-activex 6324 articles. 0 followers. Follow

2 Replies
1121 Views

Similar Articles

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

I think the problem is that you defining a local varibal, doing a create and
return the local varibal.
now, after the function ends, the local varibal and it's memory goes out of
scope.
try to define the function with a by - reference argument of type ole-object
and then do like this:
Function create_ole(ref aole as OleObject)
aole = Create OleObject
lerr =  lole.ConnectToNewObject("pbobject.comobject")
MessageBox("Com Error ", String(lerr))

// you  can return a integer return code for success - failure but the
ole-object returned as output argument in the function.





Marc Algera wrote:

> Hi,
>
>     I have the following proble,:
>
>     I'm trying to return a OleObject that is created in a COM Object (PB).
>
> Code PB Com object:
>
> OleObject  lole
> Integer   lerr
>
> lole = Create OleObject
> lerr =  lole.ConnectToNewObject("pbobject.comobject")
> MessageBox("Com Error ", String(lerr))
>
> Return lole
>
> When I call this function I get the MessageBox with error value 0 (all is
> ok) and than
> I get  a GPF: PB60 caused an invalid page fault in module <unknown> at
> 000de:0000013
>
> Has any one managed to return OleObjects from PBCom objects?
>
> Thanks,
>
> Marc

0
Amit
5/13/1999 10:07:58 AM
Hi,

I have tied this. But Powerbuilder does not allow OleObject as arguments of
com objects. ("argument aole  is a oleobject type, this type is not
supported in this release" I'm using v6.5).

But a note on the local variable. COM objects have reference counts, and
should not be destroyed
when the local variables goes out of scope. Its life time should be depenent
on Connect and Disconnect. (i.e. AddRef/Release). Thats the theory anyway.
PB COM objects might behave differently?

The problem I'm trying to solve, is to create Initialized COM objects for an
scripting language (VBScript). I'm trying to make an interface with our main
application thru VBScripting. I want to have one com object return different
result sets. Each result set will have an iterator. But at the moment I'm
stuck as I can't get a COM object as a result.

Marc





0
Marc
5/17/1999 7:19:07 AM
Reply:

Similar Artilces:

Q: How to return COM/OLEObjects from a PB COM/OLEObject object.
Hi, This is a repost, as I still have not found a solution to my problem. I have the following problem: I'm trying to return a OleObject that is created in a COM Object (PB). Code PB Com object: OleObject lole Integer lerr lole = Create OleObject lerr = lole.ConnectToNewObject("pbobject.comobject") MessageBox("Com Error ", String(lerr)) Return lole When I call this function I get the MessageBox with error value 0 (all is ok) and than I get a GPF: PB60 caused an invalid page fault in module <unknown> at 000de:0000013 H...

Use OLE COM Objects in PowerBuilder
Does anyone have an example of using OLE objects from PB4 or PB5? I have a class library that works in VB/VC/VFP, but I do not know how to instanciate an object and use it's methods/properties in PB. Thank you in advance. Take a look at the CreateObject() function. Does that help? Regards Costas Tsaklas[Team Powersoft] Elevated Technologies, Inc. www.elevatedtech.com Bob Whelan wrote in message <3467BB57.599F4519@pin-corp.com>... >Does anyone have an example of using OLE objects from PB4 or PB5? >I have a class library that works in VB/VC/VFP, but I do no...

How to handle events from a COM object ( not ActiveX) in Powerbuilder
I need to catch the events fired from COM object in powerbuilder application. Object is initialized as following: ole_custom = Create OLEObject ole_custom.ConnectToNewObject("Custom.Custom.1") custom.dll is COM dll and fires event JobDone(string status) How I can get this working. Thanks It's explained a bit in Microsoft technote 238983. The particular example given is for Microsoft Office, but the approach is for any OLE Automation object http://support.microsoft.com/default.aspx?scid=kb;en-us;238983 I...

Tip Thread
Hi all, Just a few more tips to hopefully help my fellow developers save some valuable development time by avoiding some of the issues I've suffered through: OLE Automation Server Object Issues: As I've mentioned before in the Tip Thread - Creating COM Objects (Restatement), using OLE Automation Server (simply "Automation Server" in 7.0) is a great alternative to using the COM generator since with OLE Automation Server objects you be able to create COM objects from any PB NVO that contains non-private references to any PB specific datatypes, like PB NVO's, u...

VB COM (ActiveX dll) OLE from Powerbuilder 10.5
Hello, I have folder/file backup function in my application. To notify the PB window of the progress and status of the backup I use the CopyFileEx (which uses callback) windows api function in visual basic to achieve the file backup The VB project has one main module and one class. The module contains the callback function (the function that will be called by CopyFileEx to notify about the changes and progress of the copy. It also contains the caller function that initiate the CopyFileEx. All that the callback function does is to send a message to a registered PB window ab...

Accessing objects returned by COM object
Hello there, I'm new to ASP.NET (migrating from PHP and Java), and have what is probably an entirely stupid problem: The data layer of the site I am updating is composed of a number of compiled COM objects, the source of which I don't have access to. I have created Interop wrappers for the objects, but I'm not quite sure how to handle the VB objects that they return (I am working in C#). I'm not very familiar with VB, but the VB objects are definitely a list of some kind, so I was vaguely hoping to be able to cast to an ArrayList. Unfortunately, this is raising an IllegalCastExce...

how can i use powerbuilder to develop an activex/ole/ocx? help me please!!!
Please do not cross-post. -- <hopethishelps/> Roy Kiesler [TeamSybase] MySybase -- http://www.sybase.com/mysybase "tadsun" <tadsun@163.com> wrote in message news:jIQ8Mt7BCHA.200@forums.sybase.com... > > > ...

powerbuilder com object vs pocketbuilder .... object
Our powerbuilder application is sending information to a feeding machine by calling a com object. Our program now runs on a mobile device. The software is written with pocketbuilder 2.04. Now we would also like to have the connection with this feeding machine. I talked to the supplier of the feeding machine. He told me that the com object was written in Visual studio C. The simplest solution for them would be to create a .Net object. Is this the way to go? Thanks Eric Up on CodeXChange we have a handful of "adapter" layers (sometimes called "shims&quo...

Calling a COM object from a PowerBuilder object's sript??
From: "Chris Fauvel" <chris_fauvel@fintech.net> Subject: Calling a COM object from a PowerBuilder object's sript?? Date: Wednesday, March 07, 2001 2:33 PM I'm interested in knowing how to call somebody else's COM object written in C++ (it is a dual interface...what ever that it is) would we enter the information the same way we do for DLLs within the global/local external functions section for whatever object we want the function to be available? Any examples or direction to examples would be appreciated. Thanks Chris Use the C...

Calling a COM object from a PowerBuilder object's sript??
I'm interested in knowing how to call somebody else's COM object written in C++ (it is a dual interface...what ever that it is) would we enter the information the same way we do for DLLs within the global/local external functions section for whatever object we want the function to be available? Any examples or direction to examples would be appreciated. Thanks Chris hi, I'v tested it yet, i couldn't use it with the global/local external functions declarations method. It could be that some components need to be initialized first and global/local e...

PowerBuilder Ole Objects
I am getting the following message in a PB Error Dialog in an "In House" Application running on Win2K and WinXP. The program was written to generate an MS Word Document and then store said document in an ORACLE Table as a BLOB. What are some of the conditions I need to look for in troubleshooting this problem? /////////////////////////////////////////////////////////////// The following error was detected at line 16 of "w_action::wf_generate_letter" Error calling external object function open -PowerBuilder ErrNo : 35 You may choose to ign...

PowerBuilder Bugs: Using VB ActiveX control (OCX) in PowerBuilder 6.0
I'm going to write some VB ActiveX control (using Microsoft VB6.0 SP3) to be used in PowerBuiler 6.5, but I found that it's very easy to crash in PowerBuilder, Here is the test case: 1) Create a very simple VB ActiveX control (only one button without any script) in Visual Basic 2) Create a PB project to open a Main Window (w_1) with an ole object of VB ActiveX control 3) Open another Window (w_2) with an ole object of VB ActiveX control (can be same as previous or other control) 4) Click the OLE object in w_2 to make it get focus 5) Close w_2 -> it will crashed If ...

OLE Control vs OLE dw object vs OLE Column in dw object
Dear all, I'm using PB 6.5.1 with PFC. I'm trying to right Mail Merge like function in a system. Thus, we've to keep the merged document into history for later referece. I'm wondering the difference between OLE Control vs OLE dw object vs OLE Column in dw object??? Can anyone give some ideas on the above and what is the usage of it?? On the other hand, I'm wondering whether I'm using the RTE dw object for mail merge and then save the whole content into a OLE Database blob column, or using OLE control to MS Word + using DDE to transfer the data to MS Word?? ...

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...

Web resources about - Returning OleObjects from a PowerBuilder COM object. - sybase.ole-ocx-activex

PowerBuilder - Wikipedia, the free encyclopedia
PowerBuilder is an integrated development environment owned by Sybase , a division of SAP . It has been in use since 1991, peaking around 1998 ...

Sybase PowerBuilder tool readied for Microsoft's .Net
... Win32 or newer style .Net development After several years of work, Sybase is ready to deliver on the final step in its plan to move PowerBuilder ...

Jim O'Neil (@jimoneil) on Twitter
Sign in Sign up To bring you Twitter, we and our partners use cookies on our and other websites. Cookies help personalize Twitter content, tailor ...

Open Directory - Computers: Programming: Languages
about dmoz - dmoz blog - report abuse/spam - help the entire directory only in Programming/Languages Description Top : Computers : Programming ...

The HP Booth Staff (Goons) Owe Me an Apology
... when you might need to use it. For instance, when I was in the WinRunner world there were plugins for driving terminal emulators and powerbuilder ...

Contact Us - Sybase Inc
Thanks for visiting the 主页 section of Sybase.com. Here you will find information about Contact Us. For more information about Business Intelligence, ...

热门搜索 - 我的异常网
... 我的异常网 » 热门搜索 sdpnet2 移动【A111】其它用户原因鉴权失败,是什么意思啊 http:// 192.168.1.102:22578 本网站服务器位于美国,受美国法律保护 MiniUI js 破解 http://192.168.1.103:8080/ powerbuilder ...

Mobile app security: Always keep the back door locked
The best way to keep mobile apps safe is to secure the services they connect to.

10 Tech Skills That Will Instantly Net You A $100,000+ Salary
... that let's developers run Java applications. Java is highly popular language for writing web apps and custom enterprise apps. No. 8: PowerBuilder ...

Top Ranked Articles
Top Ranked Articles - Free source code and tutorials for Software developers and Architects.; Updated: 23 Feb 2013

Resources last updated: 1/12/2016 9:03:46 PM