Invoking a function

Hi I have created a function to check the GUID format of the column in a table like this:
CREATE OR REPLACE PACKAGE guid_pkg
IS
SUBTYPE guid_t IS NUMBER(38);
SUBTYPE formatted_guid_t IS VARCHAR2 (38);
c_mask CONSTANT formatted_guid_t:= '{________-____-____-____-____________}';
FUNCTION is_formatted_guid (string_in IN VARCHAR2) RETURN BOOLEAN;
END guid_pkg;
CREATE OR REPLACE PACKAGE BODY guid_pkg
IS
FUNCTION is_formatted_guid (string_in IN VARCHAR2)
RETURN BOOLEAN
IS
BEGIN
RETURN string_in LIKE c_mask;
END is_formatted_guid;
END guid_pkg;
With this, when I try to execute the function is_formatted_guid from SQL prompt like
SQL> select guid_pkg.is_formatted_guid ('{B33204AD-ADDB-4CC6-87F2-2D0D13594F7C}') from dual;
I am getting errors like "ORA-06553: PLS-382: expression is of wrong type ". Is it bcoz of BOOLEAN type is not recognized in SQL ? If then I tried with return type VARCHAR2 but still the same problem.
Can you help in this matter plz.
Thanks,
Aashish S.

CREATE OR REPLACE PACKAGE guid_pkg
IS
  SUBTYPE guid_t IS NUMBER(38);
  SUBTYPE formatted_guid_t IS VARCHAR2 (38);
  c_mask CONSTANT formatted_guid_t:= '{________-____-____-____-____________}';
  FUNCTION is_formatted_guid (string_in IN VARCHAR2) RETURN Binary_Integer; -- CHANGE YOUR CODE HERE, NOT BOOLEAN
END guid_pkg;
CREATE OR REPLACE PACKAGE BODY guid_pkg
IS
FUNCTION is_formatted_guid (string_in IN VARCHAR2)
RETURN Binary_Integer -- CHANGE YOUR CODE HERE, NOT BOOLEAN
IS
BEGIN
  if string_in LIKE c_mask then
    return 1; *-- FOR TRUE*
  else
    return 0; *-- FOR FALSE*
  end if;
END is_formatted_guid;
END guid_pkg;by the way i am not sure but your condition "string_in LIKE c_mask" will not work. you should use regular expressions.
Edited by: Mustafa KALAYCI on 04.Eki.2010 05:10

