Pass a COM object across processes

Hi,
I need to pass a COM object from process A to B.  I didn't find a good code example for IMoniker.  So I am trying to test a simpler solution.  Please refer to the following snippet of code.  There is a problem.  When the execution
reaches GetActiveObject in B, the system hangs.  "HRESULT h" in several places returns S_OK.   Does anybody have a clue?  Please help me out.  Thanks for your help in advance.
// the definition of the COM object
EXTERN_C const IID IID_IUniverse;
#if defined(__cplusplus) && !defined(CINTERFACE)
    MIDL_INTERFACE("91CAF3F6-BD4D-4DDC-9C35-59F5DB20D570")
    IUniverse : public IDispatch
    public:
// PROCESS A:
HRESULT h = RegisterActiveObject (cwApp, IID_IUniverse, ACTIVEOBJECT_STRONG , &dwRegister);
// PROCESS B:
HRESULT h = CoInitialize(NULL);
IUniverse *p = NULL;
HRESULT h = GetActiveObject(IID_IUniverse, NULL, (IUnknown**)&p);
if (p)
  CComPtr<IUniverse> cwApp(p);
JD

On 1/27/2015 7:43 PM, jdyng77 wrote:
I did some research on this issue to help me better understand your comments here.  I still don't fully understand the problem.  Please help me out.  Or, if I can get around the problem by using IMoniker and IRunningObjectTable instead,
I would be more than happy doing that.
Unlikely. If, as I suspect, the problem is that the server thread blocks, then the client won't be able to obtain the interface pointer from it by any means. Any IPC mechanism you might want to use kind of assumes that both parties remain responsive.
WaitForSingleObject() is the opposite of "responsive".
The third party (3rd pty) provides a COM interface.  I write a COM server A
In-process (a DLL) or out-of-process (an EXE)? From your description, I would assume in-proc.
that has an implementation for this interface.  I believe the 3rd pty must have called CoInitialize(NULL) before it instantiates object A.
It must have, yes. This is only significant if A is an in-proc server.
The 3rd pty passes a COM object of IUniverse to A.  I can call IUniverse's methods in A without any problem.  The need here is to transfer the IUniverse object to another process B so that B can call IUniverse's methods.  The problem
is that B hangs.
My guess is, B hangs because A hangs. In one of your responses, you suggest that you are calling WaitForSingleObject (waiting on process B's handle, I presume). In so doing, you have created a deadlock. B is trying to communicate with A to retrieve the
interface pointer, but A is waiting for B to exit.
After A registers IUniverse pointer (whether in ROT or as active object), it should return to the caller. Said caller likely spins a message pump - but by blocking and not returning, you don't allow it to run.
The thread where A sits is created in the 3rd pty.  If I understand you correctly, the 3rd pty must "retrieve and dispatch window messages in a timely manner".  I think it does because it calls A when a window button is clicked.
3rd pty would, if only A would let it. By sitting in the message handler, A prevents the caller from retrieving messages in a timely manner.
But I don't know whether I should use Class, File or Item IMoniker.
Item moniker is the easiest to use by far. It just wraps a piece of text. You create one with CreateItemMoniker: pass L"!" (by convention) in the first parameter, and arbitrary string in the second. Both parties (one that registers in ROT, and
one that picks up) should agree on and use the same string, of course.
Igor Tandetnik

Similar Messages

  • How do I pass a com object to a callback function

    I am trying to program the PCI-6527 card within a COM object. With the DIG_Change_Message_Config command I'm setting the notification for when the input signal changes using a callback function. To make the callback function work I have to declare that function as a static member of the object class. This means that I have no access to the this pointer in this function. After I receive the notification, my actions in the callback function depend on settings in member variables in the class. MSDN gives as a solution to pass the this pointer as an argument to a static member function to have access to the class. I've tried this but the compiler keeps barfing at me.
    The code used is:
    stat = DIG_Change_Message_Config(
    m_CardNum,1, msg,"",0,0, (unsigned long)DealWithInput );
    with DealWithInput defined as: static void DealWithInput();
    Is there a way of getting access to the class in DealWithInput either by passing it as an parameter or through some other ingenous trick that I can't find documentation for

    The thing is that you cannot change the parameters of the callback functions. It is always :
    void yourCallbackFunc (DAQEventHandle handle,
    DAQEventMsg msg,
    DAQEventWParam wParam,
    DAQEventLParam lParam);
    When yourCallbackFunc is called back, all the parameters get filled in the calling function in DAQ driver. What you have to do is pass the this pointer in message parameter in DIG_Change_Message_Config function, so that whatever you pass in message gets passed back in your callback function. Message can be any type.

  • Stop specific com object process

    I have set up a custom web site monitoring with command:
    New-Object -com InternetExplorer.Application
    Sometimes this IE process got stuck. How do I stop that specific iexplore process? I know I can use stop-process -name iexplore but how do I pin point that to that specific com object process and not some other ie process because I run several web site monitors
    in the same server and those are all unique processes.

    I found this solution, maybe it works:
    $IEProcess = [System.Diagnostics.Process]::Start("iexplore", "-noframemerging")
    Start-Sleep -Seconds 1
    $ie = $(New-Object -ComObject "Shell.Application").Windows() | ? {$_.HWND -eq $IEProcess.MainWindowHandle}
    $ie.quit()
    [System.Runtime.Interopservices.Marshal]::ReleaseComObject($ie)
    stop-process -id $IEProcess.id
    Remove-Variable ie
    Remove-Variable IEProcess

  • Passing SAFEARRAY of UDTs to a COM object

    Hi there,
    I am trying to interface with a legacy COM application from a Java client using
    jCOM. One of the methods of the COM program takes an input which is a VARIANT
    containg a SAFEARRAY of a custom type. The custom type is a simple structure
    consisting of two 'doubles'.
    The relevant bits of the IDL file looks like this (reverse engineered using OLEView):
    uuid(19CFAB24-06AC-11D7-9C30-0050DA7B5DE3),
    version(1.0),
    helpstring("XXX 1.0 Type Library")
    library XxxLib
    // TLib : // TLib : OLE Automation : {00020430-0000-0000-C000-000000000046}
    importlib("stdole2.tlb");
    // Forward declare all types defined in this typelib
    interface IXxx;
    typedef [uuid(2EC68D72-0780-11D7-9C31-0050DA7B5DE3), helpstring("UNNAMED_POINT
    struct")]
    struct tagUNNAMED_POINT {
    double latitude;
    double longitude;
    } UNNAMED_POINT;
    uuid(19CFAB31-06AC-11D7-9C30-0050DA7B5DE3),
    helpstring("Xxx Class")
    coclass Xxx {
    [default] interface IXxx;
    odl,
    uuid(19CFAB30-06AC-11D7-9C30-0050DA7B5DE3),
    helpstring("IXxx Interface")
    interface IXxx : IUnknown {
    [helpstring("Set the points for a line symbol on the named overlay")]
    HRESULT _stdcall SetLineSymbol(
    [in] BSTR display_name,
    [in] BSTR line_type,
    [in] BSTR overlay_name,
    [in] VARIANT points);
    The parameter 'VARIANT points' is a SAFEARRAY containing an array of UNNAMED_POINTs.
    The problem I am having is that the COM client returns COM error 0x80070057 -
    Invalid arguments. Unfortunately I do not have access to the COM source code.
    I have, however, tried creating a test utility with the same function prototype
    so that I can debug it in Visual Studio. This shows that the VARIANT is being
    sent correctly as a SAFEARRAY with the correct number of elements but the contents
    of it are rubbish.
    Has anyone else had this problem, or is there a way round it? We have accessed
    the COM object successfully from a C++ client.
    Thanks in advance,
    Tim

    Assuming you have the pieces of information that need to go into the array, convert each one into a variant using the built-in LV function. Next, combine all the resulting variants into an array using an array builder. Finally wire the array of variants to the com object terminal where you need it.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • COM object that has been seperated from its uderlying RCW cannot be used

    What exactly does this error mean?
    I receive this error when I perform "Unload All Modules" from the sequence editor using TestStand 4.2.1.83 development system, which is part of NI Developer Suite 2010 DS1.
    It causes TestStand to crash citing that error, and then a secondary error cites corrupted memory.

    ATE_Dude_22 wrote:
    Here is a capture of my sequence editor, where I have a alert from TestStand telling me the parameter specified doesn't match the sequence parameters (specified in the vi prototype as a string not a number), but this version of TestStand allows it to execute without needing to clear the error.
    Do you think this may have anything to do with the error I am seeing?
    Probably not. Sequence calls support mismatched parameters, what happens is that the callee gets whatever is passed to it, if that's not what it's expecting, then you might get a type mismatch error if type checking is enabled, if not then it's up to the sequence what it tries to do with the parameter for what happens next.
    Most likely the bug is in one of the code modules you are calling, probably a vi or dll is not properly maintaining a reference count somewhere or is corrupting memory and only indirectly causing the error. If most of your code is in labview, one thing to look out for is incorrectly specified calls to dlls from LabVIEW. If a call to a dll is incorrectly specified, either from LabVIEW or TestStand that can very easily lead to memory corruption and random errors later on in the code.
    I'd recommend trying to either debug and see where it's failing, if it's always failing in the same place. Or try to eliminate possibilities and reduce the called code to the minimum code required to reproduce the problem and then look for bugs in that code (paying special attention to the possibility of incorrectly specified dll calls and/or perhaps incorrectly maintained reference counts on COM objects).
    Another idea, to see if the problem is memory corruption caused by a vi, is to run all of your labview vis using the development environment (labview adapter setting), if so, any memory corruption would be in the labview process and not the main teststand process and should not bring down teststand.
    -Doug

  • The Proper way to go - Passing Serialized Java Objects vs. Web Services?

    The team which I am apart of in our little "community" is trying to convince some "others" (management) that we should not use web services to communicate (move large data) within the same application (allbeit a huge application spanning across many servers).
    Furthermore these "others" are trying to tell us that in this same application when two small apps. inside of this large app. are both java we should not communicate via serialized java objects but instead we should use Web Services and XML. We are trying to convince them that the simplest way is best.
    They have asked us to provide them with proof that passing serialized java objects back and forth between two smaller java applications inside of a larger one is an Industry Standard. Can anyone help either straighten my fellow workers and I out or help us convince the "others" of the proper way to go?

    When I was a consultant we always gave the client what they wanted. Even if it was the wrong choice. Suck it up.
    I'm glad I wasn't one of those customers. Although I agree that a customer is the one who decides what to do, when I pay someone for consultancy, I expect them to consult me. If they know I'm trying to do something that I shouldn't be doing, I expect a good consultant to be able to show me that there's a better way (not just tell me I'm not doing it right, mind you).
    We pass a lot of data using XML and we don't have any transmission or processing speed issues.
    Then you either have a much better network than our customer did, or we're not talking about the same amounts of data here.
    I used the JAX-RPC RI ...
    That's cool... our customer was, unfortunately, infected with Borland products, so we had to use BES. The web services on BES were run by Axis.
    How large were these messages?
    Huge... each element had about 15 attributes, so 1,200 elements would require 19,200 XML nodes (envelope not included). By comparison, the serialized messages weren't even a quarter that size. It's not just about what you send across the network; it's also the effort of parsing XML compared to desrializing Java objects. Our web service wasn't exactly the only process running at the server.
    Anyone who understand the fundamental difference between ASCII (XML) and binary (serialized) formats realizes that no web service can possibly achieve the performance of binary Java services. Why do you think that work is being put into binary web services? I'm not saying XML is never a good thing; just that it's not The Holy Grail that a lot of people are making it look like.
    http://issues.apache.org/jira/browse/AXIS-688
    Ouch.

  • Pass Value/Transfer Object to ejbCreate?

    I'm currently doing some entity bean programming and I'm thinking if it's possible to pass a Value Object to the ejbCreate method rather than a long list of parameters for all fields in an EJB.
    You see most EJB tutorials that I've come across write ejbCreate as a method that takes in parameters for all fields/properties.
    So we call it using say:
    customerHome.create(customerId, customerName, ...blah, blah, blah,...); Since we have a Value Object, why don't we just have something like this:
    CustomerVO c = new CustomerVO(customerId, customerName, ...blah...);
    customerHome.create(c);Doesn't this look better and cleaner?
    Anyway, how does the EJB methods mapping works? Why do I call the method .create(...) in Home interface and in the Bean implementation I've .ejbCreate(...) method instead?
    What about the rest, say ejbLoad(), ejbStore, ejbRemove()? Just strip all the "ejb" infront and call them .store(), .load(), .remove() in Home interface?
    Also, why do only .create(..) appear in Home interface itself? Are the rest (.store(), .load(), .remove())inherited and therefore not have to be specified?

    Sorry for the formatting mistake above. Below is the corrected version.
    I'm currently doing some entity bean programming and I'm thinking if it's possible to pass a Value Object to the ejbCreate method rather than a long list of parameters for all fields in an EJB.
    You see most EJB tutorials that I've come across write ejbCreate as a method that takes in parameters for all fields/properties.
    So we call it using say:
    customerHome.create(customerId, customerName, ...blah, blah, blah,...); Since we have a Value Object, why don't we just have something like this:
    CustomerVO c = new CustomerVO(customerId, customerName, ...blah...);
    customerHome.create(c);Doesn't this look better and cleaner?
    Anyway, how does the EJB methods mapping works? Why do I call the method .create(...) in Home interface and in the Bean implementation I've .ejbCreate(...) method instead?
    What about the rest, say ejbLoad(), ejbStore, ejbRemove()? Just strip all the "ejb" infront and call them .store(), .load(), .remove() in Home interface?
    Also, why do only .create(..) appear in Home interface itself? Are the rest (.store(), .load(), .remove())inherited and therefore not have to be specified?

  • Forms: object and process

    We have two kind of forms. Object and process.
    An object form is associated with a resource and a process form is associated with a process.
    But, I still have a few doubts.
    But what is the difference between them in functionality point of view. Where exactly does process form come into picture. Can we display it?
    Where should we use which form?

    Each resource has an associated object and process form.
    Object form is basically used when requesting a resource for provisioning for accepting data from user. Now before provisioning activity gets triggered, this data is passed to process form to execute provisioning tasks. The data flow/mapping between object and process form is done thr' Data Sink tab in process definition.
    The permissions for both object and process form can be set in Form Designer->Object permissions tab.
    Besides, the process form data can be "editted" for re-try process tasks that have failed/rejected.
    Note: you can also have data pre-populated in process form thr' access policies. The same holds true for object form but having data pre-populated in process form makes more sense. This holds good when having provisioning of resources being triggered thr' role based access policies.

  • How can I call a COM object from a PL/SQL CODE

    Hi everyone,
    Does anyone know how to call a COM object from a stored procedure in oracle.
    a sample of code
    please help,
    Hilaire

    Are you familiar with external procedures? Basically, you can expose functions exported by a shared library (i.e. a DLL on Windows) to the Oracle database. My assumption is that you'd probably need to write a wrapper DLL around the COM object, since I believe you can only pass fundamental data types back and forth (i.e. no object references). You'd expose the method(s) of that wrapper DLL to the database via external procedures.
    Justin
    Distributed Database Consulting, Inc.
    www.ddbcinc.com/askDDBC

  • Getting error while passing implicit request object from JSP to JavaBean

    Hi,
    I am getting error while passing implicit object ie( request object)
    from within JSP to JavaBean.
    Following is source for JSP, JavaBean and Error message I am getting.
    vaLookup.jsp Source
    <jsp:useBean id="db" class="advisorinsight.javabeans.DisplayPages"
    scope="request">
    <jsp:setProperty name="db" property="request" value="<%= request %>"
    />
    </jsp:useBean>
    <jsp:getProperty name="db" property="totalrecords" />
    JAVABEAN DisplayPages.java source
    package javabeans;
    import java.io.Serializable;
    import javax.servlet.http.HttpServletRequest;
    public final class DisplayPages implements Serializable {
    private String totalrecords;
    private HttpServletRequest request;
    public void setRequest(HttpServletRequest req){
    this.request = req;
    public java.lang.String getTotalrecords()
    this.totalrecords =
    this.request.getParameter("totalrecords");
    return this.totalrecords;
    public DisplayPages(){
    totalrecords = "";
    request = null;
    error after executing vaLookup.jsp
    [30/Nov/2001 11:56:04:5] info: EXTMGR-006: GXExtensionManager: Extension
    service JavaExtData successfully loaded
    [30/Nov/2001 11:56:04:5] info: EXTMGR-006: GXExtensionManager: Extension
    service LockManager successfully loaded
    [30/Nov/2001 11:56:04:5] info: EXTMGR-006: GXExtensionManager: Extension
    service RLOPManager successfully loaded
    [30/Nov/2001 11:56:04:5] info: REQ-012: thread add
    [30/Nov/2001 11:56:04:5] info: REQ-012: thread add
    [30/Nov/2001 11:56:04:5] info: REQ-012: thread add
    [30/Nov/2001 11:56:04:5] info: REQ-012: thread add
    [30/Nov/2001 11:56:04:5] info: REQ-012: thread add
    [30/Nov/2001 11:56:04:5] info: REQ-012: thread add
    [30/Nov/2001 11:56:04:5] info: REQ-012: thread add
    [30/Nov/2001 11:56:04:5] info: REQ-012: thread add
    [30/Nov/2001 11:56:04:7] info: ENGINE-ready: ready: 10819
    [30/Nov/2001 11:56:46:0] info: --------------------------------------
    [30/Nov/2001 11:56:46:0] info: JSPRunnerSticky: init
    [30/Nov/2001 11:56:46:0] info: --------------------------------------
    [30/Nov/2001 11:56:51:7] error: Exception: SERVLET-compile_failed:
    Failed in compiling template: /va/valookup.jsp, javac error:
    c:\iplanet\ias6\ias\APPS\variabl
    S\va\valookup.java:76: Undefined variable: JSP_8
    db.setRequest(_JSP__8);
    ^
    1 error
    Exception Stack Trace:
    java.lang.Exception: javac error:
    c:\iplanet\ias6\ias\APPS\variableannuity\va\WEB-INF\compiled_jsp\jsp\APPS\va\valookup.java:76:
    Undefined variable: JSP_8
    db.setRequest(_JSP__8);
    ^
    1 error
    at
    com.netscape.server.servlet.jsp.JSPCompiler.compileJSP(Unknown Source)
    at
    com.netscape.server.servlet.jsp.JSPCompiler.compileOrLoadJSP(Unknown
    Source)
    at
    com.netscape.server.servlet.jsp.JSPCompiler.compileInstance(Unknown
    Source)
    at
    com.netscape.server.servlet.jsp.JSPCompiler.compileInstance(Unknown
    Source)
    at
    com.netscape.server.servlet.platformhttp.PlatformHttpServletResponse.callJspCompiler(Unknown
    Source)
    at
    com.netscape.server.servlet.platformhttp.PlatformHttpServletResponse.callUri(Unknown
    Source)
    at
    com.netscape.server.servlet.platformhttp.PlatformHttpServletResponse.callUriRestrictOutput(Unknown
    Source)
    at
    com.netscape.server.servlet.platformhttp.PlatformRequestDispatcher.forward(Unknown
    Source)
    at com.netscape.server.servlet.jsp.JSPRunner.service(Unknown
    Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
    at
    com.netscape.server.servlet.servletrunner.ServletInfo.service(Unknown
    Source)
    at
    com.netscape.server.servlet.servletrunner.ServletRunner.execute(Unknown
    Source)
    at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
    at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
    at com.kivasoft.thread.ThreadBasic.run(Native Method)
    at java.lang.Thread.run(Thread.java:479)

    The only thing that I see that looks funny to me is when you pass the request object into the method using <%=request%>, Im not sure whats going to happen here because that is suppose to print the results. Have you tried simply using <%request%>?

  • XSLT - How to pass a Java object to the xslt file ?

    Hi ,
    I need help in , How to pass a java object to xslt file.
    I am using javax.xml.transform.Tranformer class to for the xsl tranformation. I need to pass a java object eg
    Class Employee {
    private String name;
    private int empId;
    public String getName() {
    return this.name;
    public String getEmpId() {
    return this.empId;
    public String setName(String name) {
    this.name = name;
    public String setEmpId(int empId){
    this.empId = empId;
    How can i access this complete object in the xsl file ? is there any way i can pass custom objects to xsl using Transformer class ?

    This is elementary. Did you ask google ? http://www.google.com/search?q=calling+java+from+xsl
    ram.

  • How to pass arraylist of object from action class to jsp and display in jsp

    I need to do the following using struts
    I have input jsp, action class and action form associated to that. In the action class I will generate the sql based on the input from jsp page/action form, create a result set. The result set is stored as java objects in a ArrayList object.
    Now I need to pass the arraylist object to another jsp to display. Can I put the ArrayList object in the request object and pass to the success page defined for the action? If this approach is not apprpriate, please let me know correct approach.
    if this method is okay, how can I access the objects from arraylist in jsp and display their property in jsp. This java object is a java bean ( getter and setter methods on it).
    ( need jsp code)
    Can I do like this:
    <% ArrayList objList = (ArrayList)request.getattribute("lookupdata"): %> in jsp
    (***I have done request.setattribute("lookupdata", arraylistobj); in action class. ***)
    Assuming the java object has two properties, can I do the following
    <% for (iint i=0. i<objList.size;I++){ %>
    <td> what should i do here to get the first property of the object </td>
    <td> what should i do here to get the first property of the object </td>
    <% }
    %>
    if this approach is not proper, how can I pass the list of objects and parse in jsp?
    I am not sure what will be the name of the object. I can find out how many are there but i am not sure I can find out the name
    thanks a lot

    Double post:
    http://forum.java.sun.com/thread.jspa?threadID=5233144&tstart=0

  • Flash Player 10.0.32.18 - COM object dereference error.

    Hi!
    One of my users have reported about strange issue with Flash Player 10.0.32.18l. With IE8 under Vista/W7 he discovered unclosed FlashUtil10c.exe process instances. After my investigation, it became absolutely clear that the issue is caused by the Adobe programmers who forgot to decrease references for the internal COM objects of the FlashUtil10c.exe process. Hope, you will fix the issue up soon. If you need an additional information- feel free to contact me.

    During a browsing session, hundreds of unclosed FlashUtil10c.exe processes can appear in task manager due to this Adobe error in 10.0.32.18.
    Adobe correction is needed.

  • Passing a Flex object to CFC

    I have no problem passing a query object to my Flex app and
    use it to populate a datagrid (arraycollection).... however, I want
    to use this same data to update the database when the user clicks
    on save, and instead of looping through each row (calling my
    remoteobject each time) is there a way I can format this
    information into an array, array collection or some other form of
    flex object and pass ti back to another cfc function to do the
    update?????
    I've read elsewhere that its possible to do with a
    remoteobject, however, my attempts were futile and I cannot find an
    example anywhere.
    I cant find a solution anywhere so and help would be
    appreciated.

    Here is a simple example I just wrote real quick. This is how
    I normally go about passing something an array of items to
    Coldfusion. Hope this helps.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute">
    <mx:Script>
    <![CDATA[
    import mx.controls.Alert;
    import mx.managers.CursorManager;
    import mx.rpc.events.ResultEvent;
    import mx.rpc.events.FaultEvent;
    [Bindable] private var apples:Array = new Array(
    {name:"Normal Apple", color:"Red"},
    {name:"Sweet Apple", color:"Ged"},
    {name:"Rotten Apple", color:"Brown"});
    private function createApples():void {
    AppleManager.Create_Apples(apples);
    private function createApplesResult(event:ResultEvent):void
    Alert.show("You have successfully added some apples into our
    system.", "System Notice");
    ]]>
    </mx:Script>
    <mx:RemoteObject
    id="AppleManager"
    destination="ColdFusion"
    source="cfc.AppleManager"
    endpoint="Your endpoint here"
    showBusyCursor="true"
    fault="CursorManager.removeBusyCursor();Alert.show(event.fault.message,
    'System Notice')">
    <mx:method name="Create_Apples"
    result="createApplesResult(event)"/>
    </mx:RemoteObject>
    <mx:Button x="10" y="10" label="Create Apples"
    click="createApples()"/>
    <mx:DataGrid left="10" right="10" top="40" bottom="10"
    dataProvider="{apples}">
    <mx:columns>
    <mx:DataGridColumn headerText="Apple Name"
    dataField="name"/>
    <mx:DataGridColumn headerText="Apple Color"
    dataField="color"/>
    </mx:columns>
    </mx:DataGrid>
    </mx:Application>

  • Help with windows Prcesses  - using "com.jniwrapper.win32.process.Process"

    Hi everybody,
    I'm trying to get a list of running processes, and for each process I need its Process ID, Process Name, and the command line that run this process.
    I found a way to get everything but the command-line, by JNI wrappers (below are links to their documentation).
    com.jniwrapper.win32.process.CurrentProcess (has the method - getCOmmanLine() ) :
    http://www.teamdev.com/downloads/jniwrapper/winpack/javadoc/com/jniwrapper/win32/process/Process.html -
    com.jniwrapper.win32.process.Process
    http://www.teamdev.com/downloads/jniwrapper/winpack/javadoc/com/jniwrapper/win32/process/Process.html
    I wrote the following code :
    String a, b;
    List processes = Process.getProcesses();
    for (int i = 0; i < processes.size(); i++) {
    Process process = (Process)processes.get(i);
    a = "process: FileName = " process.getProcessImageFileName();
    b = "id = " process.getProcessID();
    But I need to create an object of "CurrentProcess" (that extends Process class) in order to get the command-line. However, this class only has an empty constructor:
    CurrentProcess() - Creates an instance that corresponds to currently running process.
    and I don't understand what does "corresponds to currently running process" means (Cause there are many running processes) , and how to use it in my code.
    I would appreciate you help very much!
    Thanks,
    Nofar.
    Edited by: Nofarb on Jul 11, 2010 2:38 AM
    Edited by: Nofarb on Jul 11, 2010 2:41 AM

    I'm trying that as well, :)
    I was hoping maybe one of you have some experience with that.
    Thanks anyway.

Maybe you are looking for