Creating Application; activate ActiveX but get E_NOINTERFACE in C++

Hello

I have a problem I hope that easy to solve by using smart pointers in C++ (VS2008).  So here goes...

I'm building an application Labview (MyExample.exe) around my virtual instrument (MyExample.VI); and activate ActiveX with the name of the server 'MyExample '. I have run MyExample.exe to register the complete IID. In my code, I do the following...

#import "d:\mypath\myexample.tlb" / / to access the file standard TLB (same as make #import 'd:\program files\nationalinstruments\labview\...\labview.tlb'

MyExample::_ApplicationPtr m_pMyLabviewApp;

MyExample::VirtualInstrumentPtr m_MyLabviewVI;

HRESULT hr;

HR = CoInitialize (NULL);

blah blah

HR = this-> m_pMyLabviewApp.CreateInstance ("MyExample.Application"); or avec.7 for more details of version!

My application loads and starts... However hr always returns E_NOINTERFACE and m_pMyLabviewApp of smart pointer is always null.

However if I do the same code but replace MyExample with LabVIEW and then it works perfectly. If I load 'MyExample.Application' in Labview using ActiveX vi It also works perfectly. Even if I use the Automation commands in Matlab.

My hope is that it is something trivial and dumb with smart pointers... advice?

Thank you

OKAY to dig into the code a bit more... the CreateInstance call a different number of 'CreateInstances'... but the critical little comip.h...

line 623...

If (dwClsContext & (CLSCTX_LOCAL_SERVER |)) CLSCTX_REMOTE_SERVER)) {}
IUnknown * pIUnknown;
HR = CoCreateInstance (rclsid, sulkily, dwClsContext, __uuidof (IUnknown),reinterpret_cast (& pIUnknown));

If (SUCCEEDED)
HR = OleRun (pIUnknown);

If (SUCCEEDED)
HR = pIUnknown-> QueryInterface (GetIID (),reinterpret_cast (& m_pInterface));
}

pIUnknown-> Release();
}
}

