using c# generated dll inside powerbuilder 11.5

HI there

BAckground> I building my dll inside c# in VS2010 using .net
2.0.  I would like to use this simple dll which gets Outlook
data from the clipboard and generates a file inside my
powerbuilder application.  So nothing too fancy.

Please help.  I have seen some examples of how this should
work, but having followed a lot of them i still can not get
this to do the job.

Basically I created a simple c# class and I have the dll.

IN the options I set cominterop and under the namespace in
the class I entered >

    [ComVisible(true)]
    [ClassInterface(ClassInterfaceType.AutoDual)]
    [ProgId("Tramos.Tramos")]


Now I try and use this dll on another PC with powerbuilder
(inside system32).  I executed regasm tramos.dll and see the
item inside regedit.  Tramos.Tramos and it looks the same as
on my .net development PC>

Inside Powerbuilder itself I use the following code>

OLEObject obj_test

obj_test = CREATE OLEObject
IF obj_test.ConnectToNewObject( "Tramos.Tramos" ) = 0 THEN
  obj_test.saveOutlookMsgToClipboard( )
END IF

but the ConnectToNewObject method always returns -3 (unable
to open object)

ANy ideas please to what I may have missed?

Thanks in advance

ANdy
0
Andyfives
1/9/2011 11:39:18 AM
sybase.powerbuilder.general 62418 articles. 14 followers. Follow

2 Replies
1536 Views

Similar Articles

[PageSpeed] 52

You might try running filemon or depends to determine if you're
missing a runtime file that prevents the assembly from loading.

Is the appropriate .Net framework installed on the target machine?

On 9 Jan 2011 03:39:18 -0800, Andyfives wrote:

>HI there
>
>BAckground> I building my dll inside c# in VS2010 using .net
>2.0.  I would like to use this simple dll which gets Outlook
>data from the clipboard and generates a file inside my
>powerbuilder application.  So nothing too fancy.
>
>Please help.  I have seen some examples of how this should
>work, but having followed a lot of them i still can not get
>this to do the job.
>
>Basically I created a simple c# class and I have the dll.
>
>IN the options I set cominterop and under the namespace in
>the class I entered >
>
>    [ComVisible(true)]
>    [ClassInterface(ClassInterfaceType.AutoDual)]
>    [ProgId("Tramos.Tramos")]
>
>
>Now I try and use this dll on another PC with powerbuilder
>(inside system32).  I executed regasm tramos.dll and see the
>item inside regedit.  Tramos.Tramos and it looks the same as
>on my .net development PC>
>
>Inside Powerbuilder itself I use the following code>
>
>OLEObject obj_test
>
>obj_test = CREATE OLEObject
>IF obj_test.ConnectToNewObject( "Tramos.Tramos" ) = 0 THEN
>  obj_test.saveOutlookMsgToClipboard( )
>END IF
>
>but the ConnectToNewObject method always returns -3 (unable
>to open object)
>
>ANy ideas please to what I may have missed?
>
>Thanks in advance
>
>ANdy
0
Bruce
1/9/2011 5:34:28 PM
Hi there thanks for the quick response.

Yes, the appropriate .Net framework is there on my pb
development pc.  Up until v. 3.5 sp1.

Andy

> You might try running filemon or depends to determine if
> you're missing a runtime file that prevents the assembly
> from loading.
>
> Is the appropriate .Net framework installed on the target
> machine?
>
> On 9 Jan 2011 03:39:18 -0800, Andyfives wrote:
>
> >HI there
> >
> >BAckground> I building my dll inside c# in VS2010 using
> net >2.0.  I would like to use this simple dll which gets
> Outlook >data from the clipboard and generates a file
> inside my >powerbuilder application.  So nothing too
> fancy. >
> >Please help.  I have seen some examples of how this
> should >work, but having followed a lot of them i still
> can not get >this to do the job.
> >
> >Basically I created a simple c# class and I have the dll.
> >
> >IN the options I set cominterop and under the namespace
> in >the class I entered >
> >
> >    [ComVisible(true)]
> >    [ClassInterface(ClassInterfaceType.AutoDual)]
> >    [ProgId("Tramos.Tramos")]
> >
> >
> >Now I try and use this dll on another PC with
> powerbuilder >(inside system32).  I executed regasm
> tramos.dll and see the >item inside regedit.
> Tramos.Tramos and it looks the same as >on my .net
> development PC> >
> >Inside Powerbuilder itself I use the following code>
> >
> >OLEObject obj_test
> >
> >obj_test = CREATE OLEObject
> >IF obj_test.ConnectToNewObject( "Tramos.Tramos" ) = 0
> >  THEN obj_test.saveOutlookMsgToClipboard( )
> >END IF
> >
> >but the ConnectToNewObject method always returns -3
> (unable >to open object)
> >
> >ANy ideas please to what I may have missed?
> >
> >Thanks in advance
> >
> >ANdy
0
Andyfives
1/9/2011 6:59:36 PM
Reply:

