Greetings Monks. I am trying to use a windoze COM object to do some statistical analysis. The docs (which describe how to do things in C++ or Java, I'm not sure which) say I should create a new instance of the object. I do this like so
$comobj = Win32::OLE->new("STATANPKG\.FDG3");
and the debugger indicates that I've got a valid instance of the object. So far so good. Now I am supposed to initialize the object with a keyphrase. When I try to do it like this
$comobj->Init('the quick brown fox');
It doesn't work (yes, I've insured it's the correct keyphrase). The docs say the method is supposed to be ivoked using the following call
void FDG3::Init(const wchar_t *keyphrase) //throw (Exception)
So I'm wondering if maybe wchar_t specifies some kind of strange windoze string format that does not match a single-quoted string in Perl, and that's why the call isn't working. Does anyone know what this format specifies and how I convert to that?

Many thanks....

Steve


In reply to Initializing a COM object by cormanaz

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!
  • 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:
    & &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.