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


0
Senna
2/10/1999 2:37:50 AM
sybase.powerbuilder.general 62418 articles. 17 followers. Follow

2 Replies
1518 Views

Similar Articles

[PageSpeed] 52

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


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

0
see_msg
2/11/1999 4:24:40 AM
Jon,
You're correct on both counts, you use ConnectToNewObject (or
ConnectToNewRemoteObject if appropriate) and the COM object must be
registered. What may not be obvious to the orignal poster is that a variable
must be declared as an OLEObject e.g.:
   OLEObject MyOLEObject

// and then in your script
MyOLEObject = create OLEObject
MyOLEObject.ConnectToNewObject ("MyDLL.MyDLLClass")

You can confirm the "MyDLL.MyDLLClass" string by using the PowerBuilder
object browser and selecting the OLE tab and looking through the list of
Programmable Objects for your COM object.

Ralph Eyman
Lockheed Martin
ralph.a.eyman@lmco.com

Jon Credit[TeamPS] <see_msg@Sprynet.com> wrote in message
news:36c75b5b.103859994@199.93.177.77...
> 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
>
>
> >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
> >
>


0
Ralph
2/19/1999 9:11:44 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 ...

declaring and calling dll callback functions in Powerbuilder 6.5
Hello! > > I have several .dll C callback functions and a function that takes as its > arguments these callback functions. > > The headers look like this: > > // this is one of the callback functions > typedef long (CALLBACK *PFNINFO) (long lCurrentStatus, // Status code > LPCTSTR lpszInfoString, // Text information > LPCTSTR lpszWorkstation); // Workstation > > // and now the function that uses it > long _declspec(dllexport) MMIRegisterCallbacks(PFNINFO pFnInfo,....

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

Problem calling C# Assembly in Powerbuilder 10.5 via COM Interop
I've written a simple C# assembly that will authenticate against our Active Directory via LDAP using the DirectoryServices classes. I mocked up a C# WinForm app and it's able to use my assembly and authenticate via LDAP. No problems there. I created a Release build with ComVisible = True. Then I mocked up a PB app which will connect to the C# assembly using OleObject...the usual stuff as below. OleObject ole String lszDomain Boolean lbRet ole = create OleObject li_ret = ole.ConnectToNewObject("ldapwrapper.ldap") if li_ret <> 0 then destroy ole messagebox("Error", "OleObject creation error!") return end if lszDomain = "MYDOMAIN" lbRet = ole.authenticate(lszDomain, lszUserID, lszPwd) if lbRet = false then MessageBox("LDAP Authentication Error", "Error") ole.DisconnectObject() destroy ole Return else MessageBox("LDAP Authentication Success", "Logged in!") end if ole.DisconnectObject() destroy ole Actually, it's able to connect to my C# assembly. However it is failing on a method call found in the class System.DirectoryServices.DirectoryEntry. Kind of strange. It walks though the code fine. I can even pop up messageboxes since I am referecing System.Windows.Forms in my assembly. The C# code in question is as below: public class ldap{ public ldap(){} public bool authenticate(String sD...

Can't communicate with VB COM DLL from PowerBuilder 6.5...
I have created a COM DLL in VB version 6 that we are using within one of our IIS applications. I also want to use it in one of our PB 6.5 applications, but so far it only runs successfully on our developer PC's that have both PB and VB installed. I have 2 users that need to run our PB app, so I installed it, then ran the install for the VB DLL. When I run our PB app, it works fine until I call ConnectToNewObject, then it returns a -2 (Class name not found). Obviously I am missing a file when I deploy to the users PC or something. I think it is a PB problem, because I open...

Moving from PowerBuilder 6.5 to PowerBuilder 10
Hi, I have an application developed in PB6.5 and due to changing requirements application has to be switched to PB10. There when I am trying to regenerate the contents of my PBL, it is giving error stating: C0042 : cannot compile without valid database signon. This error is coming for few windows but not for the functions I have made in my pbl. It is working perfectly fine for pb6.5. Can you please help me on this. Thanks in advance. Manich First you must to connect to the database by a profile, continue migrate your app. Karla <Manich Tripathi> escribi...

