JVMTI ClassLoad callback function help

Hi, In my ClassLoad function I'm tyring to get the class name from the jclass that is passed to the function so that I would have something like this:
static void JNICALL
cbClassLoad(jvmtiEnv *jvmti, JNIEnv* jni, jthread thread, jclass klass)
    const char *class_name;
    class_name = (*jni)->GetClassName(&klass);
}Is something like this possible? I've been searching for a while but I can't find anything usefull.

GetClassSignature should do what you want:
http://java.sun.com/j2se/1.5.0/docs/guide/jvmti/jvmti.html#GetClassSignature

Similar Messages

  • How to create a callback function module

    Hi all,
    I am working in a requirement where we need to call a function module at a 'after change' event. So how to create a callback function module and register it with the crmvevent ?_
    I created a sample function module and try to create entries in table crmv_event_cust, but i got an error message saying that the function module name I provided is not in table CRMC_FUNC_ASSIGN. When I try to create entry there, I got a message that function module is not in CRMC_OBJ_FUNC and that table is a standard table with no maintanance options !!
    looks like i am going in wrong way ... can any one please help ??

    Looking at my system all you need to do is create the entry for the callback function in maint view: CRMV_FUNC_ASSIGN.
    Your entry should be as simple as Z-function name Object Function - <same as others in the segment you are assigning>
    IE for the partner it would be CRM_PARTNER as object function, for general order processing CRM_ORDER
    Take care,
    Stephen

  • Queue with callback function not dequeuing

    Hi,
    I would like to ask you for help or for a hint regarding our problem with the queue:
    A trigger is enqueuing to a queue. This works fine, but the callback function is never called. The queue already worked for a while, but since i changed something at the procedure called by the callback it does not work anymore.
    I already have tried the following:
    -Stopping and restarting
    -Dropping and recreating (with the scheduler having no jobs anymore)
    -Dropping, restarting the database and recreating
    None of these worked. Where do I fail, when considering that the queue with the same scripts worked already? I post the script for creating the queue and adding the subscriber:
    CREATE OR REPLACE TYPE pat_history_queue_payload_type AS OBJECT
    ( TSTAMP VARCHAR2(22 CHAR),
    TYP VARCHAR2(10 CHAR),
    DELTA_MENGE NUMBER,
    ORIGIN VARCHAR2(1 CHAR),
    TEXT VARCHAR2(1000 CHAR),
    QL_TSTAMP VARCHAR2(22 CHAR)
    BEGIN
    DBMS_AQADM.CREATE_QUEUE_TABLE (
    queue_table => 'pat_history_queue_table',
    queue_payload_type => 'pat_history_queue_payload_type',
    multiple_consumers => TRUE
    END;
    BEGIN
    DBMS_AQADM.CREATE_QUEUE (
    queue_name => 'pat_history_queue',
    queue_table => 'pat_history_queue_table',
    max_retries => 10
    DBMS_AQADM.START_QUEUE (
    queue_name => 'pat_history_queue'
    END;
    BEGIN
    DBMS_AQADM.ADD_SUBSCRIBER (
    queue_name => 'pat_history_queue',
    subscriber => SYS.AQ$_AGENT(
    'pat_history_queue_subscriber',
    NULL,
    NULL )
    DBMS_AQ.REGISTER (
    SYS.AQ$_REG_INFO_LIST(
    SYS.AQ$_REG_INFO(
    'pat_history_queue:pat_history_queue_subscriber',
    DBMS_AQ.NAMESPACE_AQ,
    'plsql://PAT.HISTORY_QUEUE_DISTRIBUTION.CALLBACK',
    HEXTORAW('FF')
    1
    END;
    The function CALLBACK which is called by the queue, is never called, I checked that with log messages. Also the package that contains the function is compiled ok.
    Thanks.
    Roland

    Hi,
    Does the subscription show up correct in sys.reg$ ?
    Regards,
    Harry
    http://dbaharrison.blogspot.com/

  • How to implement a callback function using LabView's Call Library Function Node?

    I am trying to call a fuction from a SDK.dll library using the Call Library Function Node. The SDK was provided to
    me and I do not have the source code, just the .dll and .h files.
    The SdkSetPropertyEventHandler function has a callback fuction as one of its parameters. How do I implement the
    callback using the CLF node? I am a good LabView programmer but this is my first time using the Call Library
    Function Node. I have read all the info I can find on NI's web site and the discussion board but cannot figure
    this one out. I am using LabView 8.6.
    The SDK.h deacribes the function as:
    //  Function:   SdkSetPropertyEventHandler
    SdkError SDKAPI SdkSetPropertyEventHandler(
                SdkCameraRef                    inCameraRef,
                SdkPropertyEvent                inEvnet,          
                SdkPropertyEventHandler         inPropertyEventHandler,
                SdkVoid*                        inContext );
    //  Description:
    //       Registers a callback function for receiving status
    //          change notification events for property states on a camera.
    //  Parameters:
    //       In:    inCameraRef - Designate the camera object.
    //              inEvent - Designate one or all events to be supplemented.
    //              inPropertyEventHandler - Designate the pointer to the callback
    //                      function for receiving property-related camera events.
    //              inContext - Designate application information to be passed by
    //                      means of the callback function. Any data needed for
    //                      your application can be passed.
    //      Out:    None
    //  Returns:    Any of the sdk errors.
    A separate header file called SDKTypes.h contains the following data:
    typedef  SdkUInt32  SdkPropertyEvent;
    typedef  SdkUInt32  SdkPropertyID;
    typedef  void       SdkVoid;
    typedef  struct __SdkObject*    SdkBaseRef;
    typedef  SdkBaseRef    SdkCameraRef;
     SdkPropertyEventHandler
    typedef SdkError ( SDKCALLBACK *SdkPropertyEventHandler )(
                        SdkPropertyEvent        inEvent,
                        SdkPropertyID           inPropertyID,
                        SdkUInt32               inParam,
                        SdkVoid *               inContext );
    Thanks for your help.
    Alejandro
    Solved!
    Go to Solution.

    alejandroandreatta wrote:
    I am trying to call a fuction from a SDK.dll library using the Call Library Function Node. The SDK was provided to
    me and I do not have the source code, just the .dll and .h files.
    The SdkSetPropertyEventHandler function has a callback fuction as one of its parameters. How do I implement the
    callback using the CLF node? I am a good LabView programmer but this is my first time using the Call Library
    Function Node. I have read all the info I can find on NI's web site and the discussion board but cannot figure
    this one out. I am using LabView 8.6.
    Basically you do not do that. LabVIEW does not know pointers and certainly not function pointers. What you should do instead is writing a C DLL that implements the callback and also exports a function to be called by LabVIEW that translates between the callback and a LabVIEW user event. Look for PostLVUserEvent() here on the NI site to find examples how to do that.
    Rolf Kalbermatter
    Message Edited by rolfk on 02-11-2009 08:00 PM
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Need an example how to use SCAN_Start with a callback function

    I would appreciate if someone helps me with a working example of how to use SCAN_Start with a callback function. I need just a basic functionality: to specify a channel list (with gains probably), to start a data acquisition task and to receive data buffers utilizing a callback function. t this time whatever I was trying to do caused computer hangups, though it is supposed to be one of the most regular tasks to perform.
    Thank you in advance,
    Mike

    Hello Mike,
    Thank you for contacting National Instruments.
    Attached is an example project which uses a callback function to begin analog acquisition (AI) by calling SCAN_Start. This project acquires from the first 2 channels on your DAQ device. Make sure to modify the device number in the code to match the number of your card.
    Let me know if you have any further questions...
    Sincerely,
    Sean C.
    Applcications Engineer
    National Instruments
    Attachments:
    Acquire_multichannel_61xx.zip ‏11 KB

  • External Function with a Pointer to a Callback Function Inside a DLL

    Hi.
    I'm loading a DLL and trying to call a function with the following prototype:
    Func1(HANDLE, hHandle, LPVOID (*pCallback)(UINT, UINT LPVOID), CHAR* sPath)
    Now, I have no problem with the variable types, because CVI 9.0.1 recognizes all of them and I have no problem with LoadLibrary() nor with GetProcAddress().
    But, how do I pass a pointer to a callback that is inside the DLL I'm trying to use.
    I've tried to declare the callback like this:
    LPVOID (CALLBACK Callback)(UINT iDevNo, UINT evEvent, LPVOID pData);
    and call the function Func1 like this:
    (Func1)(hHandle, &Callback, NULL);
    but this gets me:
     Undefined symbol '_Callback@12' referenced in "source.c".
    Hope I can get some help.
    I appreciate your time on this issue.
    Regards.
    Daniel Coelho
    VISToolkit - http://www.vistoolkit.com - Your Real Virtual Instrument Solution
    Controlar - Electronica Industrial e Sistemas, Lda
    Solved!
    Go to Solution.

    Hi Daniel,
    First, you have to make sure that the callback function is exported by the DLL, so that the program that uses the DLL can access the function name identifier. Then, you have to make sure that you call GetProcAddress not just on Func1, but also on the exported callback function. You need to store both function address values in their respective function pointers. You then can pass the callback function pointer as an argument to the Func1 call.
    It's probably cleaner if you define typedefs for all your function pointers, in the calling program:
    typedef LPVOID (__stdcall *CallbackType) (UINT , UINT, LPVOID);
    typedef ??? (__stdcall *Func1Type) (HANDLE, hHandle, CallbackType, CHAR*);
    CallbackType     CallbackPtr;
    Func1Type        Func1Ptr;
    dllHandle = LoadLibrary ("...");
    CallbackPtr = (CallbackType)GetProcAddress (dllHandle, "Callback");
    Func1Ptr = (Func1Type)GetProcAddress (dllHandle, "Func1");
    Func1Ptr (..., hHandle, CallbackPtr, NULL);
    Boa Sorte!
    Luis

  • My callback function under MFC is never called back!

    I am developming a MFC application using NIDAQ 6.7 driver and PCI-DIO-6533
    for a new
    data adquisition system at the Jicamarca Radio Observatory. It is my first
    project with the
    PCI card. I am having problems with the CALLBACK functions. Following are
    relevant portions
    of the source code that illustrates my problem:
    void CallbackNidaq()
    int j;
    j=1234;
    TRACE("I have entered the callback function \n");
    void CCAMUView:nCallbackNidaq()
    HWND my_hwnd = m_hWnd ;
    u32 direcion=0 ;
    puntero = (unsigned char *)piBuffer;
    puntero[4*NSAMPLES-1]=0;
    puntero[4*NSAMPLES-2]=0;
    puntero[4*NSAMPLES-3]=0;
    puntero[4*NSAMPLES-4]=0;
    iStatus = Config_DAQ_Event_Message(iDevice,(i16)1,//add message
    "DIGRP0" , // string description
    (i16)0 , // DAQEvent 0-> Adquire N scans
    (i32)NSAMPLES , /*DAQTrigVal0*/
    (i32)0 , //DAQTrigVal1
    (u32)0 , //trigSkipCount
    (u32)0 , //preTrigScans
    (u32)0 , //postTrigScans
    0 , // hwnd
    0 , // to post WM_NIDAQ_MSG
    (u32)CallbackNidaq) ; // function address
    TRACE("I have already configured : status = %d\n",iStatus);
    int iStatus2;
    iStatus2 = DIG_Block_In(iDevice, iGroup, piBuffer, ulCount);
    TRACE("I have started asinc Status2 = %d",iStatus2);
    Sleep(1000);
    TRACE("Buffer= %d %d %d %d \n",puntero[4*NSAMPLES-1],puntero[4*NSAMPLES-2],pu​ntero[4*NSAMPLES-3],puntero[4*NSAMPLES-4]);
    What I expect to happen is as follows:
    After I configure the device I should get the first TRACE messages I do. I get
    "I have already configured : status = 0" ,
    "I have started asinc Status2 = 0"
    To make sure the device has actually read a buffer full of data, I print out the contents of the last
    four bytes which have been previously set to cero. They do show new values.
    My problem is that the callback
    function is never triggered.I never get the ""I have entered the callback
    function"
    message.
    For your information, in case it helps. I have used the compiler debug to
    find out the address of CallbackNidaq()
    but it does not aggree with the address I get for the (u32)CallbackNidaq
    address assign to the last argument of
    the Config_DAQ_Event_Message function.
    I would appreciate very much if you tell me What I am doing wrong.
    Wishes.
    Gabriel

    Hello Gabriel,
    the propotype of your callback function is wrong; must be (without CALLBACK keyword):
    void CallbackNidaq(HWND handle, UINT message, WPARAM wParam, LPARAM lParam)
    See the Config_DAQ_Event_Message in NI-DAQ Help at the bottom.
    Hope this will help you.
    Grettings,
    Alain

  • I am trying to write a double buffered data acquisition program using MFC and a callback function.

    i am trying to do a double buffer data acquisition using MFC application framework in Visual Studio.i want to use a callback function to notify when the buffer is half full.do you have some sample reference program that can help me?

    What DAQ board are you using? When you installed NI-DAQ you should have selected to install the support files for VC++. Then there will be several examples on how to do double buffered data acquisition.
    If you have already installed NI-DAQ 6.8 or higher and did not select to include the support files, you can run the NI-DAQ setup program and just add them. If you are using an older version, you will have to uninstall and reinstall.
    Once you have the support files, follow this path to the examples.
    >>Program Files>>National Instruments>>NI-DAQ>>Examaples>>Visual C>>
    If you are doing digital acquistion, goto the di folder, if you are doing analog acquisition goto the ai folder.
    As for the callback function, you can use the NI-DAQ function Config_DAQ_
    Event_Message with DAQEvent Type = 1, where N would equal half your buffer.
    Brian

  • C++: Is it possible using callback function with ncacn_http and rpcproxy server ?

    I have a remote procedure and I can call it using http over rpc. I pass trough an rpc proxy server for arriving to my rpc server.
    But I cannot call a callback function to my client inside the server function.
    Is it possible using callback function with ncacn_http and rpcproxy server ?
    We are using IIS on windows server 2008 R2 and the server rpc and the client on the same PC with rpc rpoxy.
    If I use ncan_ip_tcp all works fine.
    Thanks
    Gianluca

    Hi,
    About the develop question please post to the MSDN forum.
    MSDN forum Developer Network
    http://social.msdn.microsoft.com/Forums/en-US/home?forum=WAVirtualMachinesVirtualNetwork&filter=alltypes&sort=lastpostdesc
    Thanks for your understanding and support.
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Anonymous callback function for JSValue callWithArguments:

    Hi, I'm trying to create an iOS7 app using JavaScriptCore, where the core of app is written in JS (which communicate with API). The problem is, I can't get to work anonymous callback functions. Is something like that even possible? Simplified example code below:
    .js
    function getArray(errorCallback, successCallback) {
         loading = api.getArray();
         result.waitOnSuccess(loading, function(list) {
              return successCallback(list);
        result.waitOnError(loading, function(error) {
              return errorCallback(error);
    Obj-C
         JSValue *getArray = _context[@"getArray"];
         [getArray callWithArguments:@[^(id error) {
              NSLog(@"%@", error);
         }, ^(id success) {
              NSLog(@"%@", success);
    I know I can do this, when I map native methods to JS context, but I would really like to do this anonymously. Thank in advance.

    1: Please explain what is happening, how, when and where you got this error. We need details to be able to help.
    2: Please do not paste straight into the original message, use PasteBin or other pasting websites when asking for someone to check an error code etc.

  • Control array of callback functions?

    Apologies for my basic question.
    I am experimenting with control arrays and so far am able to collect data in string controls that are inside control arrays.  Works well.  Naturally, none of these controls need callback functions.
    Now I have need of some momentary command buttons in a control array as well.  So my question is, should I use a single callback function for all of the button controls in that single array?  And if so, how do I go about identifying which element in the control array called the function?  From reading on the forums, it seems as if use of the callback data parameter might get me there.
    Just wanted to ask before I get off track.  Thanks!
    Solved!
    Go to Solution.

    Yes, callbackData can be of help in such a situation, but if you can limit to switch on array index to discriminate what to do your button callback could be something on this line:
    int CVICALLBACK BtnAttayCallback (int panel, int control, int event,
    void *callbackData, int eventData1, int eventData2)
    int handle, index;
    switch (event) {
    case EVENT_COMMIT:
    handle = GetCtrlArrayFromResourceID (panel, control);
    GetCtrlArrayIndex (handle, panel, control, &index);
    switch (index) {
    // Your code here
    return 0;
     (No CVI install here so I cannot test it: double check the code but it should reasonably work)
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • ProcessSystemEvents & callback functions

    Hello.
    I have a question about the ProcessSystemEvents() and callback functions. If I have the following "strange" callback function with the follwoing code inside:
    int func(...) {
      while(true) {
       ProcessSystemEvents();
    Could this code create a crash in the underlying run-time lib (cvirte.dll etc), with to many calls to ProcessSystemEvents?
    And will this code stop any other callback function from execution, since we are in an infinite while loop?
    Best regards,
    Christian G.

    A fuction like that should be called only once, if this is what you intend. While sitting in the loop, ProcessSystemEvents permits the system to react to events like the user pressing a button or something like this. You must explicitly avoid dangerous events like calling the function again and again, as well as all user actions that can cause problems (like modifying critical parameters while the function is running, improperly exiting the program and so on). To obtain this you may either disable unwanted buttons on the GUI or set a global flag 'system running' tested on all callbacks and functions to protect the system from unwanted operations.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • Multiple CallBack functions

    Is it possible to have multiple Callback functions, i.e. to do more than one 'imgSessionWaitSignalAsync2(...)' call with the same session ID?
    As it would be e.g. in ...:
    void NI_grab:tartGrabNow(bool bMaster) {
    bIsMaster = bMaster ;
    iFrameNumber = 0 ;
    iReturnValue = imgSessionStartAcquisition(siSessionId) ;
    timeBeginPeriod(1) ;
    iReturnValue1 = imgSessionWaitSignalAsync2(
    siSessionId,
    IMG_SIGNAL_STATUS,
    IMG_FRAME_DONE,
    IMG_SIGNAL_STATE_RISING,
    &xSessionWaitSignalCallbackPadTimeStamp,
    this
    // The 'xSessionWaitSignalCallbackPadTimeStamp' will put the time stamps in a queue buffer, ...
    iReturnValue2 = imgSessionWaitSignalAsync2(
    siSessionId,
    IMG_SIGNAL_STATUS,
    IMG_BUF_COMPLETE,
    IMG_SIGNAL_STATE_RISING,
    &xSessionWaitSignalCallbackProcessImage,
    this
    ; bStoppingAcquisition = bAllGrabbersStoppingAcquisition = false ;
    // ... which is read by 'xSessionWaitSignalCallbackProcessImage', so that the
    // time stamps are padded into the correct images.
    // I consider it fully possible that there are sometimes "two or three" acquired images
    // in the "input FIFO pipes"....
    bInterfaceOK = (iReturnValue == 0) ;
    bAcquisitionRunning = true ;
    Best regards
    Staffan Cronström

    Thanks. Please seriously consider making both the GetLocalObject and GetLocalInt et al fixes available in 1.5 - as you can imagine, they are cornerstone blocks for building debuggers (which is what I have done).
    Is the fix you are testing related to -server or JVMTI itself?

  • Callback Functions for the Enterprise API

    I'm using VB to write some API functions to pull journal detail from Enterprise 6.0, but having trouble with the callbacks. I did find some syntax errors in the toolkit.bas file, correct those and am able to pull specific data points, but the enum functions just crash. Because the documentation is scetchy at best, I'm not sure if my functions are wrong, if there are other syntax errors in the .bas file or if the dll's are corrupt.<BR><BR>I'd really appreciate some help from someone who has experience writing callback functions to the Enterprise API.<BR><BR>Thanks in advance.

    Hey there...
    I think part (if not all) of your question can be answered by abstracting it a level. Think of all the tools that are available through PL/SQL or JAVA in the database. For instance...
    * Heterogeneous Services that allow you to access any ODBC/JDBC data source directly from within the Oracle database.
    * DBMS_JOB that allows the scheduling of jobs to run at a given time/interval.
    * DMBS_FILE_UTL that allows Oracle to interact with the file system.
    That doesn't even take into account the things you can do with Java in the database.
    In short, just about everything you mentioned can be done in one shape or form with tools that reside in or around the oracle database.
    HTMLDB is a front end interface tool that has access to all of the tools available to you at database level.
    So in short (and in my opinion): Yes, it is capable of creating Enterprise level applications. I'm building a fairly complex one right now that interfaces with 2 external (non-oracle) databases via Heterogeneous services, and which used DBMS_JOB to schedule jobs to collate data from an external file system.
    I hope this helps..
    Doug Gault
    TXI

  • CALLBACK functions in cvi

    hi,
    Need a simple clarification on working with callback function.
    i have 3 different callback buttons function as start test, stop test, quit.
    Whenever Start test button is pressed by EVENT_COMMIT, it calls some functions and executes the same. in the middle of this function execution i need to stop the test by pressing stop test button or i need to quit the interface. How can i do this?
    i am facing problem like once i press the start button i am not getting controls to other button until the all functions available inside start button gets completed.
    Thanks in advance
    Solved!
    Go to Solution.

    The sleep (1000) and not calling ProcessSystemEvents () are the reasons!
    Sleep () completely blocks the program until the time has expired. It is advisable that you dont call it for long intervals!
    If you don't call ProcessSystemEvents () you cannot get stop button press
    Try modifying the code this way:
    int    requestToStop;    // Define this at module level
    int CVICALLBACK Btn_Start_Test (int panel, int control, int event,
      void *callbackData, int eventData1, int eventData2)
    switch (event)  {
     case EVENT_COMMIT:
       requestToStop = 0;    // Clear stop flag and start the test
       if (Tree_getselectedChilditems())
           MessagePopup ("Info", "Operator stopped the test!");
       else
           MessagePopup("Info","TEST COMPLETED SUCCESSFULLY");
       break;
     return 0;
    int CVICALLBACK btn_stop_test (int panel, int control, int event,
      void *callbackData, int eventData1, int eventData2)
     switch (event)  {
      case EVENT_COMMIT:
        requestToStop = 1;
    //  XL_KillWindowsProcess("EXCEL.EXE");//not exactly excel file,it may be any file which is running 
        break;
     return 0;
    int Tree_getselectedChilditems (void)     //double testcaseno)
     int noOfItems;int val,i;  //int index;
     int noOfChild,index=1;
     char treelabel[500]={0};
     char charval;char TCno[100];
     int select;  char testno[100]={0};
     double tini;
      for(error = GetTreeItem (panelHandle, PANEL_TREE, VAL_CHILD, 0, VAL_FIRST, VAL_NEXT_PLUS_SELF, VAL_MARKED, &index);
              index >= 0&&error<=0;error = GetTreeItem(panelHandle, PANEL_TREE, VAL_ALL, 0,
                    index, VAL_NEXT, VAL_MARKED, &index))
             GetTreeCellAttribute(panelHandle, PANEL_TREE,
                index, 0, ATTR_LABEL_TEXT, treelabel);
       Scan(treelabel,"%s",TCno);
       strcpy(testcaseno,TCno);
    //   Sleep(1000);     // Substitute this line with the following code
         tini = Timer ();
         while (Timer () - tini < 1.0) {
            ProcessSystemEvents ();
            if (RequestToStop) break;     // Operator stoo
       readTestcasesheet(ExcelWorkbookHandle, ExcelWorksheetHandle,testcaseno);
       Fmt(treelabel,"%s",""); 
       if (RequestToStop) break;     // Operator stop
      return requestToStop;
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

Maybe you are looking for