Calling win32 api in Forms

Hi,
Is it possible to invoke win32 api in Forms ? If so, from where can i get some samples ?
Thanx in Advance.
Regards,
Saravanan A

Hi,
Is this available for 10g also...because in oracle website(http://www.oracle.com/technology/software/products/forms/index.html) D2KWUTIL library is available only for Form 6i
Thanx in Advance.
Regards,
Saravanan A

Similar Messages

  • Calling win32 api's from java

    Can someone tell's me how to call win32 api's from jdk1.4 ...
    Like in Delphi for example how to open cd-rom door...

    See this
    http://forum.java.sun.com/thread.jsp?forum=52&thread=94146

  • Calling Windows API From Forms.

    For example, how can i call the MessageBoxA function from user32.dll whilst working in an Oracle Forms Application.
    Thank you.

    You shall have to use the WEBUTIL_C_API.Invoke_Int function for this purpose. Please see the following example that Locks the workstation.
    -- IMPORTANT
    -- Be sure to review the following My Oracle Support Note
    -- Doc ID: 285331.1 - "Exception When Calling PASCAL style Function Via WebUTIL_C_API"
    declare
      rc pls_integer;
         f_handle WEBUTIL_C_API.FUNCTIONHANDLE;
         args Webutil_c_api.parameterlist;
         winSysDir varchar2(255) := Client_Win_API_ENVIRONMENT.Get_Windows_Directory || '\system32\';
    --- IMPORTANT ---
    -- WEBUTIL_C_API CURRENTLY ONLY SUPPORTS CALLING C STYLE LIBRARIES, THEREFORE SOME WINDOWS LIBRARIES CANNOT BE CALLED.
    -- ADDITIONALLY, IT IS NOT RECOMMENDED THAT YOU ATTEMPT TO CALL FUNCTIONS WHICH REQUIRE ARGS.
    -- USE EXTREME CAUTION WHEN CALLING WINDOWS APIS.
    -- BE SURE TO THOROUGHLY TEST BEFORE MOVING TO PRODUCTION
    -- LOOK CLOSELY AT BOTH STABILITY AND MEMORY USAGE AS SOME CALLS
    -- MAY RESULT IN THE APPEARANCE OF A MEMORY LEAK.
    -- This call to USER32.DLL will reference the LOCKWORKSTATION function.
    -- If the current OS user does not have a password configured, the workstation may not lock.
    -- The Windows LockWorkStation function requires no args to be passed in.
    -- WebUtil expects something to be passed in. So an empty paramlist will be created.
    begin
    If webutil_clientinfo.get_operating_system LIKE 'Win%' Then          
         f_handle := WEBUTIL_C_API.register_function(winSysDir||'user32.dll','LockWorkStation');
         args := WEBUTIL_C_API.create_parameter_list;          
    If the function succeeds, the return value is nonzero. Because the function executes asynchronously,
    a nonzero return value indicates that the operation has been initiated. It does not indicate whether
    the workstation has been successfully locked.  If the function fails, the return value is zero.
        http://msdn.microsoft.com/en-us/library/aa376875(v=VS.85).aspx
         rc := WEBUTIL_C_API.Invoke_Int(winSysDir||'user32.dll','LockWorkStation',args);     
    End if;
      WEBUTIL_C_API.Destroy_Parameter_List(args);
      WEBUTIL_C_API.Deregister_Function(f_handle);               
      SYNCHRONIZE;
    end;

  • LabVIEW call Win32 API DLL function from third party

    Hi everyone,
    I'm trying to build a LabVIEW 2010 interface on 32-bit Window XP system to configurate and communicate to an Anglient laser head through its USB expansion box. I contacted the vendor and they shared a win32 API with some dll files. I started with a function called "A55292Find", but the CLF node always pop up error 1097.I checked the MSDN to get the corresponding LabVIEW data type for CLF.
    My question is: Do I need to initialize those arguments? (How can I know the values of them if initialization is needed?)
    Could anyone help me figure out what's the problem?
    Here is what I have from API documents about this function:
    The A55292Find function returns lists of handles and board types for all the 55292 USB
    Expansion Modules connected to the system.
    A55292RC __cdecl A55292Find(
    HANDLE hBoxes[], // List of handles for the boxes found. (as Unsigned 32-bit integer numeric)
    BOARDTYPE PortABrdType[], // List of board types for slot A boards (as Unsigned 16-bit integer numeric)
    BOARDTYPE PortBBrdType[], // List of board types for slot B boards (as Unsigned 16-bit integer numeric)
    WORD *spMaxBoxes); // dimension for all of the passed arrays. (as Unsigned 16-bit integer array data pointer)
    // (function return type as Unsigned 32-bit integer numeric)
    Parameters
    HBoxes[] Array that will receive the list of HANDLES for all the 55292 boxes connected.
    PortABrdType[] An array that will receive Slot ‘A’ board type information for each 55292 box.
    PortBBrdType[] An array that will receive Slot ‘B’ board type information for each 55292 box.
    spMxBoxes Passes the maximum number of values that can be held in hBoxes, PortABrdType, and PortBBoardType arrays to the A55292Find routine and returns the actual number of boxes found
    The return value will be one of the following A55292RC return codes:
    Value Meaning
    A55292_NO_ERROR No error
    A55292_TIMEOUT Timeout accessing a shared memory
    Remarks
    This routine must be called to obtain handles and board type information used in calling all the other routines. If there are significantly more array elements than boxes, the routine will take longer to complete.
    These are the definitions: 
    typedef DWORD A55292RC; enum{A55292_NO_ERROR, A55292_HANDLE_ERROR,...}
    typeder WORD BOARDTYPE; enum{A55292_PCAL_BOARD, A55292_NO_BOARD, ...}
    Thanks a lot,
    Kang
    Solved!
    Go to Solution.
    Attachments:
    call A55292Find.vi ‏10 KB

    nkang11 wrote:
    Hi Mr. Kalbermatter,
    As you told me, I should try to use the defined enumeration words as control and indicator.
    For the previous CLF node, it successfully returned the hardware configuration (I have only connected a board at slot A):
    But I really want to see a string return as "A55292_PCAL_BOARD" which is defined by "typedef WORD BOARDTYPE; enumeration {...}; Does that mean I need to change the data type or do something like "converter"? Or initialize the array first, then convert it to string type?
    Right now, I'm trying to open the laser card by using "A55292PcalOpen(HANDLE hDev, SLOTSELECT SlotSelector);" function which requires to use the enumeration constants from " typedef WORD SLOTSELECT; enum {A55292_PORT_A, A55292_PORT_B};" but I'm confused to shot an constant control to a new CLF node.
    Since almost all of the arguments in dll function are typedefined as WORD, short and struct et al, I hope you could give me some hints on it.
    Thank you very much sincerely!
    Kang
    Depending on the actual C implementation you can simply create a LabVIEW enum with the according item names or use a ring control instead. Teh enum requires the numeric values of the items to be in consecutive order without any gaps in between. This is a given if the C definition never assigns a specific number to the item. If the C enum is not consecutive you need to go with a ring control instead.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • How to call an API through Forms

    Hi,
    I want to call 'inv_quantity_tree_pub.query_quantities' from a custom form developed using Template.fmb.
    It is displaying error that 'remote package can not be called '.
    can any one help me on this issue.

    Hi;
    What is your OS?
    Please check below which could be helpful for your issue
    Oracle E-Business Suite Java APIs for Forms Troubleshooting Guide, Release 12 [ID 966982.1]
    http://drupal.org/node/751826
    http://oracle.ittoolbox.com/groups/technical-functional/oracle-dev-l/how-to-call-windows-apis-through-oracle-forms-developer-6i-1082381
    Regard
    Helios

  • Win32 API & DLL calls

    Is possible to call in java directly the Win32 API or using a DLL?

    I dont believe you can do it directly but I think you can call a VBSCRIPT that can call WIN32 API directly

  • I am receiving this error message when trying to export pictures: 'Unable to Export": An internal error has occured: Win32 API error 2 ( "The system cannot find the file specified.") when calling ShellExecuteExW from AgWorkspace.shellExecute.// I have a H

    I am receiving this error message when trying to export pictures: 'Unable to Export": An internal error has occured: Win32 API error 2 ( "The system cannot find the file specified.") when calling ShellExecuteExW from AgWorkspace.shellExecute.// I have a HP ENVY Phoenix, fully loaded, 1 1/2 years old.

    Nevermind I fixed it. Thank you.

  • Win32 API calling by Code Interface Node

    Hi all,
    I wish to call a Win32 API function by using the code interface node.
    However, I don't know the data types in LabVIEW corresponding to the "HANDLE
    *" in Visual C++.
    Here's the function I wish to call:
    BOOL bOpenDriver (HANDLE * phDeviceHandle, PCHAR devname) {
    *phDeviceHandle = CreateFile(devname,
    GENERIC_WRITE,
    FILE_SHARE_WRITE,
    NULL,
    OPEN_EXISTING,
    0,
    NULL);
    if (*phDeviceHandle == INVALID_HANDLE_VALUE) {
    return (FALSE);
    } else {
    return (TRUE);
    Thank you in advance.
    JJ

    If this is really a Windows API function, then the handle can most likely be treated as an I32.
    Note that you can't actually do anything with the handle other than passing it to other functions.
    If you search this site for "LabVIEW" and "DLL" you should find some resources about working with DLLs and Win32 API DLLs.
    Try to take over the world!

  • How to use d2kwutil for calling win-api programs in form 6i

    I WANT TO USE d2kwutil for calling win-api programs in form 6i.
    PLEASE GIVE ME IT'S SOLUTION.

    D2kwutil comes with a Demo Form WAPIDEMO - you can run this to see every function demonstrated. You can even run a function using the demo form and copy the syntax required directly into your own form -------------------------
    yes in have got that WAPIDEMO from web and run successfully but
    i can not do those codes in my owdn form.Because i do not get those apis like
    win_app_session in form 6i.
    Again i could not understand how that form runs without connecting to database.
    Please describe the solution.

  • Calling a Single Threaded Win32 API/DLL

    I am working on calling a single threaded Win32 API (in a vendor's dll).
    Since this dll is single threaded in windows, when I call this in my Java program do I need to make sure that I do not have multiple threads calling this API.
    Any thoughts will be appreciated.
    Thanks

    It shouldn't matter as long as you make sure that multiple threads aren't calling functions in that DLL at the same time. You can ensure this by either synchronizing your methods in Java or writing a multithreaded stub DLL that synchronizes calls to the single-threaded DLL for you.

  • Error message win32 API error2 when calling ShellExecuteErW from AgWorkspace.shellExecute

    after the command Exporting I get the message: Internal failure: win32 API error2 calling ShellExecuteErW from AgWorkspace.shellExecute. System is only exporting Thumnails.
    System is windows8, 64bit Lightroom 5.2 (newest version)

    At the bottom of the import dialog is a popup marked Post-processing.  It's probably currently empty.  Set it to Do Nothing and try the export again.

  • Using HRMS APIs in Forms 6i

    I am trying to build a custom Form that modifies inserts or modifies data in the Oracle HRMS system. To do this I thought the APIs would be the best tool because they would preserve the integrity of the system as a last guard if all of my checks on the data failed to catch something.
    I am having problems implementing this idea. I have what essentially amount to wrapper functions that take the dataset I am dealing with and send it off through the various APIs needed to place it in the propper location. Insertion of new data is compiling ok, but when I try to compile a package with a procedure in it that utalizes and update (HR_PERSON_API.UPDATE_US_PERSON) I get the following error:
    Implementation Restriction: 'HR_API.G_NUMBER':
    Cannot directly access remote package variable or cursor
    To simplify the problem I took the procedure out of the program unit in the form and made it a stand alone and also stripped it down to just the bare minimum passing in dummy data most of the time and only using local variables rather than objects. I end up with the following code:
    procedure update_person is
    start_date date;
    end_date date;
    full_name varchar2(300);
    comment_id number;
    comb_warning boolean;
    ass_warning boolean;
    pay_warning boolean;
    emp_number varchar2(200);
    object_version number;
    begin
    object_version := 10;
    emp_number := 1210;
    hr_person_api.update_us_person(
    p_effective_date => to_date('02-apr-2006', 'dd-mon-yyy'),
         p_datetrack_update_mode => 'UPDATE',
         p_person_id => 2852,
         p_object_version_number => object_version,
         p_employee_number => emp_number,
         p_effective_start_date => start_date,
         p_effective_end_date => end_date,
         p_full_name => full_name,
         p_comment_id => comment_id,
         p_name_combination_warning => comb_warning,
         p_assign_payroll_warning => ass_warning,
         p_orig_hire_warning => pay_warning
    end;
    This gives me the error from above. If I try to create the same procedure in the database itself using a utility like TOAD and the same information to log in to the database I get no such compile error and only get errors when I run the procedure as all the values are dummy and don't actually map to anything.
    Information on my version of forms builder, the db, and the application:
    Forms [32 Bit] Version 6.0.8.27.0
    RDBMS : 9.2.0.6.0
    Oracle Applications : 11.5.8
    Forms Server
    Oracle Forms Version : 6.0.8.25.2
    Application Object Library : 11.5.0
    I have literaly been on this same problem the entire day and anyone that can help me I would reall apreciate it. At this point I am at a loss. I suspect either I am making the call to the API incorrectly, or it is simply not possible to do what I am trying to do. I hope I am just doing something wrong because as I understood it, one of the points of the API was to allow custom forms to do validated insertion of data.
    thanks for any help
    Andrew

    Your approach of using published APIs is absolutely the best / supported mechanism to propgramatically enter data into HRMS.
    This is a long-known issue when calling APIs from Forms - you are not supplying values for all of the parameters that this API exposes, thus the package defaults will be evaluated but these fail over a RPC call.
    To work around simply supply all the API parameters with a value to avoid defaulting. So, for those that you do not actually wish to set you can set up a local constant(s) within the form, defined with the same definition as hr_api.g_number, g_varchar2 etc (check the db package specification for these), and pass them explicitly in your call together with those that you are setting currently.

  • Win32 API error 126

    What to do if message: [Win32 API error 126 ("Dasangegebene Modul wurde nicht gefunden") when calling ::LoadLibrary from getFunction] apears

    What to do if message: [Win32 API error 126 ("Dasangegebene Modul wurde nicht gefunden") when calling ::LoadLibrary from getFunction] apears

  • How to call custom API in ODI

    Hi All,how to call custom API in ODI and how can multiple people run the scenario at same time. I explained my process below
    1. Through ODI console pass parameter (file name) to scenario and read the file form configured location
    2. Insert the data from flat file to custom table
    3. Call custom API
    4. Generating a report in ODI in same location where we read the file from. Creating sample report just reading from custom table
    5. The above design should be such that multiple people can run the scenario at same time.
    can any one help me on step 3 and step 5 how to go forward..
    Thanks in Advance.
    Edited by: 981371 on Mar 4, 2013 3:19 AM

    You can invoke java api in the procedure or KM tasks. You can select Jython technology type and can call the custom java API.
    You may find relevant info at
    http://docs.oracle.com/cd/E23943_01/integrate.1111/e12643/procedures.htm#CHDIDDFE
    http://docs.oracle.com/cd/E23943_01/integrate.1111/e12645/intro.htm#sthref5
    http://docs.oracle.com/cd/E23943_01/integrate.1111/e12645/api_intro.htm#CEGFCFHC
    You can directly put DB functions in the your mapping expressions.

  • When I export from LR5.3 I get an error message Win32 API error . However the export seems to work.

    The message is Win32 API error 2 ("The system cannot find the file specified") when calling ShellExecuteExW from AgWorkplace.shellExecute. However the export works. What is happening and how do I get rid of the error message?

    Near the bottom of the Export Daialog, in the "Post-Processing" section make sure that the "After Export" box is not empty (which is invalid and causes the export operation to trip up). Use the drop-down to select a valid choice such as "Do Nothing".

Maybe you are looking for