Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
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);"

In reply to Re: Getting mixed real and integer data out of Win32::OLE Safearray by patcat88
in thread Getting mixed real and integer data out of Win32::OLE Safearray by Halligan

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • 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, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others having an uproarious good time at the Monastery: (6)
    As of 2014-07-11 04:49 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      When choosing user names for websites, I prefer to use:








      Results (218 votes), past polls