Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to create a dll in PB?

Posted on 2004-10-28
6
Medium Priority
?
655 Views
Last Modified: 2013-12-26
Hi!
I need to create a dll with some functions than I already have like encrypt a string and things like that.
How can I create the dll with these functions to be called from a program in another lenguage like delphi or from the same PB? wich are the steps? I'm using PB 9.0
Thank you very much!!
0
Comment
Question by:tsirakua
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 5

Accepted Solution

by:
michaelstoffel earned 375 total points
ID: 12438202
You'd need to use PBNI to call PB functions, but that gets you into a whole other world.  

It would be easier to write the utility functions in another language like Delphi or C which creates true windows dlls and call them from PB
0
 
LVL 33

Assisted Solution

by:sajuks
sajuks earned 375 total points
ID: 12441398
Check the articles on PowerBuilder Native Interface (PBNI)  by Roy Kiesler
http://www.sys-con.com/pbdj/article.cfm?id=504
0
 
LVL 5

Expert Comment

by:michaelstoffel
ID: 12444163
My feel is that if you need to go to that amount of effort (PBNI) it would be more cost effective to write encryption routines, etc. in a language that creates actual Windows DLLs.  PowerBuilder is much less efficient at string manipulation than Delphi anyway.  And take a look at what you have to go through to call a PB function from another language and I'm sure you'll agree it's easier to go the other language route.

If you already have expertise in another language, which I assume you do since you want to use Delphi to access the functions, it makes more sense to just use that language.

What is the rationale for using PB in this situation?

Mike
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 33

Expert Comment

by:sajuks
ID: 12450279
<offtopic>
 @michaelstoffel,no offense, but dont you think that if you are a hardcore powerbuilder program
and you have been now given the right tool and facility to be allowed to create/access dlls which
can be used in any other language a great advantage? True if you know Delphi,C then you would most
probably create them in that language but if are programming in pb and they've a simple to use interface
then why not code in that pb itself ?Since Pb9 and above offers lots of new things which were not available
uptil now in PB you'd to look at other options and combine PB and C/Delphi together in your programming s/w.
But now it has become much simpler, the learning curve now stops at PB itself(for a novice programmer) .
But thats my opinion and others may disagree. Am not against delphi/c am hust commenting upon the fact that since pb now
offers all these things do you still need to code a part of your s/w in other languages .
Again i offer my apology if you feel i've offended you in some way.
</offtopic>
0
 
LVL 5

Expert Comment

by:michaelstoffel
ID: 12452830
I'm not offended at all.  And yes I'm a die hard PB user, have been since version 2.  But PB is not the best tool for all instances.  For something as simple as an encryption function, the effort to call the function from Delphi or C using PBNI would be way more expensive than just recoding the function.  

To me it is more a question of cost justification.  If the goal is to code some utilities once that are callable from multiple languages, then it may make sense not to use PB.  It's up to tsirakua to take the information we've provided here, do a little research, and make a decision as to the most effective way to approach the problem.  There is no right answer.

BTW, to use PBNI, you must code in C++, as well as in PB, so you are already out of the PB only realm.

I think discussions like these are good and differing opinions cause both side to think.  I also hope I have not caused any offense.
0
 

Author Comment

by:tsirakua
ID: 12463948
Guys thank you very much for your interest!
I´m a PB programmer and I have not very much experience programming in delphi, the reason to programm the dll in PB is because I have more experience programming in PB but I'm part of a team of programmers than programms in different lenguages like delphi and C and I have the work to program the dll to all the team use it, but after your help I decided to programm the dll en delphi with help of my partners.
Thank you guys!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand column That will then direct you to their download page. From that p…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.
Suggested Courses

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question