1. Milton Jiménez
  2. PowerBuilder
  3. Thursday, 1 June 2023 19:27 PM UTC

hi Friends,

I am using SnapDevelop 2021 to create Class Library (.net Standar)
But when I'm importing(dll in importer dll option) comes empty without methods this is the class:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Runtime.InteropServices;
using CajaPOSDF;

namespace CajaPOSDF
{
[ComVisible(true)]
[ProgId("CPOS.CPOS")]
[ClassInterface(ClassInterfaceType.AutoDual)]
public class CPOS
{
CajaPOSDF.POS pc;
public CPOS()
{
pc = new CajaPOSDF.POS();
pc.ConfigurarConexion("COM1", 9600, 8, true);
}
}

}

any help is welcome

Thanks 

 

Bruce Armstrong Accepted Answer Pending Moderation
  1. Friday, 2 June 2023 17:28 PM UTC
  2. PowerBuilder
  3. # 1

What Francisco said.  Also, you don't need this stuff.

[ComVisible(true)]
[ProgId("CPOS.CPOS")]
[ClassInterface(ClassInterfaceType.AutoDual)]

AFAIK, the .Net Importer doesn't use COM callable wrappers, which is what those declarations are used for.

Comment
  1. Bruce Armstrong
  2. Friday, 2 June 2023 17:32 PM UTC
You might also check out the sample I did for a presentation on the .Net Importer in a prior Elevate conference, and see how I wrote the C# classes (in SnapDevelop).



https://community.appeon.com/index.php/codeexchange/powerbuilder/256-net-importer-demo
  1. Helpful 1
There are no comments made yet.
Francisco Martinez @Appeon Accepted Answer Pending Moderation
  1. Thursday, 1 June 2023 19:43 PM UTC
  2. PowerBuilder
  3. # 2

Hi Milton, I would recommend you format your code sample so that it's more legible, it's a little bit hard to understand. See here on how to do that.

>dll in importer dll option

Do you mean the .NET DLL Importer?

By what I can read, the class you demonstrate does not contain any methods, only the class constructor. So it makes sense that you're not seeing any methods.

Regards,
Francisco

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.