LabVIEW's handling of simple COM Components

I am a bit of a novice with labView (my disclaimer!), however I am writing a simple c++ com component and I need to specify methods that return more than one value.
E.g. a method specified in IDL may be:
[id(1), helpstring("method SendDSPUpgrade")] HRESULT SendDSPUpgrade(
[in] long a_ModuleNo,
[in] BSTR a_FilePath,
[in] long a_Address,
[out] long* a_MaxSize,
[out,retval] long* a_ErrorCode);
Here my COM component wants to populate the a_MaxSize and the a_ErrorCode - so that LabVIEW can use the resultant data.
Can LabVIEW pass these parameters as pointers, or does it manage automatically like VB, or can this not be achieved ...?
Thanks,
Robert.

Yep,
LabView handles this automatically, converting to pointers where necessary transparently. I've tried it and it works smoothly.

Similar Messages

  • Does LabVIEW support the SNMP (Simple Network Management Protocol)?

    I looked at LabVIEW 2014 online help for some info on SNMP.
    A problem was posted in 1996 and updated in 2008.
    Does LabVIEW Support the SNMP (Simple Network Management Protocol)?
    http://digital.ni.com/public.nsf/allkb/4CD3625A939A77DE852564050047D3BD
    This was addressed to LabVIEW version 4.
    What version are we up to now?
    Version 14?
    One solution offered was to get the SNMP VI from Viodia.
    Why should I have to spend another $1,000 for a VI from Viodia after spending $5,000 for LabVIEW Professional?
    Come on National Instruments, offer up SNMP to go with your professional package.
    There seems to be a lot of chatter about SNMP on the forums.
    I’m sure a lot of customers would be happy to have an official LabVIEW VI for SNMP.

    I find it unreasonable to expect that LabVIEW supports out of the box every network protocol that has ever been invented under the sun. You may find SNMP to be the most important protocol on the world but for most programmers it is a niche protocol that they may have heard of but never will happen to come across in their applications. It's in fact pretty low level for a very specific purpose of managing network connected resources.
    On the other hand it is not rocket science either so can be implemented by someone with enough determination on top of the native network interface functions in LabVIEW. Is it a lot of work? Yes, you bet! Is it worth 1000 bucks! If you really need it and your own work hours cost anything more than a few cents per hour, most probably too! If you can live with an implementation that is supporting many but not all features of SNMP, the link on LAVAG is a very good and nice one.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Labview Interrupt Handler

    Hi folks,
    I am doing a project using labview to capture some signal timing with
    DIO. Does there anybody have this experience can share with me? Where
    can I get the labview interrupt handler program code example?
    Thanks,
    Johnson

    I have two years experience with LabVIEW and twelve years experience
    with control and data acquisition. I guess, it's a wrong way to
    "capture some signal timing with DIO". It's too unreliable and it not
    ensures any reasonable precision. Think about using general purpose
    counters. Almost all DAQ board includes this hardware. They are
    dedicated to implement such a tasks.
    Yevgeni Tunik
    In article <[email protected]>,
    Johnson wrote:
    > Hi folks,
    > I am doing a project using labview to capture some signal timing with
    > DIO. Does there anybody have this experience can share with me? Where
    > can I get the labview interrupt handler program code example?
    > Thanks,
    > Johnson
    >
    >
    Sent via Deja.com http://www.deja.com/
    Share what you
    know. Learn what you don't.

  • Breaking change in MDAC ADODB COM components in Windows 7 Service Pack 1 (repost with MSDN liveID)

    As my MSDN subscription is connected to this liveID, I repost my question in the hope to get a faster answer:
    After I installed Service Pack 1 on my Windows 7 x64 Ultimate my applications which use MDAC 2.8 COM components for database access do not work on other Windows versions any more.
    I hunted this down to changed Interface IDs in the msadoxx.tlb files. On Windows 2008 R2 e.g. the IID of dispinterface _Connection is {00000550-0000-0010-8000-00AA006D2EA4} (defined in msdado28.tlb). When I lookup the same dispinterface on my Windows 7 with
    SP1 (RTM from MSDN) I see this IID {00001550-0000-0010-8000-00AA006D2EA4}.
    That means that all code produced on Windows 7 SP1 using ADODB cannot be run on any other version of Windows as the IIDs differ.
    The CLSIDs still match, so the COM objects get created but due to different IIDs they cannot be used.
    I really hope I am missing something as this change seems to be a massively breaking change in the MDAC API.
    To verify the error you can use code like this in VB6 or equivalent in VB.Net or C# and compile it on Win7 SP1 and run it on Win7 RTM or older versions of Windows:
    Dim cn As ADODB.Connection
    Dim o As Object
    Set o = CreateObject("ADODB.Connection") ' this does still work
    Set cn = o ' this errors when compiled on Win 7 SP1 and run on older versions of Windows due to the changed IID of the dispinterface _Connection
    Regards,
    SvenC

    Ok NEW Fix:
    ===================================================================
    ---- / start: getting around Trusted Installer / ----
    STEP 1) Change owner of  
    "%CommonProgramFiles(x86)%\system\ado\msado28.tlb" to administrator or whatever your current local user is... 
    Then close all security windows.
    You might have to change this registry setting in order to change the owner:  
    (although I'm not sure, I did though.)
    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\TypeLib\{2A75196C-D9EB-4129-B803-931327F72D5C}
    Right click, Permissions, Advanced, Owner, Change owner to Administrators, Click OK, OK
    STEP 2) Back in the file properties, under Security, Change Permissions to Full Control for your new owner.
    ---- / end: getting around Trusted Installer / ----
    STEP 3) 
    Unregister it:
    Run C:\Windows\Microsoft.NET\Framework\v4.0.30319\regtlibv12 -u "CommonProgramFiles(x86)%\system\ado\msado28.tlb"
    STEP 4) Copy in legacy msado28.tlb file (get this from a non SP1 Windows 7 Machine), i.e. overwrite the last one.
    STEP 5) Re-register the new one:
    Run C:\Windows\Microsoft.NET\Framework\v4.0.30319\regtlibv12 "CommonProgramFiles(x86)%\system\ado\msado28.tlb"
    ** Now VB6 compiles from a Windows 7 SPK1 machine that reference MDAC 2.8 should work now automatically without changing anything in the project file or references
    Is there somewhere I can download the legacy msado28.tlb file since I have the only W7 machine in the organization?

  • An issue using the COM components supplied with SAP GUI 6.2 or 6.4

    We are having an issue using the COM components supplied with SAP GUI 6.2 or 6.4.  We used to have SAP 4.6c and now we have 5.0.  When we were on 4.6c, we used these COM components to logon and execute RFC calls and we had much success.  Now that we are on 5.0, we can’t seem to instance any SAP functions that have something to do with SAP Workflow.  We have experienced this problem when using VB6 or .NET, but our existing code that always worked is in VB 6.0.
    SAP Components used:
    o     SAP Logon Control
    o     SAP Function Control
    o     Librfc32.dll
    o     Other supporting C DLLs and/or COM object supplied with the SAP GUI installation.
    For example, if we want to call the RFC ARCHIV_CONNECTION_INSERT, this code fails in VB6 when the “Set objworkflow = objFuncCtrl.Add(strFunction)” line of code executes.  Instead of returning an instance of the object ARCHIV_CONNECTION_INSERT function, no object is created.  In 6.2, SAP raises no errors, but the object we are trying to create is still “Nothing”.  If we use 6.4, SAP raises an error “SAP data type not supported” via a message box and then the object is still = Nothing.  Interestingly enough, the 6.2 GUI COM controls don’t display the error dialog.  The message box that is shown comes from the SAP Function COM Object "SAP.Functions" (wdtfuncs.ocx).
    Now, what is interesting is if we use the same code to call a standard function or custom function that doesn’t have anything to do with SAP Workflow, then the code works fine.  Again, all of our code used to work just fine on an SAP 4.6 system.
    Here is the code that fails:
        'SAP Logon control - object for creating connections to an SAP system
        Dim objSAPLogonCtrl As Object
        'SAP connection object
        Dim objConnection As Object
        'Object that will represent the SAP function called
        Dim objSAP As Object
        'SAP function control object - object factory for creating other SAP function objects
        Dim objFuncCtrl As Object
        'Create instance of an SAP logon conrol
        Set objSAPLogonCtrl = CreateObject("SAP.Logoncontrol.1")
        'Create a connection object
        Set objConnection = objSAPLogonCtrl.NewConnection
        'Define connecion parameters
        objConnection.ApplicationServer = "sapvm"
        objConnection.SystemNumber = "00"
        objConnection.Client = "800"
        objConnection.User = "iissap"
        objConnection.Password = "tstadm"
        objConnection.Language = "E"
        objConnection.TraceLevel = 10
        'call the logon method of the connection object
        If objConnection.Logon(0, True) = False Then
            MsgBox Error
            Exit Sub
        End If
        'Create an instance of the SAP Function control object
        Set objFuncCtrl = CreateObject("SAP.Functions")
        'Set the function control connection object
        Set objFuncCtrl.Connection = objConnection
        'Function name to be generated and called
        Dim strFunction As String
        strFunction = <b>"ARCHIV_PROCESS_RFCINPUT"</b>
        'Create an instance of the function defined in strFunction
        Set objworkflow = objFuncCtrl.Add(strFunction)
        If objworkflow Is Nothing Then
            MsgBox "Could not create object " & strFunction
        Else
            MsgBox strFunction & " object created."
        End If
    If anyone has seen anything like this or has any ideas, please help!
    Mike and Hameed
    <b></b>

    Hi,
    documentation on the Scripting API is available at ftp://ftp.sap.com/pub/sapgui/win/640/scripting/docs/
    This API is a replacement of the existing, obsolete COM interfaces.
    Best regards,
    Christian

  • How does LabView 8 handle Ring constants?

    Hi all,
    This is probably more for NI guys, but I am wondering how LabView 8 handles text rings?  In the past, constants dropped into a VI that are of type "enum" will be updated when the typedef is updated, however, ring text constants will not.  Has this changed in LabView 8?
    Thanks,
    Jason

    Part 1 of 2
    Hi Chris,
    Please forgive me for differing on this point but you should have written
    When a control is strictly typed it will force all  [front panel] instances to be identical to the strict type definition and update all of the text constants.
    The "strict" part only takes care of the appearence and those changes only affect instance were they are seen by a user. The strings associated with the enum do not affect block diagram constants.
    The attached image and zip illustrates that the representation of an enum and a ring a very different. An enum has the defined strings "hidden" in the wire and the numeric value can only be one of the valid indexes of the defined strings. In this example I have shown three different constructs that illustrate the fundemental difference between rings and enums.
    1) Case Structures - An enum driven case will pickup the valid choices as defined by the enum's definition. A ring does not carry this info in the wire so it is NOT possible to label the cases to match the ring. This brings up another compliation. If the case structure does not have a default case defined there must be a case for each possible selection value. The strings of an ring can be defined at run-time. Is LV supposed to re-compile the case structures code every time the ring is re-populated? In the case of an enum driven case, this is not an issue because enums that are used in a VI that is running or reserved to run can not be editied.
    2) The "Format into string" can pick-up the valid enum strings by decoding the type descriptor of the enum wire. This is not the case with a ring because the ring is just a number.
    3) The "Flatten into string" function will return the type destriptor of whatever is wired to it. The typed descriptor contents of a enum shows that every valid selection for that enum is defined in the enum wire. Please note that the type descriptor for a ring has no information about any strings.
    End of part 1 of 2
    Ben
    Message Edited by Ben on 10-15-2005 10:41 AM
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction
    Attachments:
    ring vs enum.JPG ‏78 KB

  • Handling exception in custom components

    Hello,
    Is there any info about handling exceptions in custom components? I would like to expose some exceptions to the Livecycle process.
    Thank you

    I have faced this situation for a while and found solution.
    1.Create your custom Exception say (custom exception)
    2. Set the properties like errorcode,errormessage, and throwable (if u want to bubble up the exceptions).
    3. Create a custom object to hold the results (i.e like a java bean)
    4. In your custom component methods just return the custom object and set exception as a property.
    for e.g.
    public class CustomReturn {
    private String result;
    private CustomException exception;
    //getters & setters
    public class CustomException {
    private int errorCode = -1;
    private String errorMessage;
    private Throwable error;
    //getters & setters
    public class CustomClass {
    public CustomReturn testValue() {
    CustomReturn returnValue = new CustomReturn();
    try {
    //perform operations
    catch(Exception ex) {
    CustomException cex = new CustomException ();
    cex .setErrorCode(1000);
    cex .setErrorMessage(ex.getMessage());
    cex .setErr(ex);
    returnValue .setException(cex);
    return returnValue;
    return returnValue;
    As you see , you can check for the exception in your return type using the bean property.
    This will overcome the limitation of not able to retrieve the error stack incase of errors with default livecycle components.
    Hope this helps.
    -Senthil

  • How is concurrency handled by the UI components?

    This is NOT a question about handling concurrency in the backing bean. Specifically, I am NOT looking for the answer. "request scoped beans do not have to worry about concurrency".
    This is a somewhat academic question about how concurrency is handled by the UI components. If JSF receives two requests involving the same view, the restore view process will return the same view for each request. And here by "same view" I mean the same Java object instances. During the apply request values phase won't each request stomp over each other, since they are updating values on the same Java objects?
    This obviously does not happen, so I am wondering what I am getting wrong.
    -Jacob
    Edited by: jacobgmathew on May 26, 2009 11:40 AM

    I'll respond in terms of JSF 1.2.
    For a GET request, the view will be constructed from executing the view template.
    For a post-back, the view will be resconstructed based on saved tree structure information.
    This means the components are instantiated via the new operator and then the saved state
    is applied to the new instance.

  • Installation outlooksoft error: Assigning COM+ Components: Error

    All,
    i am roger.
    I have installed one Outlooksoft Server on windows server2003 with MS SQL2005, after installation, when i do server diagnostic, the error occurs, at COM+ Component service entry, it says Osoftdatabase user , assiged error, status error, meanwhile, i found the errors "Assigning COM+ Components: Error" at osoft installation logs. How to correct this errors?
    in addition, when i want to install BPC for office installation or BPC for administation installation from software centers, at the last step, it display," installation incomplete
    -this screen is customizable by customer-,if you need help ,please contact your system administrator."
    what to do next  to solve this problem,
    could you give us advice?
    thanks in advance.

    Hi Roger,
    Is this a single server installation that you are referring to? or is this a multi-server installation. Did the error you receive during the diagnostic occur at the Assigned, Identity, Activation Type, Authentication Level area?
    To me right now this sounds like what happened could potentially be that during the installation you by accident entered the second or third password in the installation incorrectly. There is a bug in the install that only checks the validity of the first password entered and not the second nor the third.
    Regarding the BPC for Office Error I would focus first on getting the server installation fixed before moving on to the next step.
    Let me know
    1) Where the error occurs during the diagnostic
    2) if you are able to login to MS SQL 2005 with the user and password that you entered during the installation.
    Cheers,
    Scott

  • COM Components in Oracle Application Server

    Can i deploy COM Components in Oracle Application Server.
    I see from the documentation that only Java/EJB Components can
    be deployed. Is there anyway by which i can deploy COM
    Components also?
    Thanks and regards
    bala

    What is the basic difference between the >>BC4J in Oracle Internet Application server >>and the Business Components that come in
    JDeveloper 3.1. Business Components for Java consists of both a design time framework and a run time framework. The design time framework is intergrated into the design time tool - Oracle JDeveloper - The run time portion of BC4J is packaged as libraries and available on Oracle Internet Application Server.
    I >>How is the Connection Pool managed by
    the Business Components made >> with JDeveloper 3.1. The Connection Pool is part of iAS.
    Please see their white paper on OTN.
    I >>Are the business components made in
    JDeveloper reusable as in multiple
    projects.Absolutely.
    Code sharing / Sharing Projects across workspaces, etc has always been allowed.
    I hope this helps,
    -John

  • SAP COM components in C#

    I am new to SAP.
    I would like to use .NET C#.
    I was wondering if the SAP COM components would be difficult to use in C#. A lot of extra coding? or trouble calling methods and properties?
    Does anyone know of any surprises or things that might be more difficult to code in C# rather then just using VB. Have to go through a lot of hoops?

    Hi Jack,
    The SAP COM components are quite easy to use in C#, there's no extra effort involved in calling methods or properties. Compared to VB you need to do more "casting" of objects as C# is more strict in its OO approach, but again this is all quite easy to do. As a programming language, C# is very nice indeed.
    Lita

  • COM components in OAS

    I am aware of Oracle8i support for COM components, but I would like to deploy 3rd party COM components (e.g. MS CDO-NT for email/fax/messaging application integration) to the middle tier (OAS). I think I would need to create a custom cartridge for each component (one for all?).
    Anyone using COM components in OAS (vs O8i)- any comments?

    Interesting proposition but no affirmative answer.
    I my opinion, if you can invoke COM to create Word docs and Excel spreadsheets on the local machine (same as the DB server) from within PL/SQL stored procedures, there is no reason why you shouldn't further call these procedures from other procedures that can be accessed from OAS' PL/SQL cartridge (I assume that is what you are using). Now the question is, can you also invoke CDO COM DLL's from PL/SQL (I have yet to see an example for this), either on the same machine, or more likely on a different machine (you wouldn't put Oracle and IIS on the same NT box, would you)?
    So even if there is a round-about solution, it won't be as straight forward as using IIS. In the last a couple of years I see a trend among ORCL shops of shifting from OAS to IIS for their web app development, even though the database of choice is still Oracle, precisely for the same reason you are doing --- people want to pull data from Oracle and display on web pages, but also want to integrate the web app with messaging/office tools/report engines. COM based IIS is still the only end-to-end solution for this kind of intranet based work.
    If you use OAS 4.0.8's JServlet cartridge, I assume your can access COM, but you also need to write your own Java-COM wrappers, which I don't think is that worthwhile.
    Bottomline: ORCL MSFT interoperability has a long way to go, and I am not sure people are making a lot of effort to bridge the gap, when each are pushing its own favorite technology.
    Eric Ma

  • LabVIEW as an in-process COM-server

    Hello:
    At the moment, I evaluating if LabVIEW is the best tool suitable for my next task.
    I would like to know if LabVIEW is an in-process COM server—an ActiveX DLL—that implements the IDTExtensibility2 interface. I am trying to add a COM add-in for a current Microsoft product.
    The MS notes also states the following:
    Non-modal forms cannot be displayed directly from a COM add-in. If you have non-modal forms, you can have your add-in call an external program (such as a Visual Basic executable) that enables a connection.
    Does LabVIEW meet these criteria or do I have to program in VB?-((
    Robert

    rberger wrote:
    > I would like to know if LabVIEW is an in-process COM server—an
    > ActiveX DLL—that implements the IDTExtensibility2 interface. I
    > am trying to add a COM add-in for a current Microsoft product.
    LabVIEW is not an in-process COM server. LabVIEW is started as a
    separate process either as development system or as runtime executable
    and the Active X interface is out of process to the other application
    invoking LabVIEW's Active X interface.
    LabVIEW is also not embeddable into other applications through Active X.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Watch the NI-Week 2009 Presentation: Updating the LabVIEW Error Handling Core

    The resources for the "Updating the LabVIEW Error Handling Core" NI-Week 2009 Presentation are now online.
    See them here: http://lavag.org/topic/10741-updating-the-labview-error-handling-core/
    Copyright © 2004-2015 Christopher G. Relf. Some Rights Reserved. This posting is licensed under a Creative Commons Attribution 2.5 License.

    I have always gone the latter route when I needed it.  I usually use an action engine to keep track of the error messages.  Said action engine can be used to combine and suppress errors, as well.  I have posted an example below (LabVIEw 7.1).  In this case, the error propagation is occurring in a task handler which is processing multiple command/data pairs.  The command is set at the beginning of the task and the error handler is sprinkled liberally throughout the task code.  In this particular case, the desired behavior is to continue execution on error, but log the errors.
    I prefer this type of method because it gives me complete control over the error propagation.  It has the down side of requiring more code and effort, but I think it is worth it. I like functionality to be explicit on my block diagrams.  It makes long-term maintenance much easier.
    This account is no longer active. Contact ShadesOfGray for current posts and information.
    Attachments:
    ErrorPropagation.llb ‏65 KB

  • Call COM Components using JNI

    Hi,
    Can we call COM Components using JNI? If yes can someone pls guide me how to go about it
    Thanks
    Guriqbal

    JNIWrapper 2.0 Beta with Java-COM integration is already available for download and evaluation. Check the http://www.jniwrapper.com/news.jsp
    Hope this helps.
    EToporov

Maybe you are looking for

  • I cannot restore back my data to my Q5 ! PELASE HELP

    im in the middle of a huge problem where i have become desperate and lost, here is how it all began, first of all i received an alert that a new update is available for my Q5 which is 10.2.1537 when i started to downloanding it i received an error th

  • Is it OK to buy a used OSX from say ebay and install them on my machine??

    I need to upgrade to Mountain Lion from OSX 10.5, so understand I need to purchase Snow Leapord first. Is it OK (from a licensing and working point of view) to install a second hand version??

  • Why can't I head anything on my Ipod when I plug in my headphones?

    I can't hear the music from my Ipod touch when I plug my headphones in and I've changed the headphones and it's definitely the Ipod. What should I do? Is there something I can do without taking it to a store?

  • Virtual Machine Inaccessible

    Around about 5 am GMT this morning one of my Virtual Machines went offline and never recovered. All endpoints became inaccessible (RDP, HTTP, HTTPS, SMTP etc). I'm using the VM to host a small (relatively low traffic) .NET web application so only rea

  • Portal role user removal

    Hello,   Is there a quick way of removing all users that are assigned directly to to a portal role (not in a group) other than by removing them one by one ? If not, is there a way to disable them without removing them from the role.     Regards,