System: How to use VARIANT as Parameter
I try to use cdo to send email, but the system plugin seem to not support very well.
!define NameSpace "http://schemas.microsoft.com/cdo/configuration"So I write a plugin to support it, and then successfully.
!define cdoSendUsingMethod "${NameSpace}/sendusing"
!define cdoSMTPServer "${NameSpace}/smtpserver"
!define cdoSMTPServerPort "${NameSpace}/smtpserverport"
!define cdoSMTPAuthenticate "${NameSpace}/smtpauthenticate"
!define cdoSendPassword "${NameSpace}/sendpassword"
!define cdoSendUserName "${NameSpace}/sendusername"
!define CLSID_Message {CD000001-8B95-11D1-82DB-00C04FB1625D}
!define IID_IMessage {CD000020-8B95-11D1-82DB-00C04FB1625D}
!define CLSID_Configuration {CD000002-8B95-11D1-82DB-00C04FB1625D}
!define IID_IConfiguration {CD000022-8B95-11D1-82DB-00C04FB1625D}
System::Call "ole32::CoCreateInstance(g'${CLSID_Message}',i0,i1,g'${IID_IMessage}',*i.r1)i.r0"
System::Call "$1->32(w'gfm688@163.com')" ;put_To
System::Call "$1->14(w'gfm688@qq.com')" ;put_From
System::Call "$1->30(w'SysMailTest')" ;put_Subject
System::Call "$1->34(w' ')" ;put_TextBody
System::Call "$1->54(w'$EXEPATH', w'', w'', *i.r2)" ;AddAttachment
System::Call "$2->2()" ;Release
System::Call "ole32::CoCreateInstance(g'${CLSID_Configuration}',i0,i1,g'${IID_IConfiguration}',*i.r2)i.r0"
System::Call "$2->7(*i.r3)" ;get_Fields
System::Call "*(&i2 8, &i2, &i2, &i2, w '${cdoSendUsingMethod}')i.r4" ;VARIANT struct
System::Call "$3->10(i r4, *i.r5)" ;get_Item ;here not support