I am trying to control a Matlab COM server object from perl but am running into some problems. When I try to create the server object using the following code:
$matlab = Win32::OLE->new('Matlab.Application') or die "Oops\n";
I get the error message: Win32::OLE(0.1008) error 0x80040111: "ClassFactory cannot supply requested class" Now the interesting thing is that if I try to launch Word I can create the COM object successfully. Also, I am pretty sure that when I tried a week ago I was able to also create the matlab COM server object successfully at least once. In OLE/COM Object Viewer I also get a similar error when I try to create an instance of matlab: CoGetClassObject failed. I tried reinstalling matlab multiple time to no avail. I looked at the registry entries and it seems like the registry keys that would be required to locate the matlab server are all there. What makes is stranger is that I was just able to create a matlab server object from C++ code. Any help would be greatly appreciated. Rich

In reply to Strange OLE ClassFactory cannnot supply requested class error by richz

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.