×

Loading...

Topic

This topic has been archived. It cannot be replied.
  • 工作学习 / IT技术讨论 / help!!! about VARIANT. Thanks in advance.
    I defined a VARIANT variable. I passed it as a parameter into a function and this function will modify this variable and store an array in this variable. But I got error messages said " unhandled exception in **.exe(KERNAL32.dll), 0x********* ". anybody who familiar with COM/OLE, please help me.
    • use wrapper class to deal with VARIANT.
      • Thanks.
        • use _variant_t or CComVariant. In fact, they are smart pointers.
          • I have create a class of my own to use VARIANT to store an array of data in it. It seems that CComVariant doesn't support array.
          • By the way, how can COM servers send message to each other? I mean, If some events happens in COM server A, how could an another Component( Application) know that?
            • the easiest way is to use Connection Points. Choose this check box in the Attributes pane when you insert an ATL object.
              • Can I know you phone number? I have a hard nut to crack here.
      • Daniel, Thank you very much. I have solved the problem.