Chilkat: $oImap.ListMailboxes - return "Null object"

0

I try to use IMAP object from Chilkat AcitveX component.

$oImap.Login($sImapUserName, $sImapPassword)
ConsoleWrite(@ScriptLineNumber & ' LOGIN: ' &$oImap.LastErrorText & @CRLF)  

Returns:

  Login:
    DllDate: Sep 28 2020
    ChilkatVersion: 9.5.0.84
    UnlockPrefix: ******************
    Architecture: Little Endian; 32-bit
    Language: ActiveX
    VerboseLogging: 0
    loginX:
      greeting: * OK [CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE LITERAL+ STARTTLS AUTH=PLAIN AUTH=LOGIN] Dovecot (Debian) ready.

      authenticateLogin:
        loginImap:
          ConnectionType: Unencrypted TCP/IP
        --loginImap
        isOK:
          serverResponse: aaab OK [CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT MULTIAPPEND URL-PARTIAL CATENATE UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS BINARY MOVE SNIPPET=FUZZY LITERAL+ NOTIFY SPECIAL-USE QUOTA] Logged in
        --isOK
      --authenticateLogin
    --loginX
    Success.
  --Login

I use this snippet:

Local $s_refName = ''
Local $s_wildcardedMailbox = '*'
Local $oMBoxes = $oImap.ListMailboxes($s_refName, $s_wildcardedMailbox)
ConsoleWrite(@ScriptLineNumber & ' ' &$oImap.LastErrorText & @CRLF)

Returns:

  ListMailboxes:
    DllDate: Sep 28 2020
    ChilkatVersion: 9.5.0.84
    UnlockPrefix: *****
    Architecture: Little Endian; 32-bit
    Language: ActiveX
    VerboseLogging: 0
    listMailboxes:
      bSubscribedOnly: 0
      reference: 
      mailbox: *
      Escaping quotes and backslashes in mailbox name...
      utf7EncodedMailboxPath: *
      isOK:
        serverResponse: aaac OK List completed (0.016 + 0.000 + 0.015 secs).
      --isOK
      Success.
    --listMailboxes
    Success.
  --ListMailboxes

Problem description: I try to get Listboxes collection object but I do not get properly collections of objects. If I check it like this:

ConsoleWrite('! ' & IsObj($oMBoxes) & @CRLF)

RESULT: ! 0

ConsoleWrite('! ' & VarGetType($oMBoxes) & @CRLF)

RESULT: ! Object

ConsoleWrite('! ' & $oMBoxes.Count)

RESULT: from COM Error Handler I get:

err.number is:      0x00000004
err.windescription: NULL Pointer assignment

eventually using diffrent version of AutoIt I get:

err.number is:      0x00000003
err.windescription: Object Invoke failed

Question: Any idea of the cause of the problem?

autoit
chilkat-email
asked on Stack Overflow Jan 11, 2021 by Michał Lipok • edited Jan 12, 2021 by Michał Lipok

1 Answer

0

Registering object by using:

regsvr32 ChilkatAx-9.5.0-win32.dll

Fix this issue.

answered on Stack Overflow Jan 17, 2021 by Michał Lipok

User contributions licensed under CC BY-SA 3.0