1. JANG JASON
  2. PowerBuilder
  3. Friday, 18 September 2020 06:56 AM UTC
 
TO I ask for help from seniors who use Power Builder.

I am so beginner I am ashamed to ask questions here.

The question is;
1. I imported the DLL I want to use through the .NET DLL IMPORTER.
2. And the imported DLL was reflected in NVO on the Windows to be developed.
3. The initial setting value of the DLL was reflected in the Instance-
    Variables of the window to be developed.
4. And after writing the script in Windows, I ran it and an error came out.

Q1). In the DLL that received the IMPORT,
       all of the Function Lists were simply returned values without actual scripts.
       Should the developer write this part?
Q2). Are the local functions required for the DLL that received the IMPORT
       also included in the developer?

 

Attachments (5)
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Saturday, 19 September 2020 07:42 AM UTC
  2. PowerBuilder
  3. # 1

 Glad i could help, regards

Comment
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Friday, 18 September 2020 11:36 AM UTC
  2. PowerBuilder
  3. # 2

this is how you show the return types with autoscript: after you open a script (like the clicked script of the command button on the main window), you click on Design > Options:

After that, when you type 

inv_swing. (mind the "." at the end, and wait a while), you'll see something like this, just start typing "of_"

 

 

Comment
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Friday, 18 September 2020 11:23 AM UTC
  2. PowerBuilder
  3. # 3

Hi again,

I think I'm making things too complicated. Even though there are lots of incompatible funcions and attributes, lots of them are compatible:

Your real problem to start with is probably that you're calling some function before the nvo has been created. As I said before it's not a good idea to do the create in the Activate event, it's better to do in the open event (and assign it to an instance  nvo which you then use in other places).

I've changed the instance variable to NOT include the full path but a relative path, so the sample will work on your pc.

String is_assemblypath = ".\SwingLibrary.dll"

Your pdf manual explains the functions you can call on page 66 and further. Remember, that depending on the advanced option settings of the DLL Importer, the function names might have to be preceeded with "of_".

Use Autoscript in powerbuilder to see which function parameters and if you set it in the autoscript options, you can also see the return values.

I've added an example attached. At least it doesn't blow up, though of course I don't have the required hardware attached to some com port on my pc, so nothing will really work.

Hope it helps.

regards.

Attachments (1)
Comment
  1. Miguel Leeuwe
  2. Friday, 18 September 2020 11:30 AM UTC
Never be ashamed to ask questions.

I've been working with pb for a long time and ask dumb questions and give dumb answers all the time

:)

  1. Helpful
There are no comments made yet.
JANG JASON Accepted Answer Pending Moderation
  1. Friday, 18 September 2020 09:09 AM UTC
  2. PowerBuilder
  3. # 4

Dear, Miguel Leeuwe

Attach SwingLibrary.DLL.

This is Swing-U RFID Reader's dll.
The technical document is also attached.

Regards Miguel Leeuwe

Attachments (1)
Comment
  1. JANG JASON
  2. Saturday, 19 September 2020 06:20 AM UTC
Dear. Miguel Leeuwe



Thank you very much.

With your help, we have been able to go further.



My first question is that I was able to get help from a famous person like you,

Thank you very much.



My name is Jason and Jang from Korea.

I am working as a freelancer.



Please give me a lot of teaching and tips in the future.



It's still a long way to keep up with your abilities, but if there's anything I know

I will also be happy to help.



Again, thank you so much for your help.



regards, Miguel Leeuwe



E-MAIL : colormook@naver.com

Instagram : colormook_jason
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.