How to obtain SPRuntime pointer?

Hi,
In Adobe Dialog Manager documentation there is such code snippet:
SPErr error = kSPNoError;
SPHostProcs *gHostProcs;
error = sSPRuntime->GetRuntimeHostProcs(&gHostProcs);
if (!error)
gHostProcs->startupNotify(kSetMessage,
(void*)"Initializing QuickDraw 3d", gHostProcs->hostData);
What is the way from plugin code to obtain that sSPRuntime pointer?

jschell, thanks for your suggestions.
And caching the second is definitely wrong. Arguments are passed as local references. The reference lifetime is only guaranteed for the lifetime of the method call.In my case, it just works, because my "callback" is only called before the "handleMessageQ" returns, which means it's within the lifetime of "jobject", etc.
Use GetEnv to get the environment.Could you please provide some sample codes?
Create a static java method which returns the object reference. In your callback call that method to get the reference that you want to work with. I didn't really understand. Could you please show me some sample codes?
Thanks a lot!

Similar Messages

  • How to obtain JNIEnv pointer and jobject reference in arbitrary contexts?

    Hi,
    I need your hand. How to obtain JNIEnv pointer and jobject reference in arbitrary contexts? (See below source codes for details)
    I made some tries according to JNI spec, but still failed to get it work. Could you please provide your solutions? Better show me some source codes.
    Thank you very much !!!
    #include <jni.h>
    #include "MessageThread.h"
    #include "MyServer.h"
    // this is callback function called by the native C++ library
    void processEvent(int progress)
       in this function, i want to get "env", "obj" ( HOW? ),
       then i can do below to invoke Java function "updateUI":
       cls = env->GetObjectClass(obj);
       mid = env->GetMethodID(cls, "updateUI", "(I)V");
       env->CallVoidMethod(obj, mid, progress); 
    JNIEXPORT void JNICALL
    Java_MessageThread_handleMessageQ(JNIEnv *env, jobject obj)
      MyServer* server = MTMServer::Instance();
      if (server != NULL)
        // must register a callback function before "QueryProgress"
        server->RegisterCallback(processEvent);
        // query message within a loop, and callback "processEvent" frequently
        server->QueryProgress();
      return; 
    }

    jschell, thanks for your suggestions.
    And caching the second is definitely wrong. Arguments are passed as local references. The reference lifetime is only guaranteed for the lifetime of the method call.In my case, it just works, because my "callback" is only called before the "handleMessageQ" returns, which means it's within the lifetime of "jobject", etc.
    Use GetEnv to get the environment.Could you please provide some sample codes?
    Create a static java method which returns the object reference. In your callback call that method to get the reference that you want to work with. I didn't really understand. Could you please show me some sample codes?
    Thanks a lot!

  • How to obtain corner points of rotated rectangle?

    Am drawing a rectangle, then using an Affine Transform to rotate the angle. After rotating and drawing the rectangle, I need to obtain the 4 corner points of the rectangle. This is (psuedocode) for what I've tried:
    Rectangle r = new Rectangle (x, y, width, height);
    AffineTransform at = new AffineTransform();
    at.rotate (angleInDegrees*Math.PI/180);
    Shape s = at.createTransformedShape (r);
    PathIterator pi = s.getPathIterator(at);
    while (pi.isDone() == false)
    fetchCornerPoint (pi);
    pi.next();
    g2.draw(s);
    The shape is being correctly drawn on the screen, so I know the transofmr is working. But the path appears to contain the 4 corner points of the rectangle prior to rotation, not the 4 corner points after the rotation.
    It's got to be a "doh moment", but I can't see it.

    I notice you call getPathIterator on 's', which is already transformed. I have not verified this, but maybe you should call getPathIterator(at) on the original shape ('r')?

  • How to obtain coordinates of each point in a polygon?

    How can we obtain the coordinates of each point in a polygon (say 6 sides)?
    Using pageitemref I had used GetPathBoundingBox method of IGeometry to get a PMRect as follows:
    InterfacePtr<IGeometry> geometry(pageitemRef, UseDefaultIID());
    geometry->GetPathBoundingBox(::InnerToPasteboardMatrix(geometry));
    I am only able to get the leftTop, rightTop, etc. of the frame that contains the polygon.
    How to obtain the coordinates of each point in a polygon?

    Hi,
    you can use the IPathGeometry interface.
    Markus

  • How to obtain a case number for License transfer process

    How to obtain a case number for License transfer process.

    Good to know - Here you have the user-2-user forum for "Adobe Reader".
    For anything "License" related you will want to be using the "contact" feature to meander about until you can get a "licensing work group" point of contact.
    The path starts here:
    Contact Customer Care
    Be well...

  • A very simple question: how to obtain the mail server name?

    In our JSP application, at one point an email will be sent to notify one event. Currently, that is done by using the html tag: mailto. To have more control on the email in tems of context format (a bad layout right now) and others. I would like to have it processed at servlet by using the JavaMail API, so that it have a nice format and have the sender's email address right in case email client is not installed in the machine where the browser in. The JavaMail API is straight forward. The question is how to obtain the mail server name, and the sender's email address if there is one?
    Thanks.
    v.

    How to obtain the mail server's name? It's your server, you should know its name. Or if it isn't your server, you should ask the administrator for its name. Point is, you need to decide in advance what server you are going to use and hard-code its name into the program or into a properties file.
    And how to obtain the client's e-mail address? You have to ask the client, probably by putting a box in the HTML and asking them to type it.

  • How to obtain IProxy argument for LayoutControllerFactory.getLayoutControll

    I am trying to create LayoutController from LayoutControllerFactory.getLayoutController(IProxy proxy, IResource resource)
    I don't know where and how to obtain or create Proxy object for first argument
    Thanx for any help

    thanx for advice but ...
    // IProxy WdfStatusRemoveEvent.getProxy()
    you must have IProxy, if you want to create WdfStatusRemoveEvent (to call its constructor)
    // IProxy LayoutObject.getProxy()
    i have created LayoutObject by calling his constructor, but method getProxy() returns null
    // IProxy IProxy.getTargetControl()
    it's not static method and if i had an instance of IProxy, i wouldn't ask how to create it
    // protected IProxy LightCollectionRenderer.getProxy()
    also returns null
    // IProxy IComponent.getProxy()
    ComponentFactory requires IProxy to create IComponent ... if i had one, i wouldn't ask how to create it
    // IProxy IProxyDetailsProperty.getProxy()
    i don't know how to create it
    I also tried to implement AbstractLayoutControler, but it also returned null by calling this.getProxy() method
    I tried following example https://www.sdn.sap.com/irj/sdn/thread?threadID=7602
    it has failed on null pointer exception on this line
    IComponent component = ComponentFactory.getInstance().getComponent("ResourcePath", getProxy());
    becouse getProxy() returns null
    They say IProxy is base interface to use Flexible UI. Perhaps they could spend a word about how to create it
    All i wanna do is to display content of  ICollection object on iview using Flexible UI by simplest possible way
    I don't wanna implement anything till it's not necessary
    I just wanna use predefined layouts and components to display it
    i'm trying to write something like this, but may be i'm completly wrong:
    public void doProcessBeforeOutput() throws PageException  {
         Form myForm = this.getForm();
         IResourceContext resourceContext = new ResourceContext(null);
         URI uri = new URI("/");
         IResource res = ResourceFactory.getInstance().getResource(uri,resourceContext);
         ICollection col = (ICollection)res;
         ICollectionRenderer cr = CollectionRendererFactory.getInstance().getCollectionRenderer(<missing IProxy>, col, IFlavorConst.FLAVOR_LIST);
         myForm.addComponent(cr.renderAll());
    but i still don't know what to use instead of <missing IProxy>

  • Lost computer password.  How to obtain?

    How to obtain lost password for computer?

    Forgot Your Account Password
    For Lion/Mountain Lion
        Boot to the Recovery HD:
    Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
         When the menubar appears select Terminal from the Utilities menu.
         Enter resetpassword at the prompt and press RETURN. Follow
         instructions in the dialog window that will appear.
         Or see Reset a Mac OS X 10.7 Lion Password, OS X Mountain Lion- Reset a login password, and
         OS X Lion- Apple ID can be used to reset your user account password.
    For Snow Leopard and earlier with installer DVD
         Mac OS X 10.6- If you forget your administrator password
    For Snow Leopard and earlier without installer DVD
        How to reset your Mac OS X password without an installer disc | MacYourself

  • How to determine a point(or a path)  inside a closed path?

    I came across such a problem:
          My client requires add a number marks inside a closed path ,and such a closed path is irregular,
    My question is, how to ensure a point(or a path) is inside another closed path,and how to calculate this point?
    Is there any suite in the SDK to accomplish this function?

    haha ,I found a good way to solve this problem,We can use AIPathfinderSuite::DoFrontMinusBackEffect  to determine  whether a path  inside another closed path.

  • How to obtain date of creation if image is obtained using getImage()

    When Image is obtained using getImage() method , how to
    obtain date of creation or another header value if image is
    obtained using getImage method.

    Actually, some formats do indeed have creation or modification dates built in. e.g. http://www.w3.org/TR/PNG-Chunks.html#C.tIME. (Of course since most programs save a new copy of the file every time, the two dates are the same.) However, just because formats have this data doesn't mean it's reliable or even present. Your best bet is to pass creation dates in an Applet param tag for applets (assuming you were referring to Applet.getImage()) or to parse out a filename from a classloader URL and use a File object to check (assuming you were instead referring to Toolkit.getImage(URL)). That's the best answer I have without knowing more about what you are trying to accomplish.

  • How to obtain the license for the mentioned products.

    Hi All,
    Please help me in below licensing issues.
    1) Our functional team got the below error while accessing "Job Scheduling Workbench".
    Error: The Workbench is inaccessible because Oracle Manufacturing Scheduling has not been licensed. Please work with your Account Manger to purchase the license.
    2) Another error message while accessing the navigation Flow Manufacturing --> Product Sync --> Flow Routings
    Error: APP-BOM 20972: You cannot access this form
    Cause: You do not have a license for Oracle Flow Manufacturing.
    Action: Obtain a license for Oracle Flow Manufacturing.
    Please guide me how to obtain the license for the above products.
    Environment: eBS R12.1.3 on Linux 5.8
    Regards,
    Siva

    Thanks for providing the document. I follow the document and get back to you for any issues.
    Regards,
    Siva.

  • How to obtain the timestamp of a schedule for which I get the details?

    Please find below the extract from documentation showing the syntax of XML returned by the Web Services call. What is missing for me, is the timestamp. I wonder if you guys encountered this and have any idea how to obtain this (timestamp) information about the schedule via RESTFUL web services ?
    <schedule>
    <id>9439</id>
    <name>GC-now-schedule</name>
    <format type="webi"/>
    <status>Completed</status>
    </schedule>

    Hi Jacek,
    There is also the BIPlatform .Net SDK, the Java SDK and the SOAP DSWS web services which have both Java and .NET consumers.
    you can find various samples for common workflows here: http://scn.sap.com/docs/DOC-51445
    that may help.

  • How many Multi-Touch points can an iPhone/iPod touch have at the same time?

    How many Multi-Touch points can an iPhone/iPod touch/iPad have at the same time?
    I am curious as IIRC (but forgot where the article is on the Internet),
    if a touch surface is wanted to be able to detect more than 1 touch point at the same time,
    then that touch surface needs adding 1 more conductive(?) layer.
    (e.g. 2 points -> 2 layers, and so on)
    So I wonder how many these layers are on the iPhone / iPod touch / iPad or even the trackpad on every MacBook (Pro).
    (correct me if I'm wrong)
    Just curious, thanks in advance!

    I believe it can only support 2. This article explains how the touch screen works but doesn't explicitly say how many points is supports.
    http://electronics.howstuffworks.com/iphone1.htm

  • How to create restore point in windows server 2008 service pack1

    hi i am bhaskar ... how to create restore point in windows server 2008 service pack1 and how to restore system from a restore point in windows server 2008 service pack1.. is this option available or not ? what is the difference between shadow copies and
    restore point ? instead of restore point we have this shadow copies option in windows server 2008 ?Bhaskar

    AFIK, Restore Points doesn’t exist in Windows 2008.
    Volume Shadow Copy option can be used to achieve:
    Creating consistent backups of open files and applications
    Creating shadow copies for shared folders
    Creating transportable shadow copies using a hardware provider — for backup, testing and data mining scenarios
    Quickly recovering and restoring files and data
    It is more like a file, data, application backup. 
    Santhosh Sivarajan | MCTS, MCSE (W2K3/W2K/NT4), MCSA (W2K3/W2K/MSG), CCNA, Network+ Houston, TX
    Blogs - http://blogs.sivarajan.com/
    Articles - http://www.sivarajan.com/publications.html
    Twitter: @santhosh_sivara - http://twitter.com/santhosh_sivara
    This posting is provided AS IS with no warranties, and confers no rights.

  • Topic: How to obtain entity manager in application server?

    Hey,
    How to obtain Entity manger in application server ?
    The class is a simple class (no Ejb), and i can call to this class from Ejb or from inner schdeuler process (not container management)
    I want that if i call to this calss from Ejb , that the entity manager transaction will join to the global transaction.
    Thank you

    Hi,
    entity managers outside EJBs can be created using a javax.persistence.EntityManagerFactory.
    Regards

Maybe you are looking for

  • SSD cache on windows 8.1

    Hi, I do have windows 8.1 update 1 on my lenovo thinkpad edge e540 (20C6003QMC) which has 16GB SSD cache and I'd like to ask since express cache is not supported on windows 8.x how can i get it working? Thanks

  • Can't edit in Chart Data Editor

    I am trying to make a pie chart and I cannot edit the data in the data editor once I get the chart on the working page. Double clicking in the data editor does nothing. The slider bars can't be moved. I can't move the data editor window but the rest

  • Sync Problem with Blu Ray

    I have a sync problem when using Premiere Pro CS5 to burn Blu Ray DVDs and wondered if anyone has had similar problems and has found a simple solution.  Equipment:  Panasonic HMC-150 (AVCHD), shot at 59.94 fps, 720.  MacPro with operating system up t

  • Call multiple fuction....

    Hello all, I have created two function which I attached below... Function 1: CREATE OR REPLACE FUNCTION INV_NO_F (F_NAME IN VARCHAR2) RETURN VARCHAR2 is inv_no VARCHAR2 (255); BEGIN select FILE_NAME into inv_no from fnd_lobs where FILE_NAME=F_NAME; i

  • Would this speed things up even more?

    I recently upgraded to the ATI video card on my Mac Pro, and as indicated by many others on this forum it REALLY helped. In fact, it's made a huge difference and now I think I'll purchase Aperture. Now, I've got the original stock graphics card left-