Steve, thanks a million! It's always nice to share the burden with someone 'in the know'. Would you recommend using the dispids from the IDL file or should I implement the GetIDsOfNames in my IDispatch? I'd presume Flash would be using the predefined IDs in the invoke calls rather than asking for the ids I've chosen myself, afterall it's Flash's interface I'm playing with. And one final note, is everyone using VB and .NET to do this? Is the C++ implementation a well kept secret or what? I thought this would be something a lot of people had done before and still Google was unable to give me anything else than this same question asked over and over again. If someone is looking for an idea for an article here, this could be it; communicating with Flash using SetVariable and catching the FSCommand event. Quite trivial to implement, yet causing confusion among many developers.
gialli
Posts
-
ConnectionPoint and IDL -
ConnectionPoint and IDLSorry for the stream of consciousness, I used the OLEVIEW to generate the IDL for Macromedia Flash control and after using MIDL to generate the header, it contains only the IDispatch interface. As I'm an ATL/COM newbie, I just wanted to get this right in the first place, I can add the methods to the generated class and then base my sink on that, but I have a feeling this isn't the right way to do it. I'll probably add the dispids for the Flash events as constants and test with a IDispatch, still I want to know whether this is expected behaviour when compiling an IDL file.
-
ConnectionPoint and IDLHi everyone, I hope there's someone out there, who can help me with my problem, I've asked about this in the COM forum, but no one knows or cares to reply. I have an ATL control, which should communicate with Macromedia's Flash control. I generated the IDL file and the event interface (based on IDispatch) has a few custom methods in it. When I use MIDL these custom methods nor the dispids are present in the .h file. Is this correct behaviour? I could ofcourse add the methods to the interface and then base my event sink on that or am I supposed to do it with the IDispatch and thus responding to those methods when invoke is called? .NET and VB provide actions for these events directly, but I need to use ATL for the task and would really like to understand the internals, rather than pick the quick and easy way out. Even links to c++ sourcecode interfacing with Flash would help me out. Thanks in advance!
-
embedding activex control in outlook mail messageJust create a mail message in html, if you want to send the control with the message, you need to create a multipart message, where the html message is one part and the control itself the second. You can also reference other servers from your html code, thus the control can be placed on a server the client has access to. Please note that some, if not most, users have disabled running activex controls inside Outlook.
-
Problem with MIDL and Flash IDLI used the Object Viewer tool to generate the IDL file for Shocwave Flash control, it appears to be ok. However, when I use MIDL to generate the header file, the methods in the IShockwaveFlashEvents interface are not generated, even if they are present in the IDL file itself. Is this standard behaviour or am I just stuck with an amateur mistake? I can generate my sink class based on the information found in the IDL, but I'd rather use MIDL for the task as I'll be interfacing with other controls in the future and want to learn the ins and outs of Visual Studio.NET. The event interface is in fact based on IDispatch (i.e. dispinterface), is this the reason the methods are hidden from the generated header file? So, even if the methods are present in the IDL along with their disp ids, they won't be automatically included, but force the developer to query for the methods to find the disp ids. Then again, should my event sink be based on IDispatch as well or should I manually copy the declarations to form the vtable as defined in the IDL? Please take the time and guide a COM/ATL newbie to a solution. Thanks!
-
Scriptable ActiveX and javascriptThanks to nice articles on the site I was able to get my COM project going nicely. I decided to do this without ATL/MFC as my needs are quite basic and I really want to understand what I'm doing. I'm not saying ATL/MFC are bad, I've worked with MFC for years so this really isn't about what's good and what's bad, I just chose this approach and try to live with my decision. Enough of introduction, here's the problem. Being new to COM, I'm having some problems in adding support for every interface required by Internet Explorer to use it. IDispatch and invoke seem to work nicely, but do I need something more? Do I need to mark the component safe for scripting if I sign the code? Also, I need some interoperability with another ActiveX component, namely Macromedia Flash. I'd be happy to handle this via javascript functions, but how do I retrieve the scripting host and is there a solution which would work on other browsers than IE?