Obtaining an activex COM interface from another COM interface

I have Animatics SmartMotors and am using their SMIEngine.dll, which is a COM dll. I'm having trouble with a particular interface called ISMICMotion. The help information for obtaining an instance of it is as follows:
The client application
can obtain an instance of this interface, using the available ISMIComm interface.  The following examples show how to obtain
this interface in Visual Basic and Visual C++. 
In these examples CommInterface is assumed to be the available ISMIComm
interface.
Visual
Basic:
Dim
CMotionInterface As ISMICMotion
      Set
CMotionInterface = CommInterface
Visual
C++:
    ISMICMotionPtr    CMotionInterface;
    HRESULT
hr=CommInterface.QueryInterface(__uuidof(ISMICMotion),&CMotionInterface);
    if
(FAILED(hr))
          AfxMessageBox("The interface
\"ISMICMotion\" not found!");
          return;
I can open a reference to the ISMICMotion interface using Automation Open but the operation of the methods from the ISMICMotion interface is dependent on the ISMIComm interface. So opening an independent reference doesn't work and the ISMIComm interface does not have anything like a GetISMICMotion reference method.
Is there any way to achieve in LabVIEW what the above code does?
It seems to me that I should be able to acquire proper dependencies using only the exposed methods. Is it because the makers of the SMIEngine.dll have not followed some COM rules?
thanks for you help,
Louis

Hi Adam,
The issue I had was with initializing the  ISMICMotion interface which is used for Contouring Mode, also called Coordinated Motion. I've attached a VI with two initialization examples. The first in green is the typical init I use to control motors with individual Motor RefNums. If you are not trying to do Coordinated Motion with the CMotion interface then you would use this init. The second in orange is the init routine I used to start Coordinated Motion. The key there is the Variant to Data VI. I don't remember exactly how it works in this case because it was a while back when I figured this out, but I remember finding relevant information in the Developer Zone on using the Variant to Data VI with Automation or ActiveX.
I hope this helps.
best regards,
Louis
Attachments:
Types of SmartMotor Initialization Routines.vi ‏80 KB

