SleepingMonk has asked for the wisdom of the Perl Monks concerning the following question:
This variant is needed as i call another program, that i use to communicate with the parallel port (program is called v2wReg, and i think it is exclusive to the company i am doing a summer placement for, but could be mistaken), and in its documentation it dictates that i MUST pass a variant into it in order to read from the register the parallel port is connected to. The documentation looks like this -:my $registerIndex = Win32::OLE::Variant::Variant(Win32::OLE::Variant:: +VT_I2|Win32::OLE::Variant::VT_BYREF,0);
Thus indicating which variables go where. I know that the first two variant variables will return 1 byte and the autoincrment variant will return 1 bit. No matter what i pass into the function ReadRegisterNoWrite i get no return (i.e. nothing happens to the variables that i pass in) and the same error (only with 'use warnings;' in my code though) of:VARIANT ReadRegisterNoWrite( LONG nDevLocation,VARIANT* nIndex,VARIANT +* nValue,VARIANT* bAutoIncrement);
I am totally stumped as to how to avoid this error and get a good reaading from the register so any light anyone one of you monkees could spread onto this problem would be much appreciated. cheers. The SleepingMonk p.s. if it helps any I am using i2c to talk to the register at the parallel port. (v2wReg is a program that allows perl to communicate with i2c devices)Win32::OLE(0.1501) error 0x80020005: "Type mismatch" in METHOD/PROPERT +YGET "ReadRegister" argument 3 at trial.pm line 49
update (broquaint): added <code> tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: WIN32::OLE::VARIANT --- the destroyer of souls ???
by RMGir (Prior) on Jul 16, 2003 at 13:06 UTC | |
by SleepingMonk (Novice) on Jul 16, 2003 at 15:17 UTC | |
by RMGir (Prior) on Jul 17, 2003 at 11:31 UTC |