1. Gary Eden
  2. SnapDevelop
  3. Thursday, 7 October 2021 09:13 AM UTC

Hi,

 

I've developed a snap develop dll and tested the dll within snap develop by creating console application to call the dll. This all works fine so I know I'm on the right track. I then use the dll importer tool and import in to PB 2019 R3, all is well and I can see the functions that I want to call.

I run the application and call the functions and I receive the following - 'Error Text: Error calling external object function getportalusercore (System.DirectoryServices.AccountManagement is not supported on this platform.) at line 21 in function of_getportalusercore of object nvo_domainaccess'.

Target framework is .net core 3.1, system.directoryservices.accountmanagement is 4.7.0, this all works within Snap Develop and only errors within Powerbuilder what am I doing wrong or am I missing something.

 

Thanks

Gary

 

Gary Eden Accepted Answer Pending Moderation
  1. Tuesday, 12 October 2021 15:01 PM UTC
  2. SnapDevelop
  3. # 1

Hi,

 

Thanks for the speedy response. We took the System.DirectoryServices.AccountManagement.dll and tried to import that using the import tool, this showed the problems as generic/abstract/enum classes not supported.

We have now created a wrapper around this code and it seems to be working for us. 

 

Thanks for the advice.

Comment
  1. Armeen Mazda @Appeon
  2. Tuesday, 12 October 2021 18:02 PM UTC
Glad to hear your issue is resolved and thanks for sharing the info!
  1. Helpful
There are no comments made yet.
Mark Lee @Appeon Accepted Answer Pending Moderation
  1. Friday, 8 October 2021 04:53 AM UTC
  2. SnapDevelop
  3. # 2

Hi Gary,

 

Based on the error message, you can try Miguel's suggestion and see if it resolves the issue.

 

If it doesn't resolve the issue, I suggest that you change the target framework to .NET Core 3.0 or lower because PB currently only supports .NET Core up to 3.0.   BTW, the version of system.directoryservices.accountmanagement may not work either. You can refer to the following link for the detail:

https://docs.appeon.com/pb2021/application_techniques/ch05s01.html#d0e14495 


For any unsupported .NET features, I suggest that you refer to the chapter "Adding an adapter for unsupported features" in the following link to create an adapter (also known as "wrapper") that calls the target .NET assembly and then import the adapter only using .NET DLL Importer. You can refer to the following link for the detail:

https://docs.appeon.com/pb2021/application_techniques/ch05s01.html#d0e15092 

 

Regards,

Comment
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Friday, 8 October 2021 01:09 AM UTC
  2. SnapDevelop
  3. # 3

Have you used the (advanced) options when using the import dll tool? There are some options which will generate all the code to auto instantiate your DLL.

Check you instance variables, one of them holds the path to the DLL. Make sure that path is available when you run the app.

Is your DLL 32 or 64 bit (or "any cpu")? If you run a 32 bit executable or from the PB IDE, it has to be 32 bit (or at least not 64).

Can you make a small sample DLL for us to try it out?

regards.

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