Similar Messages

  • Invoking  Remote Function Module.

    Hi
    I am invoking a remote function module from a web dynpro application(External Appln ).
    The FM contains the following code snippet
    first it inserts the parameters passed into a table
    and then the code is
    SUBMIT <report name > with parameter passing.
    when i comment out the Submit statement and invoke the function module the parameters get populated in the table..but when i enable the SUBMIT statement the same set of parameters dont even get populated in the table. and i get the following exception in the logs of SAP J2ee appln server .
    WDDynamicRFCExecuteException:      Screen output without connection to user.                           , error key: RFC_ERROR_SYSTEM_FAILURE
    i am not able to find a solution to this problem .
    Please help.
    regards
    Nilesh Taunk.

    HI
    GOOD
    GO THROUGH THIS LINKS,THEY MIGHT HELP YOU TO GIVE YOU SOME MORE IDEA.
    Re: RFC Error While Invoking A Remote Function Module.
    RFC Error While Invoking A Remote Function Module.
    http://sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5303c390-0201-0010-e0b2-bfae018377f0
    THANKS
    MRUTYUN

  • How to invoke a function with arguments in JSTL expressions

    Hi ,
    I want to know how to send arguments in the JSTL expression.
    I have a scenario like this
    for (int i=0; i<nicList.size(); i++)
                          NavigationItemControl nic = nicList.get(i);
                          ni = nic.getNavigationItem();
                          //scr
                          if (nic.isAvailable(Mask.SYSTEM))
                          { %>
                            <option value="<%=ni.getInternalHandle()%>"  <% if(pi.getNavigationItemHandle().equals(ni.getInternalHandle())) {%>selected<%}%> ><%=nic.getLabel()%></option>
                          <%
                        }   I was changed these code into JSTL ,the new one is
    <c:forEach var="nic" items="${nicList}">                                             
                                                 <c:set var="ni" value="${nic.navigationItem}"/>
                                                 <c:set var="nicAvailableMaskSystem" value="${*nic.available*}"/>
                                                 <c:set var="navigationItemHandle" value="true" />                                             
                                                      <c:if test="${nicAvailableMaskSystem}">
                                                           <option <c:if test="${pi.navigationItemHandle==ni.internalHandle}">  selected </c:if> value="${ni.internalHandle}" >
                                                                     ${nic.label}
                                                           </option>
                                                      </c:if>
                                            </c:forEach>in the above code I have problem with nic.isAvailable(Mask.SYSTEM),
    Can any one help me on this how can I invoke a function in JSTL with arguments.
    -Bhaskar

    JSTL can only handle getter/setter methods. You can't pass parameters to the methods.
    There are a couple of ways around this
    1 - set up "mask" as a seperate attribute of the NavigationItemControl bean.
    ie getMask() setMask()
    and then have your isAvailable method as
      public boolean isAvailable(){
        return internalIsAvailable(getMask());
      }Another solution is to define a static function and invoke it as a function.
    public static boolean navigationAvailable(NavigationItemControl, Mask);
    What does the isAvailable() method do? How complicated is it?
    Hope this helps,
    evnafets

  • Can i invoke a function of a compiled script from java?

    Hi,
    Can i invoke a function of a 'CompiledScript' from java with parameters?
    TIA

    sabre150 wrote:
    I don't know about anyone else but I don't understand what you are trying to do.<Goldie mode>
    Bwahahaha, you are one of the oligarchs here and yet you don't know what Compiled Scripts are? Even Chaucer wrote about them, which the Queen of England told me when we shared a kebab in my working-class pals' kebab shop.
    </Goldie mode>

  • At Craig's suggestion: Why Invoke PERL functionality from WD-ABAP?

    Craig -
    This is response to your suggestion that I post my own reasons for thinking that it would be useful to be able to invoke PERL functionality from WD-ABAP.
    Please note at the outset that these reasons are based on my own personal belief that the relatively new vertical sectors of bioinformatics/biomed could produce reasonably significant income for SAP in a reasonably short time if SAP decided to create application-level functionalities in these areas. 
    This belief is in turn based on a very significant new initiative which has been publicly announced by the university Medical Center recently voted "most-wired" (Vanderbilt) and equivalent initiatives at other university Medical Centers across the country.  (BTW, I've posted a meeting time (Tue 7pm) at Tech Ed for anyone who wants to learn more about these initiatives, the new vertical sectors they define, and how SAP could EASILY play in them.)
    So, with this background established, assume that SAP does decide to play in the bioinformatic/biomed sector. 
    SAP will rapidly find that a lot of biomed is based on the kind of bioinformatics that essentially does pattern-analysis on two kinds of strings: polynucleotide strings (DNA, mRNA, tRNA, etc.) and polypeptide strings (mainly the amino acid strings that form the "primary structures" of protiens.)  For example, biomed will soon include the ID of "at risk" markers for all patients in a university medical center, indicating what diseases patients may be genetically at risk for due to SNP's and other abnormalities in their inherited DNA.
    Now when such analysis is not done by running "canned" versions of well-developed programs such as the ubiqitious BLAST program for "aligning" polynucleotide or polypeptide sequences, it is done by programs written in languages that offer superb capabilities for pattern-searching and manipulation of strings, e.g. PERL.
    Additionally, I know from personal experience and the experience of my SigOther that even data obtained from well-known canned programs must be further massaged by non-canned techniques that again are readily implementable in PERL and other similar languages.
    Finally, a lot of bioinformatic/biomed applications require iterative batch execution of canned stat routines such as t-tests or normality tests, which can be conveniently done via calls from languages such as PERL to canned products such as STATA.
    So assume SAP wants to develop a biomed application that has:
    back-end data containing the usual kinds of info med centers need to know about patients, plus the new kinds of scientific info about patients that med centers are creating
    a presentation component that displays these two kinds of data for query, further elaboration/refinement, and subsquent update.
    For example, there will be times when a doctor will want to take scientific data on a patient from the back-end (e.g. portions of a patient's DNA), subject it to pattern-analysis of the type described above, and then store the results of the analysis as additional new scientific info in the back-end databases.
    And SAP can readily provide the doctor with this capability if it allows PERL functionality to be invoked from WD/WD-ABAP components.  In some cases, the PERL will simply invoke industry-standard canned programs such as BLAST and wrap the results in a way friendly to SAP.  In other cases, the PERL may do the analysis itself.  In other cases, the PERL may invoke stat programs.  Etc, etc. etc.
    The point is that there is a vast inventory of bioinformatic/biomed PERL code out there, and if SAP wants to get serious about playing in the bioinformatics/biomed sector, it will be much easier to talk to this inventory of programs rather than recreate it in JAVA or SAP inside SAP. 
    Anyway, please remember - this post was based on the  assumption that SAP may want to get serious about playing in the bioinformatic/biomed sector.
    If not, then as Rosanne Rosanadanna used to say, "Never mind".

    Hi David,
    Where it can be used :-
    Anywhere that you can insert ABAP code to run, you can integrate Perl in the manor that I laid out.  The only requirements are the ability to run registered RFC programs, and to execute ABAP code including RFC calls (which is anywhere inside of an R/3 system basically).
    Comparison with other techniques :-
    All communication from the ABAP stack with the J2EE stack is done via RFC - this is only faster than a registerd RFC Server if Fast RFC is used which means that the J2EE stack MUST reside on the same host as the R/3 instance.  Therefore there is no performance difference at that level and any performance differentiation is going to be in the programming language Perl vs Java, or payload encoding techniques (XML) at that level (not withstanding the consideration of development time).
    There is also the HTTP Client communication facilities - with or without document encodings (the ICF + eg. SOAP).  Again - I'd take a long hard look at whether it is necessary to be encumbered with the data packet encoding/ecapsulation overhead.
    What you gain :-
    Once you are in the "land of Perl" you have access to essentially any module you can find on CPAN, so any data access you require whether it be some kind of application server technology, or DB, can be fullfilled by whats available there (unless you need to roll your own?).  And lets not forget algorythm implemented in Perl or Perl XS extensions - probably very important in the medical/scientifc field.
    SOA (IMO) is a big ugly 4 letter word.  At the end of the day, you have to look where your time and money is best spent, and whether you can achieve the desired results using Scripting Language Connector technology, or whether you feel compelled to go down a WS-* style route.
    However - I would like to say this - IMO it is totally unecessary to wrap up system integration in multiple (expensive both in money, and performance considerations) layers if you are confident that you have good control over both ends of the communication streams.  I believe that when your main objective is to utilise large chunks of code written in another language (rather than reimplement it in something closer to SAPs core interests), or communicate with inhouse data sources/systems (I've done this for MySQL before), then this is definitely one such case that opens the door for using my outlined approach (in the article).
    Cheers,
    Piers Harding.
    Message was edited by: Piers Harding

  • How to invoke math functions from dbx?

    Is there an easy way to invoke math functions from dbx? If I try, for example, to call sqrt I get meaningless results:
    (dbx) print sqrt(4.0)
    sqrt(4) = 1074790400
    (dbx)
    This is from code which uses sqrt, so sqrt should be accessible. Does this need some kind of cast?

    It turns out that this is a bit different than it looks: dbx is indeed able to invoke functions invoked in this way correctly; dbx just fails to print a sensible return value.
    I tried with the following small function:
    #include <stdio.h>
    int printme(double x) {
    printf("This is %g\n",x);
    return (int)2*x;
    Compiling this without -g, linking this with some hello world program and invoking the function from dbx gives
    (dbx) print ((int (*)(double))printme)(4.0)
    This is 4
    ((int (*)(double)) printme)(4) = &(noname)(double) at 0x8
    (dbx)
    The line "This is 4" clearly indicates that the function has been invoked correctly. Just the printed return value is meaningless. In this case, it is even possible to construct expressions with the return value:
    (dbx) print 5 + ((int (*)(double))printme)(4.0)
    This is 4
    5+((int (*)(double)) printme)(4) = 13
    i.e. dbx "knows" the correct return value 8. This does, however, apparently not work with return values of type double (i.e. in the original sqrt-Example).
    I have therefore submitted a bug report with bugs.sun.com; I will post the BugID when (and if) this has been accepted.

  • Function Invoking Another Function

    Trying to invoke 1 function from another function, using same parameters for each.
    Trying to invoke 1 function from another function. MasterFunction has parameterX which is a dictionary Name. When attempting to call ChildFunction from within MasterFunction, and passing it the same parameter that MasterFunction has, got javascript error 'Invalid Object'.
    Here is basic scenario:
    MasterFunction(dictionaryName)
    ChildFunction(dictionaryName);
    Both of these functions are in the JavaScript function list.
    Any help on this would be appreciated.

    You need to pass the dictionary object, not the dictionary name.  So you would pass in a parameter of "serviceForm.DictName", which is the dictionary object.  Then, if your parameter name was "objDict", you would call methods against it, for example: "objDict.setVisible(false);" and "objDict.FieldName.getValue();"
    If, for some reason, you do need or want to pass a string of the dictionary name, you need to use the "eval" method to get the dictionary object back: eval("serviceForm." + dictString + ".FieldName.getValue()");

  • Invoking winapi functions

    hi all can i call winapi functions in form 9i as it can be in VB. If yes can any one give me at least one example , suppose i want to shutdown my pc.
    thanks

    Hi,
    Maybe this example cut will work for you. It passes and gets
    string:
    Statement stmt = conn.createStatement ();
    CallableStatement cs = conn.prepareCall ("begin ? :=
    MyFunction(?); end;");
    cs.registerOutParameter(1,Types.CHAR);
    cs.executeUpdate();
    System.out.println (cs.getString(1).trim());
    Robertas
    Sudhir Kulkarni (guest) wrote:
    : How to call Stored Functions from Oracle.. Does JDBC allow
    this
    : to do..
    : Callable Statement allows only Stored Procedures.
    : Does It allow to invoke Database Functions..
    : Pl. Explain is there any other way to invoke Database
    Functions..
    : Thanks in Advance,
    : Sudhir Kulkarni
    null

  • Invoke RFC function without input parameters

    Is it possible to invoke RFC function that doesn't have input parameters? It returns all data from reference.

    Hi Denis,
    pls keep in mind that no reference parameter is allowed in RFC, you have to check that "Pass Value" flag.
    Thanks
    Luis

  • How to invoke RFC function module from XI interface

    Hi all,
    I am having one question, How to invoke RFC function module from XI interface.
    Please reply me as soon as possible.
    Thanks in advance,
    Radhika

    Hi,
    To call the RFC in mapping u need to create the RFC lookups...check these links.
    How we have to create the lookups?
    Check this weblogs with some screenshots on how to achieve this:
    /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
    /people/sravya.talanki2/blog/2005/12/21/use-this-crazy-piece-for-any-rfc-mapping-lookups
    /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
    /people/sap.user72/blog/2005/12/06/optimizing-lookups-in-xi
    /people/morten.wittrock/blog/2006/03/30/wrapping-your-mapping-lookup-api-code-in-easy-to-use-java-classes
    lookups in xi
    XI Design Guidelines
    Re: RFC Lookup API
    /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a03e7b02-eea4-2910-089f-8214c6d1b439
    Regards,
    Phani

  • How to - invoke OAF function from outside oracle with parameters?

    I have an oaf page, that does simple create/update/view functions for set of records based on custom db.
    currently user has to login to oracle apps, go to resp> invoke the page> search the part number > look up all the existing records(part#,set#,rev)> click on view link to view details of specific record.
    The requirement is : to invoke a set of record outside oracle.
    for example : user goes on network folder and opens a doc file from : /folder-2010/AAA-101-pqr.doc
    contents of doc file :
    revision = 1
    setNumber=2
    partNumber : ABCDEF* --this needs to be a link invoking the function call to the oaf page with these set of parameters :revision, part number and set number.
    ....and a few more....
    What I did was : I gave the OAFunc=xxxxx guest grants (http://mukx.blogspot.com/2008/07/creation-of-anonymous-page-introduction.html)
    so it invokes the main page from any file outside oracle, without login required. but i still have to search the existing records for a part number and click on view link.
    How can I pass the part#,set#,rev to the link so that it opens up the view page directly ?
    any help would be appreciated.
    thanks a ton.

    ok so say my function is :
    MASETUPVIEW with html call : OA.jsp?page=/oracle/apps/mac/matooling/webui/WorkSheetViewPG
    So from word file : Should I give the link to invoke as :
    http://zzzzzz.company.com:8009/OA_HTML/OA.JSP?OAFunc=MASETUPVIEW&viewInvItemId=123456&viewMachine=101&viewRevision=C&viewSetNumber=5&viewCategory=MILLS&paramActionType=ViewWS

  • Database adapter: how to invoke database functions

    Hi there,
    i'm new in this forums. My name is Giulio and i work in Italy.
    I'm trying to invoke a database functions inside a bpel process.
    The function is very simple, this is the source code:
    create or replace function FNC_WriteSailing(PEventCode in varchar2, PXML In sys.xmltype) return number is
    begin
    Insert Into table_with_xml_column (filename, xml_document)
    Values (PEventCode, PXML);
    Commit;
    return(1);
    Exception When Others Then Return (0);
    end FNC_WriteSailing;
    I've tried to invoke functions withe only primitive data type as parameter. But i'm not able to invoke functions with CLOB or XMLTYPE parameter.
    I'm using jdeveloper version 11.1.1.4.0
    Could anyone help me? Thanks in advance.
    Regards,
    Giulio Dottorini

    you're not able to invoke them or you don't see them in the browser of the wizard of the db adapter?
    you should see them in there

  • BatchInbound eWay does not invoke receive() function, JCAPS 5.1.3

    Hi,
    (Like in many examples) we are using a BatchInbound eWay to invoke a collaboration to read from files using the BatchLF eWay. When we put a bunch of about 20 files into the directory the BatchInbound eWay finds them and renames them. However, for some of the files it seems the collaboration's receive() function is not been invoked and the files stay renamed in the directory. When I re-rename them back manualy to their original name they are consumed correctly with receive() invokation in the collaboration.
    Any idea or experiences on this issue?
    Regards,
    Heiner.
    PS: It might be that reagardless the 10-seconds interval sometimes 2 files are renamed at the same time.

    Thanks for your reply, mjenkins.
    I tried a bit myself and it is working since I changed in the environment configuration of the BatchInbound file the MDB Max Pool Size to 1 and in the environment configuration of the BatchLocalFile file the Connection Steady Pool Size and Connection Maximum Pool Size to 1.
    Regards,
    Heiner.

  • Invoking Stored Function

    I have this function defined in my database:
    create or replace FUNCTION return_string_func(x VARCHAR2) RETURN VARCHAR2
    AS
    BEGIN
    return 'Hello ' || x;
    END;
    and i am trying to invoke it as follows:
    PLSQLStoredProcedureCall call = new PLSQLStoredProcedureCall (); //------------------------------------A
    call.setProcedureName("return_string_func");
    call.addNamedArgument("x", JDBCTypes.VARCHAR_TYPE);
    DataReadQuery query = new DataReadQuery ();
    query.addArgument("x");
    query.setCall(call);
    Session session = JpaHelper.getEntityManager(em).getServerSession();
    List queryArgs = new ArrayList();
    queryArgs.add("venkat");
    List mylist= (List)session.executeQuery(query,queryArgs);
    DatabaseRecord record = (DatabaseRecord) mylist.get(0);
    return (String)record.get(0); //------------------------------------B
    I am getting the following error:
    Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.1.3.v20110304-r9073): org.eclipse.persistence.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-06550: line 5, column 3:
    PLS-00221: 'RETURN_STRING_FUNC' is not a procedure or is undefined
    ORA-06550: line 5, column 3:
    Note that a similar code works fine for a stored procedure(with IN-OUT params) though; I dont see something like a PLSQLStoredFuncitionCall being present.
    What am i doing wrong?

    user8093550 wrote:
    I got this working with StoredFunctionCall. To my surprise, i was not able to find PLSQLStoredFunctionCall in the version of eclipselink i am using.
    Do you mean JDBC CallableStatement along with JPA? How can this be done?Don't use JPA at all as this has nothing to do with ORM persistence. Obtain the configured Datasource through JNDI, obtain connection from it, execute call, don't forget to close statement and connection.
    edit:
    also, the PLSQL* classes seem to be internal implementation classes that you should not be using directly as it makes it Oracle specific. Probably there is also a StoredProcedureCall that you can use to make it more portable.

  • ClassNotFoundException while invoking EL function during render response

    I wrote a simple EL function to retrieve the clientId of a UIComponentBase object -- I'm generating some javascript. The first time I load the page (without a submit), the page generates just fine, including the javascript output that successfully invoked my EL function from a h:outputText element.
    However, when I submit the form it throws a ClassNotFoundException (for my EL function class) and generally freaks out after that. Now, obviously it should be able to find the class since it managed to find it on the initial rendering of the page.
    Am I missing something about using EL functions in a JSF tag? (I'm using JBoss Seam under the covers, but am not sure if this is a Seam issue or a pure-JSF issue.) Thanks for any light you folks can shed on this.

    The Faces Context is set up by the Faces Servlet, which hasn't run yet in a filter.
    I haven't tried it, but [url http://blog.lightwaysoftware.com/2010/10/accessing-facescontext-from-a-servlet-filter/]this may help you.
    DOH! That's what you are doing already.
    If you're using JDev 11.1.2.x, you could try [url http://ocpsoft.com/java/jsf-java/jsf-20-extension-development-accessing-facescontext-in-a-filter/]this
    John

  • NullPointer in invoking JNI function

    Hi everybody.
    I have small problem. I'm trying to call dll (jnidll) function (f1) from java that calls function (f2) in another dll (that is not jni - actually is 3rd party so I cannot change it).
    I have no problem calling function f1 from my java application, and I have no problem calling function f2 from another C++ test application. But I have problem calling f1 that calls f2.
    I get NullPointerException to my java application.
    Does anybody have an idea how to solve it?
    I tried also to use jawin.dll for calling that non-jni dll but had the same (NullPointer) problem.

    Ok, first I wanted only quick answer, if anybody had the same problem. Now I will post my code here, because I didn't solved the problem yet.
    Let's suppose that the name of the jni dll I'm trying to create is myjnidll.dll. It's header file has jni.h included and e.g. two following lines:
    JNIEXPORT jint JNICALL Java_JniPosApi00_MbtConnect (JNIEnv *, jobject, jstring);
    JNIEXPORT jint JNICALL Java_JniPosApi00_MbtDisconnect (JNIEnv *, jobject);Source file of my dll has following definitions of that functions. Name of called 3rd party dll is 3rdparty.dll and it has functions Connect and Disconnect exported with the following names _Connect@4 and _Disconnect@0.
    #include <windows.h>
    #include <jni.h>
    #include "myjnidll.h"
    typedef long (__stdcall *INTxVOID)();
    typedef long (__stdcall *INTxSTR)(LPCTSTR);
    JNIEXPORT jint JNICALL Java_JniPosApi00_mConnect
      (JNIEnv * jEnv, jobject jObj, jstring jszSubSystem) {
        LPCTSTR szSubSystem = jEnv->GetStringUTFChars(jszSubSystem, 0);
        long result = 1;
        INTxSTR ProcAdd;
        HINSTANCE hinstLib = LoadLibrary("3rdparty.dll");
        if (hinstLib != NULL) {
            ProcAdd = (INTxSTR) GetProcAddress(hinstLib, "_Connect@4");
            if (ProcAdd != NULL)
                res = (ProcAdd)("SUBSYSTEM1");
        jEnv->ReleaseStringUTFChars(jszSubSystem, szSubSystem);
        FreeLibrary(hinstLib);
        return res;
    JNIEXPORT jint JNICALL Java_JniPosApi00_mDisconnect
      (JNIEnv * jEnv, jobject jObj) {
        long res = 1;
        INTxVOID ProcAdd;
        HINSTANCE hinstLib =  = LoadLibrary("3rdparty.dll");
        if (hinstLib != NULL) {
            ProcAdd = (INTxVOID) GetProcAddress(hinstLib, "_Disconnect@0");
            if (ProcAdd != NULL)
                res = (ProcAdd)();
        FreeLibrary(hinstLib);
        return res;
    }I'm sure, that the 3rdparty.dll library is in the system path.
    Parameters of functions in 3rd party dll are (from the description that I have):
    Connect(UCHAR FAR*)
    Disconnect(void)Both functions return int. I think there will be no problem with parameters.
    My java program that is calling myjnidll is
    public class MyJavaCallingJniDll {
        public native int mConnect (String szSubSystem);
        public native int mDisconnect ();
        static {
            System.loadLibrary("myjnidll");
        public MyJavaCallingJniDll() {
        public int myConnect (String szSubSystem) {
            return mConnect (szSubSystem);
        public int myDisconnect (){
            return mDisconnect ();
    }and I'm calling this from another java class, but there is no problem for sure.
    So I did som tests and the result is, that when calling from java I get NullPointerException when I'm trying to call mConnect() (or mDisconnect()).
    When I try to call from C++ I get "Unhandled exception, blabla Access violation" at the line where I'm trying to invoke functions from 3rd party dll.
    I have no idea, where's the problem. Thanks anybody, who's trying to help me.

Maybe you are looking for

  • Save Data in Report to Use later

    I have several names to report I need to combine data from several records of the same type with different codes. Not all names have the same codes. I want to report the data on one line. Is there a way to save date to be used later in the report? Fo

  • Captivate 4 - changing playbar button order?

    I would like to change the order and size of the playbar buttons in Captivate 4 - Is this possible? A search reveals it was possible in Captivate 3 but it doesn't appear to apply to Captivate 4.

  • Why Aperture 3.0 takes that long to soften one simple RAW picture?

    Hi, I just have aperture 3 installed and found one simple action such as soften skins in one NEF file takes several seconds to 'processing'. i just got a new macbook pro, 371 last week, which should be powerful enough, I thought to run program like a

  • UnknownHostException when using well-known-addresses prevents startup

    We found an issue that seems like a bug in Coherence. We are using well-known-addresses instead of multicast server discovery. Everything worked great, until one of the servers that used to be in the list was removed from DNS. We are no longer able t

  • Graph Theory Algorithm-All possible paths between 2 vertices w/ constraints

    Hi all, I have a project I'm working with. I need to find all possible paths between two vertices on a graph. I realize this will be NP-complete or worse, but right now i'm looking for a brute force method to do this via algorithm/pseudocode Given: c