Calling a MS-SQL-Server 6.5 StoredProcedure from PowerBuilder 6.0
Does anyone know if there is a difference from PB 5.0 to PB 6.0 in the native MSS SQL-Server driver by calling StoredProcedures with OUTPUT arguments. I do have the following problem: - I've got a StoredProcedures with a char, varchar(50) or even with a datetime OUTPUT argument. - In PowerBuilder I do: DECLARE sp_test PROCEDURE FOR schsp_test_char @psReturn = :sReturn OUTPUT USING SQLCA; EXECUTE sp_test; FETCH sp_test into :sReturn; CLOSE sp_test; - If I execute this statement I get the following error: Implicit conversion from datatype 'varch...

How can I write a DLL in PowerBuilder which exports functions to be called in C/C++ code?
Hi, all. I want to write some business logic functions in PowerBuilder which will be called in another c/c++ program. How can I do this? Thanks & Best Regards. Feng You can't create standard Win32 DLLs in PowerBuilder. You can, however, compile NVOs into COM DLLs, and call those from a C++ program. -- <hopethishelps /> Roy Kiesler [TeamSybase] MySybase - http://my.sybase.com "Feng Zhu" <fzhu@sumerp.com> wrote in message news:tAzUZI7aAHA.216@forums.sybase.com... > Hi, all. > > I want to write some business logic functions in PowerBuilder which will be > called in another c/c++ program. > > How can I do this? > > Thanks & Best Regards. > > Feng > > > Hello Roy. I have more questions: 1. You know if in PB8 the dll is standard? 2. Which is the utility of have dll that aren't standard? Sorry my english, and thank for you answer. "Roy Kiesler [TeamSybase]" escribi�: > You can't create standard Win32 DLLs in PowerBuilder. You can, however, > compile NVOs into COM DLLs, and call those from a C++ program. > > -- > <hopethishelps /> > Roy Kiesler [TeamSybase] > MySybase - http://my.sybase.com > > "Feng Zhu" <fzhu@sumerp.com> wrote in message > news:tAzUZI7aAHA.216@forums.sybase.com... > > Hi, all. > > > > I want to write some business logic functions in...

Migration to PowerBuilder 6.5 from Powerbuilder 4.0
Hi all, I'm going to migrate from Powerbuilder 4.0 to Powerbuilder 6.5 soon. I would like to know if I have to migrate previously to Powerbuilder 5.0, or if it is possible to migrate directly from Powerbuilder 4.0 to 6.5. In the last case I would like to know if I can have any problems during the upgrade process. Thanks in advance... On Wed, 17 Feb 1999 13:46:07 +0100, in powersoft.public.powerbuilder.general "Jorge Salamanca" <jsalamanca@fintec.es> wrote: >Hi all, > >I'm going to migrate from Powerbuilder 4.0 to Powerbuilder 6.5 soo...

Migrating from PowerBuilder 6.5 to PowerBuilder 8.0
We are doing a feasibility study of migrating a PFC based PowerBuilder Application from v6.5 to v8.0. This application is heavily PFC depended and also includes many custom based core layers. If anybody has done (PFC based) powerbuilder migration prior kindly suggest the best approach on the following. 1) How to successfully migrate from PowerBuilder 6.5/PFC - PowerBuilder 8.0/PFC. 2) How to fix/resolve post migration errors etc... . Any help or suggestion will be appreciated. Thanks and Regards Vamsi ---== Posted via the PFCGuide Web Newsreader ==--- http://www.pfcguide....

MS SQL 6.5 and PowerBuilder 6.5
I have an application in PB6.5 that interfaces with MSSQL 6.5 database. I can run this app WITHIN PB to make a connection the database and retrieve data without a problem, but after I built the EXE file and trying to run from that EXE file, I get a "-1" as the return code from the SetTransObject statement. Sample code is like : datastore lds_datastore lds_datastore = CREATE datastore lds_datastore.DataObject = "d_test" li_return = lds_datastore.SetTransObject(SQLCA) The d_test datawindow object consists of a simple SQL SELECT statement. Has anyone seen this ...

