'OpenEdge Progress not finding custom DLL

I'm having some issues while loading my custom DLL to OpenEdge Enviroment.

I've already copied my DLL to an PROPATH value and imported the DLL inside ProAsmRef.exe (The DLL is in the same folder as ProAsmRef and assemblies.xml)

The problem is, when I try to load my custom file inside a procedure, it sends me this current error:

**Unknown table name PCControl. (200)

I've already imported the DLL on my definition block with:

USING PCControl.*.

My DLL depends on another DLL (System.DirectoryServices.dll) but is already on assemblies.xml.

I can't figure it out why PCControl isn't importing, because I already have another two DLL's and they are working just fine...

Thanks for the help!

My DLL Code:

using System;
using System.DirectoryServices;
using System.Runtime.InteropServices;
using Microsoft.Office.Interop.Outlook;

namespace PCControl{

public class PCC{

public static string AzureLogin(string user, string password) {

        string status;

        try {
            DirectoryEntry entry = new DirectoryEntry("LDAP://AUTOEXPR.COM", user, password) {
                AuthenticationType = AuthenticationTypes.Secure,
                Username = user,
                Password = password
            };

            DirectorySearcher _searcher = new DirectorySearcher(entry);
            _searcher.Filter = "(objectclass=user)";
            SearchResult _sr = _searcher.FindOne();
            string? _name = _sr.Properties["displayname"][0].ToString();

            status = "SUCCESS - User " + user + " has logged in.";

        } catch (System.Exception e) {
            status = "ERROR - While logging in: " + e.ToString();

        }

        return status;
    }
}
}

My XML:

    <?xml version="1.0" encoding="utf-8"?>
<references xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <assembly name="ClassADT, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
  <assembly name="ClassOPC, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
  <assembly name="PCControl, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
  <assembly name="System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</references>

My login.p (resumed):

    &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE Login C-Win 
PROCEDURE Login :
/*------------------------------------------------------------------------------
  Purpose:     
  Parameters:  <none>
  Notes:       
------------------------------------------------------------------------------*/
 
    DEF VAR lSuccess AS CHAR NO-UNDO.
 
    lSuccess = PCControl.PCC:AzureLogin("arorap1", "12345").
 
    MESSAGE lSuccess
        VIEW-AS ALERT-BOX INFO
        TITLE "ok".
 
 
END PROCEDURE.
 
/* _UIB-CODE-BLOCK-END */
&ANALYZE-RESUME
 

This issue is not related to my code into DLL... I've added the function in my co-worker's DLL and it works perfectly:

USING ClassADT.*.

DEFINE VARIABLE LSuccess AS CHAR NO-UNDO.
    IF AVAIL usr_param AND usr_param.usr_ativo EQ TRUE THEN
        lSuccess = ClassADT.MyAdt:MyLogin(txtUser:SCREEN-VALUE, txtPassword:SCREEN-VALUE).
            


Solution 1:[1]

What happens when you use an intermediate class variable?

def var ologin as PCControl.PCC no-undo.

ologin = new PCcontrol.PCC().
ologin:AzureLogin( 'user', 'pass' ).

I think only OpenEdge static classes can be used directly as you are doing.

Solution 2:[2]

This formula indicates if the current row is the first instance:

=COUNTIF($A$1:A2,A2)=1

Put this formula in row 2 (assuming row 1 is header) and fill down.

The COUNTIF part counts all occurrences up until the current row, the addition =1 makes it a true/false statement.

This formula returns TRUE if it is the first instance or FALSE if it is duplicate.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Stefan Drissen
Solution 2 E_net4 - Mr Downvoter