Unfortunately these posts made also clear that:
So my question still remains: how to use my ActiveX dll's?There's no way to view the Interface definitions for now.
See previous post.
Code: Select all
; Test createobject with ChilkatMailMan
Interface IMailMan
UnlockComponent()
get_Version()
Release()
EndInterface
CoInitialize_(0)
If CoCreateInstance_(?CLSID_ChilkatMailMan,0,1,?IID_IChilkatMailMan,@pobj.IMailMan)=0
MessageRequester("PureBasic - ChilkatMailMan", "Enjoy the full object oriented experience")
pobj\UnlockComponent(UNLOCK_CODE)
pobj\Release()
Else
MessageRequester("Warning:","Couldn't init ChilkatMailMan",0)
EndIf
;CoUninitialize()
End
DataSection
CLSID_ChilkatMailMan:
Data.l $A46E5261
Data.w $C356,$4767
Data.b $88,$CA,$DF,$CE,$D0,$50,$D0,$9E
IID_IChilkatMailMan:
Data.l $CCB7FB40
Data.w $F4EC,$4678
Data.b $92,$02,$52,$79,$8D,$A7,$8A,$BA
UNLOCK_CODE:
Data.s "22540B8F792140"
EndDataSection
Code: Select all
-------------------
In CMailMan.h
-------------------
class CMailMan : public ChilkatComponent
{
public:
CMailMan(void) { }
virtual ~CMailMan(void) { }
static CMailMan *Create(void);
// Pass any interface, such as IUnknown, IChilkatMailMan2, or older interface versions.
static CMailMan *Create(void *iface);
[....]
virtual bool UnlockComponent(const char *code) = 0;
virtual char *get_Version() = 0;
[....]
};
-------------------
In main.cpp:
-------------------
#include <windows.h>
#include "../../../Include/CMailMan.h"
#include "../../../Include/CEmail.h"
#include "../../../Include/CEmailBundle.h"
#include "../loginInfo.h"
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
::CoInitialize(0);
CMailMan *mailman = CMailMan::Create();
mailman->UnlockComponent(UNLOCK_CODE);
[.....]
delete mailman;
::CoUninitialize();
return 0;
}
-------------------
In logInfo.h:
-------------------
#define UNLOCK_CODE "22540B8F792140"
Code: Select all
; Test createobject with ChilkatMailMan
Interface IChilkatMailMan
QueryInterface()
AddRef()
Release()
; GetTypeInfoCount()
; GetTypeInfo()
; GetIDsOfNames()
; Invoke()
get_SmtpHost()
put_SmtpHost()
SendEmail()
SendBundle()
get_MailHost()
put_MailHost()
get_PopUsername()
put_PopUsername()
get_PopPassword()
put_PopPassword()
get_SmtpPort()
put_SmtpPort()
get_MailPort()
put_MailPort()
get_MaxCount()
put_MaxCount()
get_SizeLimit()
put_SizeLimit()
CopyMail()
TransferMail()
get_DefaultLanguage()
put_DefaultLanguage()
CheckMail()
get_DefaultCharset()
put_DefaultCharset()
get_PreferIsoCharset()
put_PreferIsoCharset()
get_PreferMicrosoftCharset()
put_PreferMicrosoftCharset()
get_PreferMacCharset()
put_PreferMacCharset()
StartMailWatch()
StopMailWatch()
UnlockComponent(a.l)
get_Version()
QuickSend()
LoadMbx()
LoadOutlookFolder()
get_Filter()
put_Filter()
LoadXmlFile()
LoadXmlString()
SendViaOutlook()
get_SmtpUsername()
put_SmtpUsername()
get_SmtpPassword()
put_SmtpPassword()
ImportCertificates()
get_LogMailSentFilename()
put_LogMailSentFilename()
get_LogMailReceivedFilename()
put_LogMailReceivedFilename()
GetAllHeaders()
DeleteEmail()
GetHeaders()
GetFullEmail()
DeleteBundle()
DeleteMultiple()
FetchEmail()
FetchMultiple()
VerifyPopConnection()
VerifyPopLogin()
VerifySmtpConnection()
VerifySmtpLogin()
get_SmtpLoginDomain()
put_SmtpLoginDomain()
get_OutlookContactsFolder()
put_OutlookContactsFolder()
get_AutoAddContacts()
put_AutoAddContacts()
get_SmtpAuthMethod()
put_SmtpAuthMethod()
get_SendIndividual()
put_SendIndividual()
Unused1()
LoadMime()
get_AutoSaveCerts()
put_AutoSaveCerts()
GetUidls()
SaveXmlLog()
LoadEml()
DeleteByUidl()
GetBadEmailAddresses()
ClearBadEmailAddresses()
FetchMultipleHeaders()
get_ReadTimeout()
put_ReadTimeout()
SendQ()
get_ResetDateOnLoad()
put_ResetDateOnLoad()
SendCGI()
EndInterface
CoInitialize_(0)
If CoCreateInstance_(?CLSID_ChilkatMailMan,0,1,?IID_IChilkatMailMan,@pobj.IChilkatMailMan)=0
MessageRequester("PureBasic - ChilkatMailMan", "Enjoy the full object oriented experience")
pobj\UnlockComponent(?UNLOCK_CODE)
pobj\Release()
Else
MessageRequester("Warning:","Couldn't init ChilkatMailMan",0)
EndIf
;CoUninitialize()
End
DataSection
CLSID_ChilkatMailMan:
Data.l $A46E5261
Data.w $C356,$4767
Data.b $88,$CA,$DF,$CE,$D0,$50,$D0,$9E
IID_IChilkatMailMan:
Data.l $CCB7FB40
Data.w $F4EC,$4678
Data.b $92,$02,$52,$79,$8D,$A7,$8A,$BA
UNLOCK_CODE:
Data.s "22540B8F792140"
EndDataSection