Accessing Windows Script Component (.wsc) methods from CVI

Hi,
I am trying to gain access to an already existing script that from Labwindows. It is a .wsc, Windows Script Component, file. It's in my System32 folder and I have registered it. The only way I could find to get the functions into labwindows was by generating a .tlb file from it using a windows utility. I then used the ActiveX control wizard in CVI to import the type library. The functions all seem to show up in the instruemnet panel. However, when I try get an automation reference I get an error (: error code= -2147467262). There is no dialog box or anything that comes up with this error code, I do error checking in my code and print them to my log, thats where I'm pulling the error code from. The problem is similar to what is described by the third post in this thread:
http://forums.ni.com/t5/LabWindows-CVI/How-to-integrate-windows-scripting-components-written-in-jscr...
Here is a reference to some info on WSC's:
http://msdn.microsoft.com/en-us/library/dd79w6c8(v=VS.85).aspx
Here is the call I am trying to make that fails:
error = JDDiag_NewAutomation (NULL, 1, LOCALE_NEUTRAL, 0, &JDDiag);
and the protype that the controller wizard generates from the .tlb:
/*-------------------- Prototype ---------------------*/
HRESULT JDDiag_NewObj (const char *Server,
                       int Support_Multithreading, LCID Locale,
                       int Reserved,
                       CAObjHandle *Object_Handle);       
Also, here is the code in JScript that would accomplish what I am trying to do in CVI:
  JDDiag = new ActiveXObject( "JDDiagnostic.WSC" );
  JDDiag.Init( objController );
If anyone has any ideas/knows what I am doing wrong, or if this is even possible please let me know. Also, the WSC is written in JScript, but I don't feel like that should matter because according to the Microsoft documentation they can be written in any scripting language and the COM should take care of things.
Thanks,
Josh Meyer 

Using Windows 7 Home Premium
I have read this thread carefully and followed the recommendations, and I still get the MsgBox error:
The module "scrobj.dll" was loaded but the call to DllInstall failed with error code 0x80004005
For more information about this problem, search online using the error code as a search term.
I even took these additional steps in the command prompt:
>cd C:\Windows\System32
>regsvr32 /i:C:\Users\dn\dn.wsc scrobj.dll
>cd C:\Windows\SysWOW64
>regsvr32 /i:C:\Users\dn\dn.wsc scrobj.dll
I executed the identical command after changing to each of the directories. Each time I received the same error
Yes - that is what happens when you "necro" half century old threads.
The object I obsolete and unsupported.   The error - 0x80004005 indicates that you are not an admin.  It may  also indicate that you are using an unsupported module.
¯\_(ツ)_/¯

