Call the static method from Acrobat to c#

I have a static function of C++ and I want to call this function from c# code (it's a button_click event). I tried to export this function by creating its DLL, but it does not work. My C++ function looks like this: static ACCB1 Sub ACCB2 HighlightWord(void *data). Please give some advice?

When you say "expose plugin methods c# in a standardized manner", it means the plugin itself must be built as COM, so that its methods are exposed?

If so why do I need to expose COM plugin together when I need to call only one method of plugin? Please specify.

In addition, the project plugin C++ is unmanaged code. A wrapper around plugin is necessary, so that it can be exposed to c#. My understanding is correct?

Tags: Acrobat

Similar Questions

  • Why not use the static methods - example

    Hello world

    I would like to continue the below thread about "why not use static methods.
    Why not use the static methods
    with the concrete example.

    In my small application, I need to be able to send keystrokes. (java.awt.Robot class is used for this)
    I created the following class for these "operations" with static methods:
    public class KeyboardInput {
    
         private static Robot r;
         static {
              try {
                   r = new Robot();
              } catch (AWTException e) {
                   throw new RuntimeException(e + "Robot couldn't be initialized.");
              }
         }
         
         public static void wait(int millis){
              r.delay(millis);
         }
         
         public static void copy() {
              r.keyPress(KeyEvent.VK_CONTROL);
              r.keyPress(KeyEvent.VK_C);
              r.keyRelease(KeyEvent.VK_C);
              r.keyRelease(KeyEvent.VK_CONTROL);
         }
    
         public static void altTab() {
              r.keyPress(KeyEvent.VK_ALT);
              r.keyPress(KeyEvent.VK_TAB);
              r.keyRelease(KeyEvent.VK_TAB);
              r.keyRelease(KeyEvent.VK_ALT);
         }
    
                   // more methods like  paste(), tab(), shiftTab(), rightArrow()
    }
    You think it's a good solution? How could it be improved? I saw something Singleton vs somewhere of static methods. Wouldn't be better to use Singleton?

    Thanks for your comments in advance.
    lemonboston

    maheshguruswamy wrote:

    lemonboston wrote:

    maheshguruswamy wrote:
    I think a singleton might be a better approach for you. Just kill the public constructor, and provide a getInstance method to provide late initialization.

    Maheshguruswamy thanks for the tips on the steps create a singleton of this class.
    Perhaps you could say also why do you say that it would be preferable to use singleton? What is behind it? Thank you!

    In short, it seems to me that a single instance of your class will be able to coordinate actions across your entire application. If a singleton should be sufficient.

    But who doesn't answer why he expected prefer a singleton instead of a bunch of static methods. Functionally, the two are almost identical. In both cases, there is that a single 'thing' to call methods - either a single instance of the class or the class itself.

    To answer the question, the main reason to use a Singleton on a class of static methods is the same reason readers much of not static vs static decisions: polymorphism.

    If you use a Singleton (and and interface), you can do something like this:

    KeyboardInput kbi = get_some_instance_of_some_class_that_implements_KeyboardInput_somehow_maybe_from_a_factory();
    

    And then everything calling public methods of KBI has to know that there an implementor of this interface, without worrying about what concrete class is, and you can replace some implementation is appropriate in a given context. If you do not need to do, then the approach of the static method is probably enough.

    There are other reasons that may suggest a Singleton - serialization, persistence, use as a JavaBean pop to mind - but they are less frequent and less convincing in my experience.

    And finally, if this thing keeps updated a State between method calls, even if you can manage it with static member variables, it is more in line with the OO paradigm to make them non-static fields of an instance of this class.

  • What is the best way to call the Java method in JSP in weblogic 10.3

    Hello

    What is the best way to call the Java method in JSP in weblogic 10.3?

    Thank you for your help in advance.

    Thank you
    Manu

    Hello Manu,

    If I understand your question, all you need to do is import the Java class you want to create / obtain an instance of it (if you're not calling a static method), then call the method, the entire interior of the JSP. It works the same way in Weblogic that it works in any JSP.

    Kevin

  • BrowserField IllegalStateException to call the RequestContent method

    Hello world.

    I'm IllegalStateException when you try to view another page HTML on my BrowserField. This happens when BrowserField Manager calls the removeField() method.

    The paper said: to remove is field with focus - index: 0 - fieldDebugTree: net.rim.device.api.ui.component.NullField (0, 0) + (0, 0) * home * \n - managerDebugTree: net.rim.device.api.browser.field2.BrowserField (0, 0) + (480, 70) [480, 70] \n net.rim.device.api.ui.component.NullField (0, 0) + (0, 0) \n

    Everyone knows that kind of problem before?

    Thanks before.

    Never mind. I found the solution to this problem after doing some more research on this forum.

    Here is the link to the post with the solution: http://supportforums.blackberry.com/t5/Java-Development/BrowserField-refresh-throwing-IllegalStateEx...

  • Call the java method lunch application

    Hello

    I use JDev 12.1.3 with MAF, I want to call the java method of the project ViewController lunch application, how can I do this?

    Thank you

    Hello

    Can you explain usecase? What features do you need perform the start-up of the application?

    You can run java code in an application LifeCycleListener - https://docs.oracle.com/middleware/maf210/mobile/develop-maf/maf-apps-register-listeners.htm#ADFMF25120

  • Connector WFD SDK - how to call the server method?

    I use the FMS connector C++ to perform editing work. And I am obliged to call a method side server.

    I tried to use the INetConnection::call () method, but it seems to be successful.


    The specification of the server FMS told me to do,

    1. call the server method,

    NC. Call (streamname, null, "FCPublish");


    2. implement a callback function onFCPublsih

    nc.onFCPublish = function (info) {...}

    How can I implement the latter with FMS Connector C++?

    The FMS connector document include a subject too little on the method call server-side.

    WFD SDK connector, the netconnection call prototype looks like this.

    virtual bool call (const char * funcName, const unsigned char * arguments, unsigned size, OnResultHandler * result) = 0;

    Thus, you will have to serialize the arguments and then pass it to call the function.

    Check

    bool FMSCTester::testCall (const char * cmd, const char * arg)

    method in FMSCTester sample application that comes with the software development kit how to serialize and call the function.

    For Server callbacks, you have to implement a netconnection sink with the onCommand method is called when the server calls a method on the client.

    The onCommand prototype looks like this,

    onCommand Sub (const char * cmd, const unsigned char * arguments, unsigned bufLen, IRetValue * retVal)

    again, you can check the MyNCSink class in the FMSCTester sample project for an implementation of onCommand.

  • Call the function QML from C++ (simple question)

    I guess that's a pretty easy question but I'm a bit new apart from development c ++ of BB10. I have a QML file in the assets folder called Functions.qml which has only onne inside functions.

    import bb.cascades 1.3
    
    Page {
        objectName: "funct"
        function printStat() {
            console.log("hello");
        }
    }
    

    In one of the functions in applicationui.cpp there is a function called resendNotification() (you may know this code from the model of the app without head)

    void ApplicationUI::resendNotification()
    {
        InvokeRequest request;
        request.setTarget("com.example.TestNotificationService");
        request.setAction("com.example.TestNotificationService.RESET");
        m_invokeManager->invoke(request);    // --> call the printStat() function of Functions.qml file
        Application::instance()->minimize();
    }
    

    My question is, before you minimize the app How can I call the function printStat() of the qml file? I have always developed my apps in QML so never had to deal with c ++. Should be easy enough to call a function well.

    Thank you in advance!

    first step is to find the object by ObjectName using findChild, usually from your element root (navigationPane).
    example:
    NAV-> findChild ("myTextField")

    If you have the object of another source that is fine too, of course.

    second step is to use QMetaObject::invokeMethod with the object and the name of the method.
    Example:
    QMetaObject::invokeMethod (container, "setText", Q_ARG (QVariant, text));

  • Why not use the static methods

    Hello world

    I was informed in a previous thread to avoid using static methods it was possible.
    Why is it, could someone please tell me a little more about this? Are there best practices, concepts on this?

    Thanks in advance,
    lemonboston

    Hi Lemonbottom,

    The rule I used generally goes like this:

    If the method does something that I can use without the object containing it instantiate, then it can be made public static.

    In the previous examples, I had various foods. Apple might have a method called "getCaloricContent" that returns the number of calories in an Apple. I don't need an actual Apple to get this information, so I do static. However, if I want to Breathe() an Apple, then I need to build an Apple to do this, so static would not be appropriate.

    It is a loose guidance to help you get started. Try to avoid as much as possible of static methods. They add an extra dimension (often unwanted) to unit tests. It's not so say it is not a proper use of static methods.

    Once you've got your head around this concept, consider the model Singleton, who, in most cases, eliminates the need for static methods of learning.

    Kind regards
    Robb Salzmann

  • How the static methods are mocked in any mocking framework JMockit?

    I've learned that we can mock static methods using Basic with PowerMock java library? Jmockit.Want to understand how it does in short in-house?

    I think I understand:-as we define the mock class in the test case itself (although there are different ways to create the mock class in each frame as using a syntax of waiting in Jmockit), these framework must define custom classes thru Chargers that they should be looking for this class definition in the unit test is. Its an assumption. Not sure if this is correct? But even if I'm right, preference of classloader hirerchy is boootstraploader then applicationclassloader than customerclassloader. So, how's that search for customerclassloader instead of applicationclassloader? is there a way that we can set the preference of the customer above on applicationclassloader class loader?

    You can tell your not custom class loaders to delegate to its parent.

    Or you can give the custom class loaders a different classpath from its parent and place classes to be loaded by the loader custom only on the way to his class, and on the parent.

  • reference not valid error 1026 to the runVI call the hand method exe-> slot - VI-> secondary

    Hello

    I have a main VI who Subvi inside case structures put in place to show FP when called and be modal.

    These subVIs have a secondary that will pull up a call using RunVI method dynamicVI. The dymaicVIs is built using the constant application directory + name of VI to the invoke method.

    now the main VI is built in exe with the dynamicVIs in the list always included.

    When I run the main exe I get error 1026 VI reference invalid.

    Help, please

    Thank you

    Choose the layout of the 8.X file will change the path that your screw referenced are when you build your executable file.

    http://zone.NI.com/reference/en-XX/help/371361K-01/lvconcepts/referencing_files_in_applications/

    If you choose this option of layout, you adress just the vi you are calling where having the option deselected will mimic your file structure layout it is developing.

  • Matter of business for OSB 10.3.1 when to call the web service from SAP ECC 710

    Hello

    1. I was a unit test for a business service that calls a web service from SAP ECC 710 (this service is published directly to a RFC function via SOA Manager module);

    2. the problem is when I use the OSB test console, which generates the request below message:

    < soapenv:Envelope = "http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenv >
    * < soap: Header xmlns:soap = 'http://schemas.xmlsoap.org/soap/envelope/' > *.
    * < / soap: Header > *.
    < soapenv:Body >
    < xmlns:urn urn: Zmmjf503 = "urn: sap - com:document:sap:soap:functions:mc - style" >
    string of < ContractInfo > < / ContractInfo >
    < / urn: Zmmjf503 >
    < / soapenv:Body >
    < / soapenv:Envelope >

    the response message is:
    < SOAP - env:Envelope xmlns:soap - env = "http://schemas.xmlsoap.org/soap/envelope/" >
    < SOAP - env:Header >
    < n0:MessageID = "http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:n0 >
    UUID:4cbe5b84 - 474 c-9abe-e100-00000ad00164
    < / n0:MessageID >
    < n1:Action SOAP - env:mustUnderstand = "1" xmlns:n1 = "http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:soap - env = "http://schemas.xmlsoap.org/soap/envelope" / >
    < / soap - env:Header >
    < SOAP - env:Body / >
    < / soap - env:Envelope >


    Above the response indicates that the BS called SAP Web server successfully, but seems that the service did not get the request message.

    3. the Web service can be called successfully through SoapUI. and I checked the soapUI request message; and it can work if I just change the request:

    < soapenv:Envelope = "http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenv >
    * < soap: Header = "http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap > < / soap: Header > *.
    < soapenv:Body >
    < xmlns:urn urn: Zmmjf503 = "urn: sap - com:document:sap:soap:functions:mc - style" >
    string of < ContractInfo > < / ContractInfo >
    < / urn: Zmmjf503 >
    < / soapenv:Body >
    < / soapenv:Envelope >

    and I got the right answer:
    < SOAP - env:Envelope xmlns:soap - env = "http://schemas.xmlsoap.org/soap/envelope/" >
    < SOAP - env:Header / >
    < SOAP - env:Body >
    < n0:Zmmjf503Response xmlns:n0 = "urn: sap - com:document:sap:soap:functions:mc - style" >
    < Recmsg > <! [CDATA [<? xml version = "1.0" encoding = "utf-8"? > < DocumentResponse > < CONDITION > 0 < / STATE > < HTBH > < / HTBH > < MESSAGE > < / MESSAGE > < / DocumentResponse >]] > < / Recmsg >
    < / n0:Zmmjf503Response >
    < / soap - env:Body >
    < / soap - env:Envelope >

    4 it bother me, because the only difference between the above two request messages is the header (one contains a "newline"):
    ------------------------------------------------------------------------------------------------------------------------------
    * < soap: Header xmlns:soap = 'http://schemas.xmlsoap.org/soap/envelope/' > *.
    * < / soap: Header > *.
    -------------------------------------------------------------------------------------------------------------------------------
    VS
    --------------------------------------------------------------------------------------------------------------------------------------
    * < soap: Header = "http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap > < / soap: Header > *.
    ----------------------------------------------------------------------------------------------------------------------------------------

    5 I thought that the SOAP engine should ignore "carriage returns", seems this is a problem of SAP ECC710.

    Do you have someone having this problem? Thank you


    Concerning
    Wen

    Hello Wen,

    I tried to use exactly the same request (carriage return) to call the service through soapUI, and it does not work... just like BS OSB
    should I assume that it is a matter of SAP ECC?

    That same demand also doesn't SOAPUI so certainly it's an issue with SAP ECC. I doubt that SAP ECC is the treatment the carriage return as an end of file marker. Check with support.

    Kind regards
    Anuj

  • Call the new method? (simple question)

    Once the summary of the product label is in charge, I would call my setLabel method to set the value of the text of the label. This should be easy, but the parameters of the method are cases "e: Event" I was not able to do 'setLabel()' or ' setLabel (e: Event) "and addEventListener is not working either. HELP PLEASE!

    public function drawProductSummaryLabel() : void
      {
            // Create a holder that will contain the footer label.
            var productInfoHolder : Sprite = new Sprite();
           // Add the holder to the stage.
            addChild(productInfoHolder);   
       
       //Create font for the label
       var format1 : TextFormat = new TextFormat();
             format1.font = "DejaVu Sans";
        format1.color = 0x000000;
        format1.size = 12;
        format1.bold = true;
       
       productSummaryLabel.visible = true;
    //   productSummaryLabel.defaultTextFormat = format; // WHY DOES THIS NOT WORK???
       productSummaryLabel.autoSize = TextFieldAutoSize.LEFT;
       productSummaryLabel.wordWrap = true;
       productSummaryLabel.selectable = true;
       productSummaryLabel.alwaysShowSelection = true;
       productSummaryLabel.width = 846;
       productSummaryLabel.height = 80;
       productSummaryLabel.text = "loading text"; // Initial text before its replaced
       addChild(productSummaryLabel);
       
       trace("Step 9: Product text appears now.");
       
       // Add xml data in label
       productSummaryLabel.addEventListener(Event.COMPLETE, setLabel); // THIS HAS NO EFFECT!!
       
       // Create the button
       var button : Sprite = new Sprite();
        
        // Disable the mouse events of all the objects within the button.
             button.mouseChildren = false;
             // Make the sprite behave as a button.
             button.buttonMode = true;
     
        // Create an original state for the button.
             var originalState : Sprite = new Sprite();
       originalState.graphics.beginFill(0xFFFFFF);
       // Follows format of: x, y, width, height
       originalState.graphics.drawRect(0, 0, 846, 80); // Apparently roundRect is possible!!!
       originalState.alpha = 0.5;
             originalState.name = "original";
             // Create a hovering state for the button. 
             var hover : Sprite = new Sprite();
       hover.graphics.beginFill(0xCCCCCC);
       hover.graphics.drawRect(0, 0, 846, 80);
       hover.name = "hover";
             // Add the states to the button as well as the label.
             button.addChild(originalState);
             button.addChild(hover);
             button.addChild(productSummaryLabel);    
             // Position the text to the center of the box
             productSummaryLabel.x = (button.height/2) - (productSummaryLabel.height/2); // footerLabel.x = button.x for left align.
             productSummaryLabel.y = (button.height/2) - (productSummaryLabel.height/2); // Center align looks better than left align!
       
             // Add mouse events to the button.
             button.addEventListener(MouseEvent.MOUSE_OVER, displayMouseOverState);
             button.addEventListener(MouseEvent.MOUSE_OUT, displayMouseOutState);
             button.addEventListener(MouseEvent.CLICK, displayMessage);
       
       // Add the button to the holder.
             productInfoHolder.addChild(button);
       
       // Postion The Menu.
            productInfoHolder.x = 80;
            productInfoHolder.y = 275;
       
       // Hide the over state of the button.
             hover.alpha = 0;
      }    
       
      
      private function setLabel(e : Event) : void
      {   
       // FOR EACH statement to say a summary should appear for each object once it is in the center
       // first start with simpler statement saying if no data then load
       trace("Set label value");
    
       for (var i: int = 0; i < numOfProducts; i++) // change this so it corresponds to necessary summary // Done in product info label i think
              {
    
        var myLoader : Loader = new Loader();
        var myRequest : URLRequest = new URLRequest(uebersicht[i]);
        myLoader.load(myRequest);
        
        var myNewText : String = e.target.loader as String; // or e.target.content.loader
    
        productSummaryLabel.text = myNewText;
      }
    (...)
      }
    
    

    > This should be easy, but the parameters of the method are "e: Event" I was not able to do 'setLabel()' or ' setLabel (e: Event).

    If you want to call a method without going to the event - add a null default value to the parameter as follows:

    private void setLabel(e:Event_=_null):void

    Then you can just make setLabel() and the compiler won't complain. And you can't do setLabel(e:Event) for a call, that makes no sense. You would need to make a new event to happen: setLabel (new Event ("someEventString")) but unless you have a specific reason to pass the event, the method is easier.

  • How to call the stored procedure from javascript? (Google suggest, AJAX)

    Hi I want to set up a text field so that it behaves like [Google Suggest | http://www.google.com/webhp?complete=1 & hl = en].

    I read this post .

    Now, I installed everything according to this document. But it simply doesn't. And I don't know why.

    I think that problems can fall into the following three categories:
    1. the text field and the page invoking the appropriate javascript?
    2 - is the JavaScript call the stored procedure?
    3. the stored procedure correctly returns the result formatted?

    I'm assertive for 1 and 3, but I'm not sure 2. Because I don't know how if a stored procedure has been called? Is there a PL/SQL statement that I can query in SQL * more?

    Also, I would like to know how to debug AJAX in the APEX. It involves a lot of things.

    Finally, I used APEX 3.2 and Oracle XE. I can't find file dads.conf or marvel.conf. Is ' / apex / "the virtual directory for APEX?

    Thank you very much!

    Buffalo,

    I managed to make it work on XE with APEX 3.2!
    It took more time than expected because my XE installation was still on an earlier version of the Apex and I had put it first...

    But that's what I did:
    -in the ac.js file, I changed the path ' / apex / "and I added the ac.js file to my candidacy as a static file. So as you did.
    -J' copied my request to the XE and copied my procedure on the schema that is related to my request
    -J' gave to run anonymous rights my procedure

    Now at first, it did not work...
    Then I suddenly remembered something: If you want to run a procedure through the pl/sql gateway in the XE, XE please how it is.
    Do you this by changing the APEX_030200.wwv_flow_epg_include_mod_local function!

    This is the code for the function changed for my example:

    CREATE OR REPLACE function APEX_030200.wwv_flow_epg_include_mod_local(
        procedure_name in varchar2)
    return boolean
    is
    begin
        --return false; -- remove this statement when you modify this function
        --
        -- Administrator note: the procedure_name input parameter may be in the format:
        --
        --    procedure
        --    schema.procedure
        --    package.procedure
        --    schema.package.procedure
        --
        -- If the expected input parameter is a procedure name only, the IN list code shown below
        -- can be modified to itemize the expected procedure names. Otherwise you must parse the
        -- procedure_name parameter and replace the simple code below with code that will evaluate
        -- all of the cases listed above.
        --
        if upper(procedure_name) in (
              'MATTHIASH.INCSEARCH') then
            return TRUE;
        else
            return FALSE;
        end if;
    end wwv_flow_epg_include_mod_local;
    /
    

    After that, the AJAX function worked as expected...

    HTH
    Matthias Hoys

    Published by: mhoys on August 13, 2009 15:24

  • VPN tunnel for initiation of the static method to the dynamic side

    Hello

    In the case of site to site VPN between static IP (ASA) and dynamic IP (Linksys AG241), would it be possible to open the VPN tunnel by the static side? How can I configure it? Could you please advice?

    Thank you very much

    Nitass

    Nitass, I'm sure that you can not start session with ASA, which is on the side of the VPN server.

  • Call the new method? (error: no response)

    Hello

    I just posted a message asking how to call a method of the constructor that has parameters e: Event. I checked by mistake this post as answered when in reality it is not. I was told I might add = null in the parameter of the function to make it work like this:

    public function ProductSummaryLabel() : void
      { 
       drawProductSummaryLabel();
       setLabel();
      }
    
    private function setLabel(e : Event = null) : void
      {
       var summaryLoader : Loader = new Loader();
       var summaryRequest : URLRequest = new URLRequest(uebersicht[0]);
       summaryRequest = new URLRequest(uebersicht[0]); // index
       summaryRequest.contentType = "text";
       summaryRequest.method = URLRequestMethod.GET;
    
    
      
        // Try to load the desired summary, if not possible then handle errors
        try 
        {
         summaryLoader.load(summaryRequest);
        } catch (error: ArgumentError) {
         trace("An Argument Error has occurred.");
        } catch (error: SecurityError) {
         trace("A Security Error has occurred.");
        } catch (error: Error) { 
         trace("An Error has occurred.");
        }
        
       myNewSummary = new String (e.target.data); // THIS THEN TARGETS A NULL OBJECT
       productSummaryLabel.text = myNewSummary;
        }
    

    The problem with this is that the line myNewSummary = new String (e.target.data) then no longer works. How can I solve this problem?

    As I answered in your other post, if you assign the defautl as a null value when you use the 'e', you need to check for null

    That is to say.

    If (null! = e)

    {

    myNewSummary = new String (e.target.data);

    }

    on the other

    {

    myNewSummary = "DEFAULT STRING";

    }

Maybe you are looking for