Hi Everyone,
I want to communicate with COM, that is the following:
coclass CJob {
interface IJob;
interface ISourceCollection;
};
by Win32::OLE like
$job = Win32::OLE-new ('SyncService.Job.1') || die Unable to create job.\n;
if (Win32::OLE-LastError != 0) {
print Unable to new a
On Sat, 06 May 2006, Like Ma wrote:
I want to communicate with COM, that is the following:
coclass CJob {
interface IJob;
interface ISourceCollection;
};
by Win32::OLE like
$job = Win32::OLE-new ('SyncService.Job.1') || die Unable to create job.\n;
if (Win32::OLE-LastError != 0) {
Hi Jan,
I am sure that it does. I can call the methods of IJob, but I can't
call any method of ISourceCollection. Is there a method in Win32::OLE
like QueryInterface in C++ ?
Thanks,
Like
On 5/7/06, Jan Dubois [EMAIL PROTECTED] wrote:
On Sat, 06 May 2006, Like Ma wrote:
I want to
Sure.
if (ref ($sentdate) eq 'Win32::OLE::Variant') {
# something with $sentdate-Date
} else {
# assume $sentdate is a string.
}
There might be something more efficient one can do with SUPER
or AUTOLOAD or something. I've never had the time to figure it
out though.
- Original
if (ref ($sentdate) eq 'Win32::OLE::Variant') {
# something with $sentdate-Date
} else {
# assume $sentdate is a string.
}
Best practice is to use UNIVERSAL::isa() :
if (UNIVERSAL::isa($sentdate, 'Win32::OLE::Variant')) {
}
else {
}
Tested with:
perl -MWin32::OLE::Variant