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



我尝试使用Chilkat AcitveX组件中的IMAP对象。

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

退货:

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

我使用这个片段:

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

退货:

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

问题描述:我试图获取Listboxes集合对象,但没有获得正确的对象集合。如果我这样检查:

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

结果:!0

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

结果:!对象

ConsoleWrite('! ' & $oMBoxes.Count)

结果:从COM错误处理程序我得到:

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

最终使用不同版本的AutoIt我得到:

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

问题:知道问题的原因吗?

使用注册对象

regsvr32 ChilkatAx-9.5.0-win32.dll

修复此问题。

相关内容

  • 没有找到相关文章

最新更新