Similar Artilces:

Use PowerBuilder DLL in PowerBuilder
We use PB6.5. We would want to use a DLL create from PB in a PB application. We compiled an a PBL as DLL. After we tried to use DLL in a user object external, but without success. How can we do to use DLL create from PB or use in a new PB application some object (visual and no) before compiled with PB? Any help will be appreciated. Saul.Convalle@mail.cec.it Thanks When you create a DLL from a PB library it is not really a standard Windows DLL. I'm not sure what the difference is. If you are making calls from PB then just use the standard PB calling syntax the ...

Using Paintdesktop (user32.dll) in PowerBuilder 11.5
Dear all, Is'it posible using API PaintDesktop in PB, once it works in VB, how to make it work in PB? The purpose of this API is to copy wallpaper into a form-VB(window-PB). Private Declare Function PaintDesktop Lib "user32" (ByVal hdc As Long) As Long in Form_Paint() event: Private Sub Form_Paint() PaintDesktop Me.hdc End Sub it works fine in VB, how to make it works in PB? TIA PowerBuilder windows don't have hdc as a property, you need to get it using an API function. Function long GetDC ( long hWnd ) Library "user32.dll" Function ...

How do I call a com dll written in c++ using PowerBuilder 6.5???
Environment : Win Nt Wks 4.0 SP4 PowerBuilder 6.5 hi, I have written a com dll using c++ (ATL dev studio 6.0) and I now have to call the dll form a powerbuilder app. How do I call my com dll from my powerbuilder app??? Thanks Sunit On Tue, 9 Feb 1999 20:37:50 -0600, "Senna" <puto@execpc.com> wrote: I believe you use the ConnectToNewRemoteObject function to do this. You will have to make sure your COM object is registered, however. HTH Jon Credit[TeamPS] CPD Professional PB6 JCredit@Sprynet.com http://home.sprynet.com/sprynet/jcredit >E...

PowerBuilder 10.5.2 Build 7826 differs from PowerBuilder 11.5.1 Build 4675
Apparently there's some data conversion issues that differ from PowerBuilder 10.5.2 and 11.5.1 (builds listed in subject). The following mini scrip results in different returned values: Byte lb_test Decimal ld_test lb_test = 48 ld_test = Dec(lb_test) MessageBox("Test", String(ld_test)) In PowerBuilder 10.5.2, the messagebox displays the value "48". In PowerBuilder 11.5.1 the messagebox displays the value "0.48". It appears that in PB 11.5.1, it's dividing the result by 100 for some reason. It appears to be a bug, just wanted to ve...

Problem registering dll created in Powerbuilder 8 and migrated to Powerbuilder 11
Hi, We have created a dll in Powerbuilder 8 as a com/mts application. This dll was then migrated to powerbuilder 11.1 build 8204. I am able to build the dll on my development machine and properly register the dll on my development machine on windows 7. When i deploy my dll and test application to a clean windows xp box, i am unable to register my dll using regsvr32. No error is displayed and the message box identifing that the registration was successful is never displayed. I have deployed all Powerbuilder 11 runtime using the powerbuilder runtime packager. I also deployed...

How to dial-up a modem using powerbuilder 11.5
Dear all, I want to dial a modem to connect to the internet from powerbuilder 11.5, Is it posible to do this with powerbuilder. TIA I found http://www.rgagnon.com/pbdetails/pb-0021.html but it's pretty sparse - you'd have to look up that module in the Microsoft web site to figure out how to set up the "YourConnection". http://www.pbdr.com/software/comp/rasdial.zip sounds interesting but I haven't looked inside it. -- Report Bugs to Sybase: http://case-express.sybase.com/cx/welcome.do Product Enhancement Requests: http://my.isug.com/cgi-bin/1/c...