PowerBuilder 6.5 to Powerbuilder 9.0.1
Hello, We are having some issues while trying to upgrade from PB 6.5 to PB 9.0.1 The database is Sybase .I was hoping if you could post in any usergroups Background: There is a window w_child inherited from w_parent.The datasource of this dw_1 is a Stored Procedure that runs in Sybase ASE 12.5 In ue_1 of w_parent there is a dw_1.retrieve(arg1,arg2). ue_1 of w_child extends ue_1of w_parent. In ue_1 of w_child the code checks the condition dw_1.rowcount() >0 based on which it decides on the execution flow. Issue: While running the application, no rows are getting re...

PowerBuilder 6.5
Since upgrading my DB to ASA 6.0 I can no longer do a "Save As" in PB database painter to rename table. Error message is: An internal processing error has occurred. Report it immediately. I've also noticed that the DB painter options have changed. There is no longer an Autoincrement option. Has anyone heard if these are bugs? When is maint patch for 6.5 going to be released or will it be covered in ASA 6.0 patch? Thanks in advance! Did you report this to Sybase as requested? Roy R Granquist wrote in message <8QCb7Hj89GA.190@forums.powersoft.com>...

PowerBuilder 6.5
Since upgrading my DB to ASA 6.0 I can no longer do a "Save As" in PB database painter to rename table. Error message is: An internal processing error has occurred. Report it immediately. I've also noticed that the DB painter options have changed. There is no longer an Autoincrement option. Has anyone heard if these are bugs? When is maint patch for 6.5 going to be released or will it be covered in ASA 6.0 patch? Thanks in advance! The reason this doesn't work is probably due to the fact that Powerbuilder is lacking a section in the PBODB60.INI file for ASA. Just take the SQL Anywhere section and duplicate it and change the name. I don't know what name PB is looking for in the INI but you could try "Adaptive Server Anywhere" or some permutation of that. -- Jim Egan [TeamPS] Dynamic Data Solutions - http://www.dyn-data.com Houston, TX R Granquist <rgranquist@bernicks.com> wrote in article <TJktLJj89GA.151@forums.powersoft.com>... > Since upgrading my DB to ASA 6.0 I can no longer do a "Save As" in PB > database painter to rename table. > > Error message is: An internal processing error has occurred. Report it > immediately. > > I've also noticed that the DB painter options have changed. There is no > longer an Autoincrement option. > > Has anyone heard if these are bugs? > When is maint patch for 6.5 going to be released or will it be...

Calling a Powerbuilder function from C++ DLL
Hi All, I need to execute a powerbuilder function from a DLL written in Watcom C++ ? Is there a way to do it or any workaround ? My problem is the following : From a function written in Watcom C++ i have to read data from a database table currently connected to a powerbuilder data source. Any help appreciated Stefano Bullo You cannot invoke a PB function externally. The next best thing is to use the SendMessage Win32 API function to trigger a user event on a PB window (use the range of WM_USER to WM_USER+ 74, mapped to pbm_custom01-pbm_custom75). ...

C# .NET DLL called from powerbuilder
Has anyone had luck calling a C# .NET DLL from powerbuilder? I have heard it may be possible using interop services, but I have not yet had luck getting anything to work. Thanks, Dan ...

Powerbuilder call dll file I have written myself??
If I want to write a C program called by pb client, Here is my simple program ,I make a dll file name dlltest.dll in d:\temp ///////////////////////////////////////////////////// extern "C" __declspec(dllexport) int hello(); int hello() { return 0; } ///////////////////////////////////////////// in powerbuilder NOV object local external function I declare : ///////////////////////////////////////////// Function int hello () Library "d:\temp\Dlltest.DLL" ///////////////////////////////////////////// Is it lose some steps?? Have you tried using "stdcall&q...

