Hmmmm. Not an Perl OLE expert, but, it seems GetPrecursorInfoFromScanNum returns a Variant array of C structs, not an variant array of integers according to the manual. Every example in the manual is C/C++, zero VB. Is your
"Output:
$VAR1 = [
'414.005279541016',
'1.83302424514875e-307',
'3.50253979763967e-310',
'1.36817960845299e-312',
'2.68156223007842e+154',
even valid compared to Thermo's official viewer for the file?
I think you need to try to get perl OLE to return an array of string, the strings will be binary garbage but should be 8+8+4+4 bytes long, then do an "unpack('FFll',$arr[
$i]);" on it to decode the C struct. Try looking for Visual Basic code for your control and see how its done there.
typedef struct tagMS_PrecursorInfo {
double dMonoIsoMZ;
double dIsolationMZ;
long nChargeState;
long nScanNumber;
} MS_PrecursorInfo;
I pulled that from the IDL inside your control. Its described the same way in manual page for GetPrecursorInfoFromScanNum. Can you point me to a sample raw file for this control?
Edit, try changing "my $arr = Variant( VT_VARIANT | VT_BYREF);" to
" my $arr = Variant( VT_ARRAY | VT_BYREF);"
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.