Using Borland C DLL in PowerBuilder 10
We tested the new PowerBuilder10 beta version. Before we used PowerBuilder 6. In PowerBuilder 10 our DLL functions didn't work. The same functions are working with PowerBuilder 6. After PowerBuilder10 has handed over a String to the C function, the length of the String in the C function (strlen(s)) is always 1 and the C function always returns only the first character of the string. This Example returns a "0" to PowerBuilder10 but it must be "040170000001": Defintion of the external function in PB: public function string CDelete(string s,string t) Librar...

Powerbuilder 5 to Powerbuilder 10
Hi all We have migrated our application from powerbuilder 5 to powerbuilder 10. after migration to version 10, alignment in most of reports disturbed. please advice me some solution. On Fri, 29 Feb 2008 12:45:01 +0100, Adnan Jamil <adnanjamil@nji.com.pk> wrote: > Hi all > > We have migrated our application from powerbuilder 5 to powerbuilder 10. > after migration to version 10, alignment in most of reports disturbed. > please advice me some solution. Adnan, Is this a SQL Anywhere question? If not, you have posted to the wrong forum. If yes,...

using powerbuilder generated dll in vb.net problem
i'm using pb 7.0.3 build 10213 to generate a dll...and using this dll in vb.net on the same development pc....the dll works fine... but, on the deployment pc...where there is no powerbuilder installed just vb.net....the dll wont work... i there deployemtn file dependencies that i need to install on the deployment pc for the dll to work? tnx Yes, you must also install the PB VM runtime files, and make sure they're on the system path. ...

.Net(c#
Hi, We have client-server application which is running in PB 11.1. We want to invoke some methods in .Net assembly DLL which was developed in c# by passing some arguments to get some values return back. To include the .Net assembly we need have a target as .net windows form or .net assembly etc. I have selected .Net windows form to include the .Net assembly DLL to call & selected "Use an existing library and application object" option in the target creation. Here my problem is that when we create an application (creating project) for an existing application, it will try...

PowerBuilder 11.5
I have an application that I am creating that accesses a web service designed by our customer and retrieves inventory/product/order information. I am getting the error "There was an error generating the XML document" on one of the calls to the web service. The process is that I call the function GetPickTickets and with a string argument that contains the store code. This returns an array of any open orders for that particular store. This works fine. After that I call another function UpdatePickTicket which acknowledges that we recieved the order information for a specif...

Help - About external function from PowerBuilder 11.5
I am trying to call a windows wrapper getusername in advapi32.dll from my powerbuilder source code, but failing. This is because the active directory is either not installed or is not enabled.Is my understanding right? How do i check if active directory is enabled or not? And can anyone pls confirm that active directory should be enabled for functios in advapi32.dll to work? Pls help ...its urgent need Hi Sap; I would not even bother ... just wrap the GetUserName ( ) method call in a TRY...CATCH and issue an error if the command fails. Food for thought. Regards ... Chris ...

Using Intersolv 3.01 ODBC Drivers with PowerBuilder 11.5
Hi, Does anyone know if it possible to use the Intersolv 3.01 ODBC drivers with PowerBuilder 11.5? We are upgrading our apps from PB10.5 to PB11.5. The Intersolv ODBC drivers were okay in PB10.5 but no longer works in PB11.5. We got the Intersolv ODBC drivers with PB5 and have been using them with all the PB upgrades without any problems until PB11.5. When I try to use the Intersolv ODBC drivers with PB11.5 I get the following message =93[INTERSOLV][ODBC dBase driver]You are not licensed to use this INTERSOLV ODBC Driver under the license you have purchased. If you wish ...

Powerbuilder 11.1 using WebServices .net 3.5 Framework
Hi All, I've created a "Hello World" web service using Visual Studio 2008 with 3.5 .net Framework, tested the web service and it works fine. Deployed the web service to a IIS 5.0 Web server on Windows XP Pro; now I'm trying to generate the WebService proxy in PB 11.1. I've set the WSDL engine to ".Net", point to the IIS server for the ".asmx" file for the WSDL location. When I try to deploy the project, I keep getting the following error. "Cannot access the WSDL or the WSDL file is invalid. (file://bla bla bla) Is PB compatiable wi...

Web resources about - using c# generated dll inside powerbuilder 11.5 - sybase.powerbuilder.general

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: 11/30/2015 6:55:13 PM