Similar Messages

  • How to call Custom or Component Controller methods from View Controller

    Hy Guys,
    how do I call Custom Controller or Component controller methods from a View or Context Controlller?
    thanks in advance
    Jürgen

    Hi Juergen
    Yes it is possible, pls follow the below approach to access the component controller in context node class
    1) since the standard component controller class is protect variable , declare a variable of type component controller in your controller class.
    say for example the public variable you declared is  g_comp_controller
    2)  now redefine the controller class method WD_CREATE_CONTEXT  and add the below lines of code
       g_comp_controller ?= me->comp_controller.
    3) go to context node class  (CNXX)  there declare the varaible which of type controller class (IMPL)  as public variable, for example g_owner
    4) redefine the method  IF_BSP_MODEL~INIT  and write the below code
         CALL METHOD super->if_bsp_model~init
        EXPORTING
          id    = id
          owner = owner.
      g_owner ?= owner.
    5) now the variable   g_owner  that is declared in  (CNXX)   contains reference to your controller class
    6) in  on_new_focus  method access your component controller in the below manner and access the entities also.
    DATA: lv_owner                    TYPE REF TO xxxxx_impl,  " Implementation class
                 lr_comp_cont                TYPE REF TO xxxx_bspwdcomponen_impl, " component controller class
                 lv_entity type ref to cl_crm_bol_entity.
    lv_owner ?= g_owner.
    lr_comp_cont    ?= lv_owner->g_comp_controller.
    IF lr_comp_cont IS BOUND.
       lv_entity ?= lr_comp_cont->typed_context->mdfcampaign->collection_wrapper->get_current( ).
    now lv_entity contains the value of component controller context node.
    Thanks & Regards
    Raj
    Edited by: bmsraj on Sep 27, 2011 3:28 PM

  • Accessing view object class (impl) method from bean (or vice versa)

    Halo everyone, I am using JDeveloper 11.1.2.1.0
    I have a UsersViewImpl class with a method which refresh the user table like below.
    public void resetEmployeeSearch() {
    removeApplyViewCriteriaName("viewCriteria");
    executeQuery();
    and I have a UserBean class with a method which reset the search fields values like below.
    public void resetInput(ActionEvent actionEvent) {
    ........RichInputText = input ...
    input.setValue("");
    AdfFacesContext.getCurrentInstance().addPartialTarget(searchForm);
    I would like to implement it in such a way that, once I press a button, both methods will be called.
    I have tried to call from bean method using UsersViewImpl vs = new UsersViewImpl ..... which is wrong and wont work.
    I have read about doing something like ViewObject vo = am.findViewObject("DeptView1") but I duno how to use it because I cant have a proper example.
    Any suggestion on accessing view object class (impl) method from bean (or vice versa)?
    Or is there any way to combine both method in the same class ?
    Thank you :(

    User, if you get class not found exceptions you need to tell us which classes you can't find. The JSFUtils and ADFUtils classes needing some other libraries which should already be part of your Fusion Web Application template (which your adf application should be based on). If you did not use this application template, you may have to add some libraries yourself.
    What is the diff of using the ADFUtils and OperationBinding way?
    The ADFUtils can get you access to the application module which you then use to call exposed methods on. The disadvantage of doing this is that you have to implement your own exception framework which then handles exceptions thrown by the application module. An other thing is that if you e.g. alter a VO which you use on the page this changes are not seen on the page until you refresh the page. The binding layer does not know about these changes so the iterators (which are used on the page to show the data) are not refreshed and so you don't see the changes.
    In general you should avoid using the application modul in a managed bean method and always use the binding layer (OperationBinding) to call methods. This ensures that exceptions are all handled the same way and that changes to the data model are reflected in the GUI.
    Timo

  • How do I access array elements in one method from another method?

    Hi all!
    How do I access the array's elements from another method so that method 2 can have access to method 1's array elements? Thanks for any help!
    I am trying to create a simply program that will use a method to create an array and a SEPARATE method that will sort the array's elements (without using java's built in array features). I can create the program by simply having one method and sorting the array within that same method, BUT I want to sort the array from another method.
    Here's my code so far:
    public class ArraySort {
       public static void createArray(int size){
           double myArray[] = new double[size];    //create my new array
           for(int j=0; j < myArray.length; j++)
              myArray[j] = (200.0 * Math.random() + 1.0);   //fill the array with random numbers
       public static void sortArray(){
           // I WANT THIS METHOD TO ACCESS THE ARRAY ELEMENTS IN THE METHOD ABOVE, BUT DON'T KNOW
          //  HOW???? Please help!
        public static void main(String[] args) {
            createArray(4);    //call to create the array
    }Thanks again!
    - Johnny

    Thanks for the help all! I ve managed to get the program working, using java's built in array sort, but when i try to call on the array sort method from WITHIN my main method, nothing happens!
    Can somebody please tell me why I am not able to call on the sort method from within my main class???? Thanks!
    public class ArraySort {
       public void createArray(double[] arrayName, int size){
           double myArray[] = new double[size];  //create new array
           for(int j=0; j < myArray.length; j++)
              myArray[j] = (200.0 * Math.random() + 1.0);    //populate array with
           }                                                 //random Numbers
           sortArray(myArray); 
       } //Sort array(if I delete this & try to use it in Main method --> doesn't work???
       public void sortArray(double[] arrayName){
           DecimalFormat time = new DecimalFormat("0.00");
           Arrays.sort(arrayName);      //sort array using Java's built in array method
           for(int i = 0; i <arrayName.length; i++)
               System.out.println(time.format(arrayName)); //print arary elements
    public static void main(String[] args) {
    ArraySort newArray = new ArraySort(); //create a new instance
    double myArray[] = new double[0]; //create a new double array
    newArray.createArray(myArray,4); //build the array of indicated size
    //newArray.sortArray(myArray); //This will not work???? WHY?????//

  • Windows Script Component Registration Generate 0x80004005 Error Code

    Scenario :
    I create a simple .hta for managing students information and personal data. I create an application registration system which is required by the user to register the .hta before using it (Freeware which required registration for software benchmarking purpose).
    The registration is created with .wsc file structure. All students registration can work properly and saved into the database without generating any error. However the .wsc file for application registration is unable to register it which generate error.
    Problems :
    .wsc file generated error 0x80004005 on registration.
    Flow :
    If I try to register from the context menu, the following error is generated.
    "The module "C:\Windows\system32\scrobj.dll" was loaded but the call to  DllInstall failed with error code 0x80004005."
    If I try to register from the command line, the following error is generated.
    "The module "C:\Windows\system32\scrobj.dll" was loaded but the call to  DllRegisterServerEx failed with error code 0x80004005."
    Trial Made :
    I searched the solution over the internet and nothing was found except all the solution related to 0x80004005 is pointed to Jet.OleDb problems.
    Request :
    I hope someone can help me solving this problem. So any help or opinion will be appreciated.
    Remarks :
    Microsoft Windows 7 Ultimate 32 bit on 32 bit system architecture.
    Internet Information Services 7.5 is not installed.
    Microsoft .NET Framework 1.1, 2.0, 3.0, 3.5 and 4.0 Redistributable installed.
    Microsoft Office Access 2007 with Microsoft Jet OleDb 4.0 installed.
    Thanks.

    Using Windows 7 Home Premium
    I have read this thread carefully and followed the recommendations, and I still get the MsgBox error:
    The module "scrobj.dll" was loaded but the call to DllInstall failed with error code 0x80004005
    For more information about this problem, search online using the error code as a search term.
    I even took these additional steps in the command prompt:
    >cd C:\Windows\System32
    >regsvr32 /i:C:\Users\dn\dn.wsc scrobj.dll
    >cd C:\Windows\SysWOW64
    >regsvr32 /i:C:\Users\dn\dn.wsc scrobj.dll
    I executed the identical command after changing to each of the directories. Each time I received the same error
    Yes - that is what happens when you "necro" half century old threads.
    The object I obsolete and unsupported.   The error - 0x80004005 indicates that you are not an admin.  It may  also indicate that you are using an unsupported module.
    ¯\_(ツ)_/¯

  • Call component controller method from view

    Hi
    I have created an action in view Thus its event handler is "OnActionDoSomething()"
    And, I have a method in component controller "MethodSaySomething()".
    Now, how can I call MethodSaySomething() from OnActionDoSomething().
    OnActionDoSomething()
    // Call  MethodSaySomething() defined in component controller
    Thanks

    Hi,
        To access the methods present in component controller from View , first u need to add the component controller as the required controller.
    open the view controller --> switch to propertues tab --> add the component controller as required controller(click add controller).
    Now in your action handler , write this below code to add the method:
    wdThis.wdGet<COmponent Controller>().MethodSaySomething();
    Hope it helps
    Thanks and Regards,

  • Call a component controller methods from a view

    Hi,
    I have created a view v1 with context node c1and binded the context node c1 of it with the component controller so that the values entered in the view v1 are available.
    now can i know how to access this values from component controller context node which i binded in a other view......
    Thanks,
    Prem

    Hi Sayan,
    component : BP_HEAD
    View: BP_HEAD/BPHeadOverview
    I have called event EH_ONPOPUP_CLOSED when popup is closed in view BP_HEAD/BPHeadOverview and i get all the values entered in the popup here using below code.
           lr_context_node = gr_popup->get_context_node( iv_cnode_name = 'ZPOPUPCN' ).
           lr_col_wrapper = lr_context_node->collection_wrapper.
           lr_entity = lr_col_wrapper->get_current( ).
           IF lr_entity IS BOUND.
             lr_entity->get_properties( IMPORTING es_attributes = ls_data ).
           ENDIF.
    now ls_data contains all the data entered in the popup ie. - firstname, lastname, house_no, street, city, postal code, country.....
    now it have tried the below code to map/set the entries with the Account management - individual account creation screen.
    data : ls_header         TYPE crmst_header_object_buil,        " BuilHeader
              ls_header1        TYPE crmst_address_buil,                 " BuilStandardAddress
           ls_header-firstname     = ls_data-zfirstname.
           ls_header-lastname      = ls_data-zlastname.   
           ls_header1-house_no     = ls_data-zhouseno.  
           ls_header1-street       = ls_data-zstreet.      
           ls_header1-city         = ls_data-zcity.        
           ls_header1-postl_cod1   = ls_data-zpostcode.    
           ls_header1-country      = ls_data-zcountry.   
           ls_header1-telephonetel = ls_data-ztelno.        
           ls_header1-e_mailsmt    = ls_data-zemail.
           entity ?= me->typed_context->builheader->collection_wrapper->get_current( ).
           IF entity IS BOUND.
             entity->set_properties( EXPORTING is_attributes = ls_header ).
           ENDIF.
           entity1 ?= me->typed_context-> BuilStandardAddress->collection_wrapper->get_current( ).
           IF entity IS BOUND.
             entity1->set_properties( EXPORTING is_attributes = ls_header1 ).
           ENDIF.
    but the problem is both the entity is INITIAL.

  • Windows server 2008 R2 x64 Authentication failure while try to access Windows server 2003 R2

    Hello,
    I try to access Windows Server 2003 R2 Standard from Windows Server 2008 R2 x64 standard using integrated windows authentication . And because my application tries to read SQL server i'm getting and error that user is not trusted. Then I tried to open a
    simple shared folder on  2003 and none of the users is able to do it. Both servers are part of common workgroup in the same IP range. Using domain is not an option. Migrating 2003 to 2008 is not an option either. The specific DB provider I have to use
    supports only windows authentication, so creating user into SQL server is not an option too. I have tested many applications and cases which requires/uses windows authentication and non of the manage to connect.
    Any help is very welcome because things are urgent!
    Authentication failure

    That method in workgroup mode may be a problem.
    Authentication in SQL Server
    Might ask them over here.
    SQL Server forums on
    MSDN
    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]
    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

  • How can i edit script component in another machine?

    Hello everyone,
    i am using sqlserver data tools to build a package..
    i have alot of script components...the problem is i wrote this package in machine A ... when i take the whole solution in machine B 
    i can not edit or see the script components projects files etc...
    am i missing an atribute at package solution/project file?
    because in ssis 2008 r2 version i can edit all of components (script componet,oledb source component...etc.)
    ...but  in 2012 version of ssis i can not edit script component project..
    thanks a lot..
    evgeni

    Evgeni
    because in ssis 2008 r2 version i can edit all of components (script componet,oledb source component...etc.)
    ...but  in 2012 version of ssis i can not edit script component project"
    I guess you need to upgrade the package/solution 1st to the SSIS 2012 format.
    You need to go to Start-Microsoft SQL Server 2012->Integration Services and choose
    Project Conversion Wizard .
    Once the project (not just a package) is converted to SSIS 2012 open it in SSDT, access your Script Component and then choose
    Design Script button
    Arthur My Blog

  • Calling a method from another class or accessing a component from another

    Hi all
    im trying to make a find/replace dialog box
    my main application form has a jtextpane and when i open up the find and replace dialog box it has two textboxes (find and replace)
    now i have the code to do the finding on my jtextpane but how do i call that code to do the find method?
    I have tried having the code in my main application class but then how do i call that method from my dialog box class?
    ive also tried having the code in my dialog box class, but then how to i tell it to work on my jtextpane which is in my main ap class?

    well if someone had been nice enough to provide me
    with a tutorial i wouldnt have gotten into this
    muddle, no need to be rude is there!I'm not rude. And you also wouldn't have gotten into the muddle if you searched yourself. This site provides many very good tutorials about all kinds of stuff.
    http://java.sun.com/docs/books/tutorial/java/javaOO/classes.htmlAmong other things, it mentions that "static" defines everything that belongs to a class, as opposed to an object.

  • How can I call  a component method from OCAP ?

    I'll try to invoke Cold Fusion Component from Xlet (OCAP App), specifically I wan to invoke a query from Component(CFC) method.
    Somebody knows how to... or any idea or comments.
    Thank you so much!

    Actually, as long as the servlet returns valid javascript, you can indeed "call it" from the client. It will initiate a request and return the result to the browser.
    This example uses Perl, but it could be easily modified to go to a servlet instead.
    Note that it is only supported in DOM browsers (IE6+/NN6+/etc)
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
    <html>
    <head>
    <title> Test server-side JS </title>
    </head>
    <body>
    <script type="text/javascript">
    function checkIt(variable, value)
    var newScript = "cgi-bin/validateJS.cgi?"+variable+"="+value;
    var body = document.getElementsByTagName('body').item(0)
    var scriptTag = document.getElementById('loadScript');
    if(scriptTag) body.removeChild(scriptTag);
    script = document.createElement('script');
    script.src = newScript;
         script.type = 'text/javascript';
         script.id = 'loadScript';
         body.appendChild(script)
    </script>
    <p>Test.</p>
    <form id="f1" action="">
    <input type="text" name="t1" id="t1" onChange="checkIt(this.name, this.value)">
    </body>
    </html>
    validateJS.cgi
    #!/opt/x11r6/bin/perl
    use CGI qw(:all);
    my @valArray = split(/=/,$ENV{QUERY_STRING});
    print "Content-type: text/javascript\n\n";
    # myPass is the password
    $myPass = "foobar";
    if ("$valArray[1]" eq "$myPass")
    print "alert(\"Success!!\")";
    else
    print "alert(\"Failure!!\")";

  • Calling a pkg from managed code and then using reflection to call a method from a script task

    Hi we run 2012 std.  I have some pretty good evidence that when I call my pkg from a .net service, a script component in that pkg fails when trying 2 use reflection to load and invoke our .net message history method.  The exception is either on
    the invoke or in the message history method.  I suspect its in the method but will take additional steps 2 verify.
    But when I run the pkg stand alone, it has no problem and the method does what it is supposed 2 do.
    There r no vars passed from the service to the pkg.  I wonder if its a managed to unmanaged to managed issue that the community is already aware of.  If not, my apologies 4 posting this quickly.
    I'll post more info here as I collect it. 

    we have 2 theories after showing the exception trace to folks who r more adept at managed code.
    the first is related to the fact that our 3rd party dlls (I think entity framework is included in these) r older versions.  I don't want to discount this theory but we have some evidence already that this might not be true.
    I hope I can do justice to the 2nd theory but will make it clearer and clearer as I get a better understanding.  I believe this is what Arthur was saying and I applaud his instincts.  They explained that .net is so "smart" that it detected
    a change in namespace  (ie context as Arthur said) and purposely threw an exception 2 save us from ourselves.  The workarounds discussed were a bit over my head but I will continue trying to better understand it.  The fact that many of the methods
    we call after reflection r now merged into one assembly seemed relevant to the discussion and possible workarounds.   
    this link came up in their discussion and I believe the bottom line here is that by qualifying assembly names further (in config?)r, a workaround is possible. 
    http://msdn.microsoft.com/en-us/library/system.type.assemblyqualifiedname(v=vs.110).aspx  .
    This link came up as well and has something to do with ILMerge and workarounds to ILMerge. 
    http://elegantcode.com/2011/04/02/dynamically-load-embedded-assemblies-because-ilmerge-appeared-to-be-out/  .
    Finally, this link came up and seems to have something to do with embedding your dlls in one assembly without them losing their identity.
    http://blogs.msdn.com/b/microsoft_press/archive/2010/02/03/jeffrey-richter-excerpt-2-from-clr-via-c-third-edition.aspx
    I'll post more here as we muddle thru this.

  • Accessing unix script from Apex

    Hi There,
    Is it possible to access unix script from apex?
    Or to run a batch file through apex?
    Please help!!
    Thanks in advance,
    Pushpesh Pallav

    The solution depends on the purpose of the script.
    "I want to run a database backup"
    learn RMAN, create an RMAN repository, and have Oracle backup itself
    "I want to backup a schema on demand"
    use dbms_datapump
    "I want to put/get a blob to/from a file on an internal machine"
    one method:
    Install and register Oracle Agent on internal machine
    use dbms_scheduler.put_file()/get_file()
    "I want to get a file on an external machine that is available via HTTP(s)"
    I've used ORDDoc( 'http://...' ) to get this file.
    "I want to run the script and parse the results. - no input parameters are needed"
    Enhance the script to return CSV like results
    Then, create an EXTERNAL TABLE with a preprocessor
    ".. and the script returns performance matrix of a server"
    I believe Oracle has already written (and incorporated) those scripts.
    "..and the script checks to see if a new file exists"
    DBMS_SCHEDULER.FILE_WATCHER()
    "I want to give it some parameters,run the script, and then parse the results"
    Wrap the script with SOAP/REST.
    Example wrapper stuff:
    http://soaplab.sourceforge.net/soaplab2/
    MK

  • How to access component's control from main .mxml file?

    I have a main .mxml while in which i imported custom
    "popUpWindow" component using "import components.popUpWindow"
    statement. In main .mxml file I display later on that component as
    popUp window using popUp manager class:
    var popUpWin:IFlexDisplayObject;
    popUpWin = PopUpManager.createPopUp(this, popUpWindow, true);
    Once component is displayed, how can i access using
    actionscript component's TextInput control (specifically its .text
    property) from my main .mxml file?
    thanks

    msabljic , sounds like you ran into the same problem as me,
    perhaps... I posted a question similar to yours around the same
    time. Take a look at the responses I got and maybe that will help
    answer your question.
    Here's a link to the post
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=60&catid=585&threadid =1285775&enterthread=y

  • Everytime I turn on my computer running on Windows XP, a message appears from AppleSynchNotifier.exe-Unable to locate component - "this application has failed to start because CoreFoundation .dll was not found," Reinstalling did not fix problem.

    Everytime I turn on my computer running on Windows XP, a message appears from AppleSynchNotifier.exe - Unable to Locate Component -
    "This application has failed to start because CoreFoundation.dll was not found.  Re-installing the application may fix this problem.
    I uninstalled and re-installed itunes and the message still appears.
    How do I fix this??
    Thank you

    With that one, first try uninstalling and reinstalling your MobileMe Control Panel for Windows, robin. Does that make the error go away?

Maybe you are looking for

  • After installing Lion on my Mac Pro, search in mail is not working.

    I can run the search successfully in spotlight, or on my macbook air, but when searching in mail on the mac pro, it seems to return random results. Can anyone shed some light? I have tried multiple test cases and the mac Pro from withi

  • How to change email subject in smartform?

    Dear experts! I have an action wich triggers smartform and sends it via email. In smartform (transaction smartforms) I can input some text in field "Description" and this text will be shown as e-mail subject. Also i can use ampersand (&) in this fiel

  • Code in event handlers

    Hi, I have a JForm with a button and a label on it. I set an event handler for the button like this: button.addActionListener(new ActionListener() {     public void actionPerformed(ActionEvent arg0) {*foo()*;}}); This is how foo() looks: public void

  • What's a SHAREDCONTENT.RPLN ?

    Hi, I am currently working with indesign 5.04. I have recently received a file from a client that is asking for the "SHAREDCONTENT.RPLN" when I attempt to open the file. Any ideas what this may be? Or how to solve this? I also have a contact that has

  • "Damaged or incomplete"

    Hi, I am using a Powerbook G5 with system 10.3.9 and have about 12 gigs or memory available. There are no external drives, cameras, mp3 players attached -- only a second monitor. When I try to install Adobe CS2, I am having problems. All the programs