Access Violation in PowerBuilder 6.5 and 6.5.1
I'm migrating a big Application from PowerBuilder 5.04 to 6.5.1. There was no problem in migrating the *.pbl. When Creating the native Executable for Windows NT 4.0, there is a Dr. Watson in pb60.exe (Access Violation). The compiler switches are set the following way: 1) Rebuild -> Full 2) Machine Code -> Yes (Checked) 3) Trace Information -> No (Not Checked) 4) Error Context Information -> No (Not Checked) 5) Executable Format -> Native 6) Optimization -> Speed 7) For each Library has to be created a dll. Therefore the checkbox is checked for each Library...

Using Access with PowerBuilder 6.5
Hello, I'm using PowerBuilder 6.5 but I don�t know if is possible to use Queries of Access into PB. I have a problem when I try to use any query , I obtained the following message: SQLSTATE = 37000 [Microsoft Access 97 Driver] Syntax Error or access violation (call) 1 execute admin.query;0 id = :id; Does anybody knows how to do this?. Thanks in advance First, a simple test: Can you see an Access table from the same MDB in pb 6.5? If you can, the second question is, what kind of query in Access? Access defines DDL and DML queries as "action" queries, meani...

Upgrade Powerbuilder 6.5.0444 to 6.5.1
I have Powerbuilder 6.5 build 444 installed, but the application I'm now supporting was built using 6.5.1. Is there anywhere I can get the upgrade to 6.5.1? When I go to the downloads area of this site it asks me for client support which I don't think I have? Thanks Hi Gary; Sorry to say .. but, I think the only PB 6.x copies are in the Smithsonian. :-( The only hope you might have is through Sybase Technical Support. Good luck. -- Regards ... Chris ISUG - NA RUG Director Blog: http://chrispollach.pbdjmagazine.com SourceForge: http://sourceforge.net/pro...

Powerbuilder 6.5 excecutable as dll
Hi We are trying to create a Powerbuilder 6.5 executable with the machine code option checked (DLL and not PBD). Excutable format as native. The executable and the dlls are created fine. Some windows open fine but the executable crashes when trying to open windows with tab object. Any body created and deployed excutables for a large application using the native machine code option under PB6.5 sucessfully. Any info on the same would be appreciated. Regards prr ...

Calling Functions in a C++ COM object from Powerbuilder
This is a question posed by Pepsi any help would be greatly appreciated. Rob Baker Powersoft Custom Support We have a COM object coded in C++ which supports some common functions among the Pepsi applications, such as security, single signon and exception handling. Because the number of funcitons we have to support in this object, it is partitioned to support mutiple interfaces. In the object, only the primary interface supports the IDispatch interface because of the current COM limitation, and all the rest of the interfaces only support the IUnknown interface. We now have...

Calling C++ dll in Powerbuilder giving error
Hi, I have created a C++ dll with a simple ADD function. The header file is: #if defined DLL_EXPORT #define DECLDIR __declspec(dllexport) #else #define DECLDIR __declspec(dllimport) #endif extern "C" { double Add( short a, short b ); } #endif The .cpp file contains: extern "C" { double Add( short a, short b ) { return (a+b); } } ---------------------------------------------------------------------------------------------------------------------------------------------------------- I have tried using int, long and double ...

Using DDE in PowerBuilder 6.5 Problems
Dear All Is there any here knows, and known bugs, on powerbuilder DDE.functions As I try to use a PB application to connect to DDE server application, and I was found that the connect is very unstable. MicroSoft has discontinued support for DDE from Windows95. DDE is inherently unstable in Windows95/98/NT because these are Pre-Emptive Multitasking Systems. The connection with a DDE object is lost over time. You need to use OLE instead. Samuel Tsang wrote: > Dear All > > Is there any here knows, and known bugs, on powerbuilder DDE.functions > As I try to ...

Web resources about - How do I call a com dll written in c++ using PowerBuilder 6.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: 3/2/2016 9:03:55 PM