1. selvam G
  2. PowerBuilder
  3. Thursday, 25 October 2018 14:36 PM UTC

Hi Appeon Team,

PB2017R2 64 bit application

Calling Third party c++ dll as external function

c++ dll calling convention is cdecl

Can able to call three functions without any issue of the same dll.

Calling fourth function

int getid (const char* parm1, const char* parm2, int* parm3)

Parm3 is out parm

all three parameters passing as reference.

of the same dll, application crashes due to PBVM.dll

I have copied PBVM.dll into Application folder, still same error.

Any help please.

Thanks

Selvam

selvam G Accepted Answer Pending Moderation
  1. Thursday, 25 October 2018 17:11 PM UTC
  2. PowerBuilder
  3. # 1

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 25 October 2018 15:15 PM UTC
  2. PowerBuilder
  3. # 2

Hi Selvam;

  If you are going to compile your PB Apps(s) as 64but EXE's, then you you will need to make sure that you use the 64bit 3rd party DLL(s) from the vendor in question.

  Also, it might be an issue of byte alignment as well. You may need to declare that in your external function declarations:

FUNCTION int STLAREGIO ( ref struc_kfzrechnerneu struc_kfz ) LIBRARY "KFZ_SS.DLL" alias for "STLAREGIO;Ansi" progma_pack(1)

progma_pack(1) is 1-byte align, progma_pack(8) is 8-bytes align. In this way, the effect is only for external function that is declared with this alignment.

   Hopefully, you have some vendor documentation to help you along.

HTH

Regards ... Chris

 

Comment
  1. Chris Pollach @Appeon
  2. Thursday, 25 October 2018 17:16 PM UTC
If you can send in a copy of the 3rd party DLL along with a simple PB test App - it might be worth while opening a Support Ticket on this issue.
  1. Helpful
  1. selvam G
  2. Thursday, 25 October 2018 17:42 PM UTC
Ok will check with my manager to do that.

When I vendor to make it stdcall calling convention.But they are saying since 3 other functions and that will not solve my issue.I kind of agree with them.

Do you think stdcall will make a difference for this issue.

Thanks

Selvam
  1. Helpful
  1. selvam G
  2. Wednesday, 31 October 2018 15:09 PM UTC
we have opened a ticket yesterday.

Thanks

Selvam
  1. Helpful
There are no comments made yet.
selvam G Accepted Answer Pending Moderation
  1. Thursday, 25 October 2018 15:03 PM UTC
  2. PowerBuilder
  3. # 3

This is only a prototype, app is calling only Dll, no DB connection.

All are 64 bit environment client server Application, DLL and Win7.

cdecl calling convention of c++ dll, will this be an issue?

At the same time other three functions work with the same dll.

Thoughts?

Thanks

Selvam

Comment
  1. selvam G
  2. Tuesday, 30 October 2018 18:28 PM UTC
Now I got the vendor to modify c++ dll with stdcall calling conventions, but still we are getting application crash as PBVM170.dll access violation writing location error.

Any thoughts

Thanks

Selvam
  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.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.