The GetIID() function returns no matter if I call to MyExample::_ApplicationPtr or LabVIEW::_ApplicationPtr - therefore the Interface of interrogation will be obviously wrong. Now it is a bug in my header string (I'll have to check all the .h and .cpp files) or there's something else strange with import the .tlb file.

Or I'm dumb and need to use LabVIEW::_Application even with MyExample.

Tags: NI Software

Similar Questions

  • I am trying to create a VPN connection, but when I get to the step that allows me to create the VPN, the radial buttons are greyed out.

    I am trying to create a VPN connection, but when I get to the step that allows me to create the VPN, the radial buttons are grayed out, it is a Windows component is missing and does not allow me to create VPN. I am running Windows XP Home addition. I recently got a Malware attack and had the quarantine and fix trojen attempts. After the restoration, I found that my previous VPN connection was broken. When I tried to add a new connection, I'm stuck on the screen connection virtual network in the the radial button private network connection wizard is grayed out, he could not check.

    Hello

    Your Windows XP question is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for the IT Pro TechNet public. Please post your question in the Windows XP TechNet forum. You can follow the link to your question:

    http://social.technet.Microsoft.com/forums/en/itproxpsp/threads

  • The message I get is Microsoft word has not been installed for the current user. Please run set up to install the application. I reinstalled the software, but get the same message.

    The message I get is Microsoft word has not been installed for the current user.   Please run set up to install the application.   I reinstalled the software, but get the same message.

    Hello

    See the methods listed in the articles below and check.
    You receive an error "Microsoft has not been installed for the current user" message when you try to start an Office 2003 program or an Office XP program for the first time
    http://support.Microsoft.com/kb/898512
     
    You receive a message "Microsoft has not been installed for the current user" when you start an Office XP program or start of Microsoft Office Maintenance mode
    http://support.Microsoft.com/kb/298022

    I hope this helps.

    Thank you, and in what concerns:
    Shekhar S - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.
    If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • Try to activate Vista's problem reports, but get the message "Windows incident reports are disabled." and some settings are managed by your system administrator

    Original title: trying to activate the Vist problem reports, but get message "Windows problem reports are disabled."

    "Windows problem report is disabled." I can't activate the problem reports and Solutions on my Windows Vista computer.  When I click on "Change settings", I would be prompted with the following message if poster "some settings are managed by your system administrator."  It's personal PC at home.  I don't know how to activate it.  I already went to political group & register to adjust some settings.  But still unable to activate this.

    All settings are disabled as this.

    This problem only recently.

    Method 1

    System Restore does not work.

    Method 2

    Disable the antivirus software does not work.

    But after some research, I realized that the problem could be due to a recent installation of a PC anti-frustration software called Soluto (the star was "Activate Crash Handler Soluto").  It worked after that.  After uninstalling, I rebooted the PC system.  After the reboot, I checked the reports on the problems and Solutions and found I could now adjust advanced settings.  I have also reinstalled the software, Soluto and ensured that this time, "activate Crash Handler Soluto" not was not checked (i.e. enabled).

  • When I select this option I get the dialog box 'Create image s system' but it cannot find any 'backup devices on this computer"and lists the error 0 x 81000036

    Error image system original title: windows 7 0 x 81000036

    I'm doing a backup system image.  When I select this option I get the dialog box 'Create image s system' but it cannot find any 'backup devices on this computer"and lists the error 0 x 81000036.

    I have an ESATA connection on my Dell laptop I was trying to make the image on.  I use the unit every day to save files and which works very well.  He just leaves me CCADE with the system image backup...

    any ideas?

    Hello

    ·         You have created a system image backup before that?

    ·         You did it changes on your computer?

    ·         Is your esata formatted NTFS drive?

    Try to save the image of the boot system: http://support.microsoft.com/kb/929135

    Note: make sure that you start the computer in normal mode after a repair.

    See also the linkfor more information about the backup: http://windows.microsoft.com/en-US/windows7/Back-up-your-programs-system-settings-and-files

  • Bought Office Acrobat 11 DC Pro to my PC running Windows 7 - I have more than enough RAM and storage, but get the message: "this application cannot be installed on this operating system. The installation program will end now. Please refer to the minimum s

    Bought Office Acrobat 11 DC Pro to my PC running Windows 7 - I have more than enough RAM and storage, but get the message: "this application cannot be installed on this operating system. The installation program will end now. Please refer to the minimum requirements to... "Can't determine the location on the Adobe Web site to get answers. Any suggestions?

    I deleted an earlier version of Acrobat Pro from my computer. Still, I get the same message.

    Hi John,.

    Please specify if you have purchased DC Acrobat or Acrobat 11 or upgrade you to the latest patch for Acrobat 11, that is to say 11.0.11 so that we can help you accordingly.

    I wonder if you have checked your system requirements before you download Acrobat.

    I would also ask to share with you the screenshot of the error message with us.

    You could probably uninstall Acrobat using cleaning tool. Here is the link for the same thing.

    http://labs.Adobe.com/downloads/acrobatcleaner.html

    If you were installing DC, check out the following link to download.

    https://helpx.Adobe.com/Acrobat/KB/Acrobat-downloads.html (classic)

    https://helpx.Adobe.com/Acrobat/KB/Acrobat-DC-downloads.html (continued)

    Concerning

    Sukrit diallo

  • is STRICTLY oriented Panel "folio overlays" to creating applications? I don't have an app but you need an interactive document with overlays.

    The interactive panel inlays that can be used in the creation of pdf? Is he just focused strictly on creating applications?  I did not need to create an app at all but I need an interactive document with overlays.

    Yes.

  • Unable to download free music, but get a download error something has gone wrong. Application of XBOX music on windows 8.1

    I am running Windows 8.1.  I am trying to download music for free but get a download error.

    Something was wrong.  Give him another chance. If it happens again, let know us by entering the error below to xbox.com/errorhelp code so that we can investigate

    B32809FC-E308-4E83-9460-2F587751224D

    28/11/2014 - 02:41:20 UTC

    I did but nothing go.

    What's wrong.  I already missed the opportunity to get some free albums.   not a lot of use.   I am happy that I bought anything.   I can download and install other apps.    Yes, I uninstalled the music app and reinstalled.  No help.  I tried to download several times and getting a different error code every time.

    Hello

    I suggest you try the steps suggested by Chanh S from the following link and see if that helps.
    http://answers.Microsoft.com/en-us/musicandvideo/Forum/xboxmusic-xboxapp/unable-to-download-music-from-music-app-in-Windows/a586aed6-58c9-4A2F-9f38-a91b09d21299

    I hope this helps. Let us know if you have other problems with Windows in the future.

  • Read a cluster from a LabVIEW Application on ActiveX

    Trying to not pull my hair.

    New user of TestStand.  We currently have a suite of applications created using LabVIEW .exe that allows the user to manually test DUT.  Try to get a proof of concept goes to show fat improvements if we TestStand resume what the user is doing.

    Rebuilt the executeables with active ActiveX and can almost get everything working the way I want it, except for every time that a type of cluster is involved.  Works cannot read or write.  I created a customized data type to match the type of cluster, but I always get an error of-17308 complain that the Variant data type does not match the variable type expected.  I can get the types of simple data (including tables) to work, but for clusters... nothing.

    Y at - it something I am doing wrong?  Is this possible?

    Dan

    I've tested this method worked.

    To sum up to pass a cluster:

    Create a VI that has a cluster as either the entry or the cluster of production you want out of the EXE.

    Inside this VI, use ActiveX to get the desired virtual Instrument (similar to what you are doing in TestStand).  Call to set the value of control (or get the value of control) on the control that you want to get or set.  You can wire the cluster directly to set the value of control (or get the value of control) in LabVIEW because it stores the clusters in the same way.

    From TestStand, call this VI.  Move in (or on) the parameter desired to get or set.

    I've attached an example that shows how to define a control in the same VI, but you should do something different where you choose your ActiveX Server rather than the LabVIEW ActiveX Server executables.

  • upgrading to win 10, but get this errorC1900101""WindowsUpdate_dt000"

    Moving it to 10 but get this errorC1900101""Windows Update_dt000 ".

    The fastest way to get the upgrade is to download the ISO.  Year ISO is like a dvd in order to to use, you need to right click > go up.  Begin upgrading Windows.

    WARNING: do not USE NOT THESE TO DO A CLEAN the INSTALLATION (before after you have already updated).  If you do you will not be able to activate it without having previously upgraded to win 10 and active.  Then, you will be forced to reinstall your previous operating system before the upgrade to win 10
    Running the tool of creation of media warning can prevent you to roll back to a previous operating system

    The official download Final Windows 10 is now available

    Use the download tool to create ISO support to update your windows.

    http://www.Microsoft.com/en-us/software-download/Windows10

    Use tool download now (32-bit version)
    http://go.Microsoft.com/fwlink/?LinkId=616935

    Use tool download now (64-bit version)
    http://go.Microsoft.com/fwlink/?LinkId=616936

  • error barsigner: cannot create application data directory

    Hello, I got this error when I try to sing my application:

    error barsigner: cannot create application data directory

    I tried everything: as an administrator, change the directory security and so on.

    I get this error with the command line and from Flash Builder.

    I have v.0.9.1 SDK

    I have my application ready to be submitted, but cannot understand this error, I would be very disappointed to not meet the deadline of March 31 :-/

    Any clue? Thank you

    Really 0.9.1? could sign you your application with this version? have you tried the SDK 0.9.4?

  • NDK 10.1 can be used to create applications PlayBook?

    I have NDK v10.1 installed on my PC and I successfully build an application that is running on Z10 and Q10.  I now want to port this app to run also on PlayBook, but when I try to run my native application on PlayBook hardware I get the following message:

    The application you are launching is built against a newer version of the Native SDK (10.1.0.1020) compared to your device version (2.1.0.1526).  Using a newer Native SDK will cause issues when running and debugging your application.  How would you like to proceed?
    
    [Cancel Launch] [Find matching SDK] [Continue]
    

    When I try to find a corresponding SDK, nothing is found.  If I Continue, the app PlayBook is not install and run on my PlayBook.

    Is it possible to use the NDK 10.1 to create applications for the PlayBook?  Or should I install v2.1 NDK on my PC and use it for the development of the PlayBook?

    Is it normal to have 2 versions of the NDK installed on the same PC (v2.1 and 10,1)?

    You must install the 2.1 SDK to build for the playbook.

    I found myself with what the IDE 10.x with a drop-down menu to the top that allows you to choose the version of the compiler to use.  And then you can switch back.

    In addition, even if you cannot use the 10.x to build for the playbook, you can use the 2.1 build for BB10.  Be careful with what you can of course use any api 10.x when you do it this way.

    It is how I did it.  My biggest problem was with dialog boxes. because they do not allow for all the options for sizing in 10.x, as they did in 2.1.

    Be sure to test if you go down this road of use 2.1 for 10.x.

    Of course, the alternative is to manage 2 different source codes.

  • Creating Applications in vCOPS a UI custom

    Hello

    I'll have a go at creating applications and dashboards customized vCOPS a custom user interface.
    I just created an application and when I want to add VM for the layers I actually get a lot of instances of the virtual machine.

    Under the list, it shows the name of the virtual machine and type of resource and then 3 identifiers. Identifier of 1 and 3 are identical.
    2 identifier differs for each instance (e.g. vm-12345)
    My question is what entry choose and why is there so much for some VM, but not others?
    I'm not sure, but I wonder if it has something to do with being protected by SRM.

    Whichever one I get I get no data.

    Hope that make sense

    Hi AllBlack, the response of the mlebied is correct - you will see multiple instances of the MV if the virtual machine has been protected by MRS or basically no reason to ensure that the VM to have a new ME.

    However, it is easy to choose the virtual machine that is the current 'live' VM by selecting the entity VM status > lit

    See the attached screen shot.

  • Creating application server connection to the remote host fails

    Hello

    I have installed soa suite 11.1.1.3 and jdeveloper for windows xp machine, can I create and use the connection to the application server to the local computer. SOA suite 11.1.1.3 and installed jdeveloper also to a linux machine, also it create application server connection works.
    But all trying to create a connection to the server application between jdeveloper and environment linux xp, get following error when you click on the button test the connection:
    ---
    JSR-160 LENGTH tests... failed.
    Cannot establish the connection.
    JSR-160 DomainRuntime... skipped tests.
    JSR - 88... skipped tests.
    JSR-88-LOCAL... skipped tests.
    JNDI... skipped tests.
    JSR-160 tests edit... skipped.
    Tests of HTTP... success.
    Test server MBeans model... skipped.
    Test HTTP authentication... success.

    2 of the 9 successful tests.
    ---
    Have you tried the ip address and hostname, fully qualified as weblogic host name, firewall is not turned on. Xp browser access admin console & enterprise manager. We already added machine linux xp hosts file.

    No idea what to try?
    JDeveloper written journal somewhere?

    My jdeveloper is Studio Edition Version 11.1.1.3.0, JDEVADF_11.1.1.3.PS2_GENERIC_100408.2356.5660 to build.

    Best regards, Matti

    Try after removing the proxy in JDev (Tools-->--> Web and Proxy browser preferences, uncheck the box use a Proxy HTTP Server)

    Kind regards
    Anuj

    Published by: Anuj Dwivedi on January 11, 2011 16:14

  • Accidentally, I used my xp professional on my computer which had xp family on it. my computer says I need to activate windows, but when I click the icon, nothing happens.

    help XP Activation

    Accidentally, I used my xp professional on my computer which had xp family on it.  my computer says I need to activate windows, but when I click the icon, nothing happens.  I can't go back to xp home, he beginning to install on the partition.  How to activate windows when I can't get to the prompt?

    http://www.Microsoft.com/genuine/diag/

    Try this link for activation...

Maybe you are looking for

  • Photos of power

    Hello, is PowerPhotos by fatcat really work to find duplicate photos and remove? I have about 3000 photos and I know there are duplicates in there. I have OS X EL Capitan, version 10.11.5 MacBook Pro (retina, 13 inches, early 2015). And also to get r

  • Doesn't have installation on Windows 7 64 bit

    Hi all I am trying to install itunes on a new install of Windows 7 64 bit and receive the error message could not start Apple Mobile Device Support. If I don't know the message all the components are installed except AppleApplicationSupport64. When I

  • FYI: AX100 with Sony ECM - GZ1M Multi Interface microphone

    I took the microphone ECM-GZ1M cannon. My AX100 try to better isolate the sounds from subjects in front of the camera and found an interesting problem. So that the microphone. works in the firearms and zoom modes (and turn it off turn internal mic so

  • Why don't apple just add a feature bit to select and deselect all at once?

    Hey, I received more than 2000 photos are of my collections in recent years and if I try to select one by one, or as said at times it would take me more than 20 minutes, why don't not you guys give us a simple option to select or deselct all movement

  • The Windows Update components fail to install

    This morning I noticed that in the past 2 windows update components were not installed. The table below shows the number of the knowledge base for patches and their associated error codes. Title Knowledge Base number Error code Update for 2007 Micros