Similar Messages

  • How can i obtain an expired apple id from another user

    Thanks for looking ,
    I am trying to obtain a redundant / expired apple ID from the original user. I think it was originally an @mac ID .
    I am trying to obtain - [email protected] . when I send an e mail to this address I get a message back saying it is not reconised by the server so I guess it must be a dead account as such  but if I try to obtain it by setting up a new icloud account it is not available .
    Any thoughts or help welcome
    Martin

    You can't.
    Email addresses are not recycled (to avoid emails intended for the old account owner going to the new account owner), so there is no way to re-activate this address. Plus, Apple are only providing @icloud.com addresses now, so even if the original owner of the account decided to re-activate it by signing in with their password, they would only be able to use the @icloud.com address.

  • Hi, i am trying to open and view a report that comes from another server with different odbc connection

    hi, i am trying to open and view a report that comes from another server with different odbc connection
    i created a crystal report for a mysql database on my machine and everything works great
    but we have other reports that come from other machines with different odbc connection
    and this its not working when opens the report asks for credentials
    and i cannot use the remote ip for these reports that come from other machine
    question
    if i cannot connect to remote ip to open the report
    for each report i have to create a database the report database on my machine and then open the report ?
    or there is some other way to open the report ?
    i am using visual studio 2013 and mysql and
       <add key="MYSQLODBCDRIVER" value="{MySQL ODBC 5.3 UNICODE Driver}"/>
    thanks

    short
    i have a report that it was created on another server with a specific dsn
    now i am trying to open the report on my machine
    the database from the other server does not exist on my machine
    the server machine where the report was created the ip its not accessible
    question ?
    can i open the report on my machine or its impossible ?
    thanks

  • Safari problem:  when I switch back into safari from another application, the menu bar comes up but no tabs or windows.  What's going on?  Just started yesterday.  I have found a workaround: when I Command Tab back to safari, I hit command T to open a new

    Safari problem:  when I switch back into safari from another application, the menu bar comes up but no tabs or windows.  What's going on?  Just started yesterday.  I have found a workaround: when I Command Tab back to safari, I hit command T to open a new tab and Command W to close it, and my other tabs are visible.
    I have tried shutting down, closing tabs, with no success.  What's going on and how can I fix it?
    Thanks,
    Cindi B
    PS:  I'm not sure of the actual OS level, but I have not allowed it to upgrade to Maverick yet; concerned about it because of a few things I've read...

    A Safari extension or third party plugin may be causing the menu bar issue.
    From the Safari menu bar click Safari > Preferences then select the Extensions tab. Turn that OFF, quit and relaunch Safari to test. If that helped, turn one extension on then quit and relaunch Safari to test until you find the incompatible extension then click uninstall.
    If it's not an extensions issue, try troubleshooting third party plug-ins.
    Back to Safari > Preferences. This time select the Security tab. Deselect:  Allow plug-ins. Quit and relaunch Safari to test.
    If that made a difference, instructions for troubleshooting plugins here.
    As for which OS X is installed.
    Click the Apple () menu top left in your screen. From the drop down menu click About This Mac.
    The version is noted there.
    v10.6 Snow Leopard v10.7 Lion  v10.8 Mountain Lion
    It's your choice whether or not to upgrade to Mavericks. If you decide to do this, make sure your Mac meets the requirements noted here.

  • TS3804 "io6" I am unable to save a photo from another app (for example FACEBOOK)  to the Camera Roll.  I press & hold the photo, the window indicates "Save Photo" comes up, I press that option & the window goes away but the photo is not in Camera Roll.

    IPHONE 4 + "io6". I am unable to save a photo from another app (for example FACEBOOK)  to the Camera Roll.  I press & hold photo, window indicates "Save Photo" comes up, I press that option & the window goes away but the photo is not in Camera Roll. Please advice...

    Steve750717 did yu notice that the post is 6 months old?

  • Disable "This file comes from another computer"

    Hi, on all my adobe forms when i click on the properties, I see the message
       "This file came from another computer and might be blocked to help protect this computer"
     ever since i started getting this message, adobe forms don't work anymore and throws an error that the document properties have changed. I searched for a solution for this, but found many for fixing on Vista enterprise, but i run a vista home basic version. What do i need to do to resovle this issue that i can start using adobe forms again.
     any solution is highly appreciated.

    Describe the problem I am having in Detail. OK.
    IE10 will not download a file. END. Error given is, "bla bla bla file could not be downloaded."
    Wow...that tells me a lot??
    I have to agree with others here. I have also encountered this same issue today. Cannot even download a friggin PDF. Absolutely ridiculous. Stop with all this security crap, because all it does is slow down
    my workforce while they all try and figure out whats going on. We as users do not write this software, MS does. So why is it we the users have to jump through a zillion hoops to make your crap work. You (MS) should be doing this. 
    I used Chrome and guess what....it just works. Safari...just works......firefox../.just works.....MS IE whatever version never works right
    The ONLY reason I would still need IE, is if I need to get to some MS site where once again, MS has created the Monopoly situation where I can ONLY use IE to get to these sites. Utterly bogus. No wonder everyone is beginning to hate you.
    Another item is your new Compatibility view. Another nightmare to deal with. Managing my domain through various web interfaces, and I am always having to switch between modes depending on the application. Another huge waste of time.
    Think I'll be going the way of Russia, and completely remove any and all Windows systems from our environment forever. 
    MS HAS BECOME MY BIGGEST TIME WASTER AS I CONTINUALLY HAVE TO TROUBLESHOOT CRAP LIKE THIS.

  • How to conect to remote ActiveX (COM) program

    Hi everybody.
    I want to comunicate between LabView and another program by using ActiveX (COM).
    If both - LabView and the other program is at my local machine - everything is fine.
    I use the "Automation Open"-VI to open the ActiveX conection.
    The problem is that if the other program is located at another PC (inside network) the "automation Open" -VI returns an error.
    How can I get an ActiveX connection to the other PC?
    Thanks for help.
    Best regards.
    RonnyMessage Edited by rfriedr1 on 05-23-2005 10:00 AM

    I'm afraid it isn't quite that easy. From LV all you need to do is specify the machine name to get the remote access. However, in order for that to work, all of the COM stuff must be configured correctly for remote access (DCOM) and all the security settings must be done correctly. And if you are running XP SP2 or 2003 Server, there are additional steps to take because those OS's have tightened up security and thus have additional steps to get it to work.
    SUMMARY
    =======
    If you don't know much about COM or don't have access to a COM guru that created the COM component you are trying to use, you might want to think about creating a little LV app that runs on the remote box and then use LV networking to remotely access it. DCOM isn't impossible, but it isn't easy - especially if you don't have a good grounding in non-LV COM interfacing.
    DETAILS
    =======
    Is the COM object you are trying to access a home grown one or 3rd party? Are the two computers both in the same NT Domain or are they in Workgroup configuration? DCOM uses NT security and thus you typically need to have both computers in the same domain and using a domain credential for communication.
    I'm afraid I can't give you step by step instructions on how to do this (I haven't needed to use DCOM in about 6 years) - but there are a lot of resources out on the web and books like Don Box's "Essential COM" walk you through most of it. For example, here are some references to look at
    http://support.microsoft.com/kb/176799/EN-US/
    http://support.microsoft.com/kb/158508/EN-US/
    Oh, and this might be handy - ran across this while looking for links for you...
    http://support.microsoft.com/default.aspx?scid=kb;en-us;249726
    Brian Tyler
    http://detritus.blogs.com/lycangeek

  • Python ActiveX/COM - Which engine am I getting?

    Currently, I have TestStand calling some Python code to run some of our tests.  I'm wondering if it's possible to have the Python code manipulate variables from the running TestStand instance?  This post shows how to access the TestStand API from Python: http://forums.ni.com/t5/NI-TestStand/Exchange-data-with-TestStand-from-a-python-thread/m-p/1314571#M...
    Based on what I've read, it seems that when you get a handle on an ActiveX/COM Engine object, its not the same Engine as is currently running (that called the python script).  (see post 6 of this post: http://forums.ni.com/t5/NI-TestStand/using-C-as-User-Interface-in-TestStand/m-p/1404192#M31492).  
    If this is true, then the engine I get in Python isn't the engine I want.
    Can anybody confirm/deny?

    Ok. Probably the easiest way to pass a reference across processes is to use the TestStand synchronization step types and corresponding synchronization manager API. On the TestStand side, before launching your python process, create a queue or notification (using the corresponding synchronization step type), giving it a name that begins with an '*' character. Synchronization objects whose name begins with an '*' character are global per machine. Then before, launching your python app, either enqueue the reference you wish to pass to python or set the notification with such a reference. Then inside of your python code, create a new instance of the engine, and call GetSyncManager() on it with the name you used for your queue or notification. You also need to import the TestStand synchronization manager type library, which will then allow you to convert the sync manager reference to a SyncManager data type. Call GetQueue or GetNotification on it, then call the corresponding method on the queue or notification to dequeue or wait for the notification. You will need to create a destination object using the engine as follows: engine.NewPropertyObject(PropValType_Reference, false, "", 0). See the API help for teststand for more information.
    Hope this helps,
    -Doug

  • Latest CR for ActiveX/COM with royalty free run-time?

    What is the latest version of Crystal Reports that supports ActiveX/COM and does not have any run-time licensing royalties?  I am needing to migrate away from CR 8.5 using CRPE interface and cannot as yet leave ActiveX/COM architecture.  I will need to interface to databases such as SQLServer 2000/2005 and MS Access.

    Hi Joe,
    You should be able to upgrade to CR XI R2 which is still in support life cycle, but getting close to it's end of life. Download the trial version and then read the license readme file included.
    Samples are available above.
    Go to this link: http://www.sdn.sap.com/irj/boc and download the trial version of CR XI R2.
    Direct link to the Trial version: http://www.sap.com/solutions/sapbusinessobjects/sme/freetrials/index.epx
    Licensing changes from version to version and there may be other options now for you also. Call the Sales department and ask them what will fit your requirements.
    Thank you
    Don

  • Programmatically Insert ActiveX/COM Step Using LabVIEW

    Hi,
    I would like to be able to create sequences like the one attached, using LabVIEW.
    This sequence has only 2 steps, a LabVIEW VI call, and an ActiveX/COM Adapter Call.
    I have been able to do this using an adaptation of the code here: https://decibel.ni.com/content/docs/DOC-36337
    However, I am struggling to add the ActiveX/COM step.
    Any help would be gratefully received.
    Thanks,
    Dan
    CLD
    Solved!
    Go to Solution.
    Attachments:
    Valve Control - Test 1.seq ‏6 KB

    Obviously there is a way if you look for it
    Since you have an existing object of the "Step" class you can also get a "Module" object for it. Afterwards you have to specify that this is an ActiveX module. If you do not know that - probably you need to get it from the "Adapter" object somehow... Our case is simplier, so you just cast it to the ActiveX module and ... set some properties like ServerId, ActiveXReferenceExpr and so on.
    I have attached an example for you. Interesting thing is the ServerId - I have just read this chain from the TS for similar step and reused it here so don't ask me how to obtain it automatically
    You still have to fill your "Properties" like "file" - but I will graciously leave this job for you =
    Best Regards,
    CLA, CTD, CLED @ Test & Measurements Solutions Poland
    Attachments:
    ActiveX Step_2.vi ‏24 KB

  • How to get the entry point in the ActiveX/COM adaptor

    below is the description of the Demo of using the ActiveX/COM to call new seq . 
    API Demo
    1. Manually add a Message Popup step to the MainSequence of a
    new sequence file. Save the sequence file as launch.seq.
    2. Create another sequence file and save the file as caller.seq.
    3. In the MainSequence of the caller.seq file, add Action steps
    using the ActiveX/COM Adapter to call into the TestStand API and
    launch the launch.seq file in a new execution.You might need the
    following two methods to complete this step.
    . Engine.GetSequenceFileEx
    . Engine.NewExecution
    so the question as follows:
    1.i call the method of get sequencefileEx
    2. call the method of getmodlesequenceFile
    3.call the method of evalEntryPointNameExpression
    4.call the method of NewExecution.
    but at the step of 3. i haven't get the entry point.
    so how to solve this issue? thanks
    Attachments:
    QQ图片20140115200924.jpg ‏58 KB
    QQ图片20140115201708.jpg ‏100 KB

    This is a duplicate post of this:
    http://forums.ni.com/t5/NI-TestStand/How-to-get-the-entry-point-in-the-ActiveX-COM-adaptor/m-p/27005...

  • Step Type ActiveX/COM

    Hi!
    I want to know what is exactly ActiveX/COM step Type. I don't know what kind of program produce this type of step.
    Thanks
    Capblans

    Hi,
    You would use these step type to interface to the methods and properties of an activex/com object.
    Tpyically you would use this step type to interface with the TestStand API methods and properties. Also code generated using Visual Basic.
    There is a couple of articles (application notes) here that maybe helpful.
    Within the TestStand\examples folders and on the NI website are examples using the ActiveX/COM adapter
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • Comment utiliser le bouton grisé ? dans l'editeur ActiveX/COM?

    bonjour,
    je souhaiterais associer une aide à chacun de mes "steps" dans l'éditeur d'ActiveX/COM. Il y a un bouton "?" grisé et je veux le rendre actif.
    Comment créer le lien entre ce bouton, le fichier d'aide et ma "Method"?
    J'ai cherché sur le forum et j'ai trouvé un seul cas identique et sans réponse pour l'instant "Add Documentation to custom DLL-Teststeps".
    merci pour votre aide.
    P.F
    Solved!
    Go to Solution.

    I do not know French that well, but I know the answer to your question so hopefully someone can translate this for you if needed.
    Basically what you need to do is add a helpfile tag and helpcontext and/or helpstring tags to the library, methods, and interfaces in your COM object's type library. If you are using C++ and an .idl file it looks something like this:
    At the top of your idl file:
        uuid(LibraryGUID),
        version(1.0),
        helpstring("Help string"),
        helpfile("..\\Doc\\Help\\TSAPIRef.chm")
    library libraryName
    For each interface:
        [helpcontext(HlpIDConstant) ,helpstring(HelpString) ,
            uuid(InterfaceGUID),
            dual,
            pointer_default(unique)
        interface MyInterface : IDispatch
    For each method:
            [helpcontext(HlpIDConstant) ,helpstring(HelpString), id(642)] HRESULT                MyMethod();
     Hope this helps,
    -Doug
    Message Edited by dug9000 on 06-19-2009 11:49 AM

  • Creaing Message interface from another software component imported object

    Hi all,
      Will it be possible to creaing Message interface from another software component imported object like i need to create idoc Abstract interface in one software component by using the imported object from other software component
    regards,
    Dhil

    Hi,
    In thise case your SC2 Software Component is dependent on SC1.
    Go  to the SLD, go to the software component SC2 and you will have an option Dependency and as shown in michal's blog make this SC2 dependent on SC1.
    Next, reimport your Software Components SC1 and SC2 in your IR . The old objects will contnue to exists but still clear the SLD cache, and reimport the SC1 and SC2 from the SLD.
    Now in SC2 you will see a new option called BASIS objects under which you can see the message interfaces of SC1.
    Regards
    Bhavesh

  • Programmatically modify ActiveX/COM-step module settings

    Would like to modify programmatically ActiveX/COM-step module settings (Automation Server, Object reference, Object class, method/property, parameters-list).
    Can't find this in context. How this can be modified?
    Thanks!
    Solved!
    Go to Solution.

    Hey bestware,
    You need to get a reference to the step: RunState.Sequence.Main["MyActiveXStep"]
    Then you can use that to convert to the ActiveX module: RunState.Sequence.Main["MyActiveXStep"].Module.AsActiveXModule
    Once you have that you can do whatever you'd like with it.  You can read in the help more about this.  Search for ActiveXModule.
    You sould see all sorts of properties: MemberType, MemberName, ServerID, ActiveXReferenceExpr.  If you read about them they are refering to the different things you want to set.  For instance the ActiveXReferenceExpr is where you store the Object Reference.  The MemberType is Call Method (1), Get Property(2), Set Property(4) or Don't Call(-1), etc... 
    So to change the step to be a Get Property step I would do this:
    RunState.Sequence.Main["MyActiveXStep"].Module.AsActiveXModule.MemberType = 2
    To store an Object Reference to Locals.MyObj I would do this:
    RunState.Sequence.Main["MyActiveXStep"].Module.AsActiveXModule.ActiveXReferenceExpr = "Locals.MyObj"
    Hope this gets you pointed in the right direction. 
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~

Maybe you are looking for

  • Add number of years ?

    Hi, Suppose I am having date '28-feb-2007'. I want to add 1.9 years into this ? How can I do this ? thanks & regards pjp

  • Adobe Reader requires Internet Explorer 6 or higher

    I have attempted several times to install Adobe Reader X and keep getting this error. The computer runs Windows 7 and has Adobe Acrobat Standard 8 also installed. Any recommendations would be appreciated.

  • Different proofing languages for new mail & replies in Outlook 2010

    I have recently been upgraded to Windows 7 & Office 2010 at work.  My biggest frustration (currently) is the proofing language used by Outlook.  I have managed to set my proofing language to English (Canada) finally (for a while it insisted on German

  • MS SQL Server jdbc help

    I am trying to connect to a MS SQL Server 2000 db from my linux Mandrake10 box using SQuirreL. I have downloaded a tar file from MS's website, which I have untarred to produce 3 jar files: msbase.jar, mssqlserver.jar and msutil.jar. According to the

  • Issue with select query to fetch data using Join from two tabels

    Hello All- I want to fetch the ShowName as "SUN NIGHTLY NEWS" and EpisodeName as "091706" based on the condition a.TitleNo=b.TitleNo and a.seriesNo=b.TitleNo. If i use the only first condition-a.TitleNo=b.TitleNo than output is displayed as- SchedIte