1. mukul pandey
  2. PowerBuilder
  3. Tuesday, 27 February 2018 13:38 PM UTC

Hi Everyone,

I am using PowerBuilder 2017 R2  build 1756, classic application. I am trying to call a C# DLL in my application where i found an error message (Syntax error) when i call function name with class name. Please suggest what i do.

Function string FileParser.ParseFileName( string destFormatInput,  string destFormatInput2) library "PushmonFileParser.dll" ;

 

- Mukul

 

Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Thursday, 1 March 2018 10:18 AM UTC
  2. PowerBuilder
  3. # 1

If it is a non-visual DLL wrap it as a REST API and call it using the new HTTP client of PB 2017 R2.

Comment
There are no comments made yet.
Bruce Armstrong Accepted Answer Pending Moderation
  1. Tuesday, 27 February 2018 15:53 PM UTC
  2. PowerBuilder
  3. # 2

PowerBuilder calls C++ via RPCFUNC using __STDCALL, which doesn't allow class names, only function names.

https://docs.microsoft.com/en-us/cpp/cpp/stdcall

You can't call C# using using RPCFUNC.  You would either need to use a conditional code block and use it as a .Net assembly or expose it through a COM Callable Wrapper and call it via COM.

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