Can't  use parameter reference from DLL C on pl/sql

hi all, I have dll(newStr.dll) write by c language with a function name is "strNew", following code in c and pl/sql:
char* strNew(char *& str){
     if (str != NULL){
          str = strdup("");
          str = strcat(str,"String is not null.");     
     }else{
          str = strdup("");
          str = strcat(str,"String is null.");     
     return str;
On PL/SQL I call the dll(newStr.dll), following code on pl/sql:
1) Create library:
     CREATE OR REPLACE LIBRARY TestDLL AS 'D:\newStr.dll';
2) Create package:
     CREATE OR REPLACE
     PACKAGE TEST_DLL AS
     FUNCTION strNew(str IN OUT varchar2) RETURN VARCHAR2;
     END TEST_DLL
     CREATE OR REPLACE
     PACKAGE BODY TEST_DLL AS
     FUNCTION strNew(str IN OUT VARCHAR2)
     RETURN VARCHAR2 AS
     EXTERNAL LIBRARY TestDLL
     NAME "strNew"
     LANGUAGE C
     CALLING STANDARD PASCAL
     PARAMETERS(str BY REFERENCE STRING, return STRING);
END TEST_DLL
3) Create Procedure:
CREATE OR REPLACE
PROCEDURE TESTPRO AS
newStrIn varchar2(40) :='test';
newStrOut varchar2(256);
BEGIN
newStrOut := TEST.strNew(newStrIn);
DBMS_OUTPUT.PUT_LINE('newStrOut = ' || newStrOut );
DBMS_OUTPUT.PUT_LINE('newStrIn = ' || newStrIn );
END TESTPRO;
4) Run procedure the result following:
newStrOut = String is not null.(it correct)
newStrIn= 8!(it wrong, the newStrIn='String is not null' is correct))
I not found root cause why in pl/sql, I can't get the variable reference from dll c.
Please help me.
Quan.

For compatibility purposes you would probably be better using 10g development rather than 9i if you are going to use a 10g database. I'm not familiar with the latest versions in terms of Oracle Forms, cos I stopped developing in Forms back on version 8.
Essentially there are different components you can download and install.
Database - This sets up a database server and allows you to create databases to store your data in.
Client - This installs the necessary client software to allow you to connect to a database on a database server. It includes client software such as SQL*Plus and the drivers needed to make the connections.
Developer - This is a client side development environment for developing forms and reports. It requires the Client software in order to be able to connect to the database.
By the sounds of it you have downloaded and installed the last two, but without the first one you don't have a database to connect to.

Similar Messages

  • How can i use class reference from an array effeciently?

    Hi,
    I made some test here with getting a class reference from an array and using the reference's methods or variables.
    Basically arrayEx is a container of type Array and it contains the Person's class instance in it. Num is a number extracted from the Person's instance
    Example #1----Strongly typed
    Var reference:Person;
    Var num:int;
    //Assignation
    reference=arrayEx[0];-----IT IS SLOW HERE
    //Use
    num=reference.number --- IT IS FAST HERE
    Example #2---Not typed
    Var reference:*;
    Var num:int;
    //Assignation
    reference=arrayEx[0]; ---- IT IS FAST HERE
    //Use
    num=reference.number ---IT IS SLOW HERE
    No matter what i change in both code like casting Person on arrayEx, i cant seem to make them work both fast at the same time
    If someone knows how, please tell me,
    Dominik

    Hi,
    I made some test here with getting a class reference from an array and using the reference's methods or variables.
    Basically arrayEx is a container of type Array and it contains the Person's class instance in it. Num is a number extracted from the Person's instance
    Example #1----Strongly typed
    Var reference:Person;
    Var num:int;
    //Assignation
    reference=arrayEx[0];-----IT IS SLOW HERE
    //Use
    num=reference.number --- IT IS FAST HERE
    Example #2---Not typed
    Var reference:*;
    Var num:int;
    //Assignation
    reference=arrayEx[0]; ---- IT IS FAST HERE
    //Use
    num=reference.number ---IT IS SLOW HERE
    No matter what i change in both code like casting Person on arrayEx, i cant seem to make them work both fast at the same time
    If someone knows how, please tell me,
    Dominik

  • How can I use LDAP searching from OSX Lion Server to Mozilla Thunderbird?

    How can I use LDAP searching from OSX Lion Server to Mozilla Thunderbird?  We have a super awesome contacts server that works great for our Mac users.  About 30% of our company are on PCs, and I would like to use the Mozilla Thunderbird mail client for them.  I see that in Thunderbird I can set up LDAP searching, and would like to have this feature point to our contacts server.  I've tried several different settings, and looked all over the web, but could not find the proper way to configure this.  Does anyone know if this can be done, or if not, would have a better suggestion?  Thank you for your time!!

    try double clicking keychain acces should launch and ask if you want to install login, system, System roots
    A dialog box will launch asking where to install the cert since your configuring a vpn I would put the certificate it in system.

  • I can not find my playlists on apple tv. How can I use my playlists from itunes on apple tv ?

    I can not find my playlists on apple tv. How can I use my playlists from itunes on apple tv ?

    Hey luisathome,
    Thanks for the question. The following resource outlines how to setup Home Sharing between your Apple TV and computer:
    iTunes 11 for Mac: Play items in your iTunes library using Apple TV (2nd generation or later)
    http://support.apple.com/kb/PH12153
    Thanks,
    Matt M.

  • How can I use a pic from iPhoto as a background for a page, How can I use a pic as a background for a page

    How can I use a pic from iPhoto as a background for a page, How can I use a pic as a background for a page

    cd,
    Insert the picture and position it as you desire
    Make sure the picture is set to Floating in the Wrap Inspector
    Arrange > Send Objects to Background
    Regards,

  • Invalid Certificate Microsoft Outlook cannot sign or encrypt this message because you have no certificates which can be used to send from your e-mail address.

    Hi,
    I have a problem when trying to sign emails with an X.509 certificate in Outlook 2010. I constantly get the error message. The certificate is Verified for the email address I'm sending from.
    "Invalid Certificate
    Microsoft Outlook cannot sign or encrypt this message because you have no certificates which can be
    used to send from your e-mail address."I have no problem with signing documents in Word 2010 with the same certificate, only when trying to send email.Every check I can perform confirms that there's nothing wrong with the certificate. Yet, Outlook still says it is invalid.I have even tried installing a second X.509 for the same email address just to check. Outlook doesn't seem to like either certificate.I know this has been posted before, but I'm completely stuck here.Thanks,~Dan

    Hi,
    You may have checked the option "Encrypt contents and attachments for outgoing messages" in Outlook, please uncheck this to test if the problem persists.
    File -> Options -> Trust Center -> Trust Center Settings -> E-mail Security -> Clear the checkbox "Encrypt contents and attachments for outgoing messages" -> OK.
    Regards,
    Melon Chen
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs. Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • I want to install a new hard drive on my 2008 MacBook but do not have the instillation discs that came with my computer.  Can I use instillation discs from a 2009 or 2010 MacBook?

    I want to install a new hard drive on my 2008 MacBook but do not have the instillation discs that came with my computer.  Can I use instillation discs from a 2009 or 2010 MacBook?  The hard drive I am planning to install is a WD Scorpio Black 500GB SATA 2.5'' internal hard drive.

    Sometimes they do work - i've done it before.  I have a late 2008 Macbook Uni and used the install dvd of my 2009 Macbook White and it worked.
    Why not just clone your hard drive?  It'll save you a lot of time doing a clone rather than doing a clean install.
    Unless you're having issues with your old set up or  your old hard drive is dead.
    You can download Carbon Copy Cloner - install your new hard drive in a external usb enclosure (around $10) and clone fromt here then test it before you install it in your Macbook.
    Once you've done the swap, you can install your old hard drive in the USB enclosure and use it as a backup drive.
    Good luck

  • Hi - have lost my Install DVD for my macbook Pro - can I use the one from my husbands Macbook or how do I get a new one??

    Hi
    Have lost my Install DVD for macbook pro and need it because my computer black out all the time - can I use the one from my husbands macbook (not pro) or how do I get a new one???

    10.6 Snow Leopard ?
    You can call Apple and order one.  1-800-275-2273
    You cannot use an install dvd that is shipped with another computer.

  • Can I use the sim from my iphone 5c in the ipad air wifi cellular?

    Can I use the sim from my iphone 5c in the ipad air wifi+cellular?

    Both the iPad Air and iPhone 5C use a nano-SIM. Physically, they will work, but your operator may have some restriction. You should check with them.

  • Can I use my charger from my G4 iPod?

    Can I use the charger from my G4 iPod on my G5 iPod or will it fry it?
    Thanks!
    iBook   Mac OS 9.0.x  

    It will work fine.
    USB is USB all over the world.

  • HT5299 Thunderbolt-Can you use an  adaptor From a thunderbolt External drive to a firewire 800/400 Mac

    Thunderbolt-Can you use an  adaptor From a thunderbolt External drive to a firewire 800/400 Mac

    No. The Thunderbolt to Firewire adapters only work to connect a Firewire drive to a Thunderbolt port. They do not work in reverse, to connect a Thunderbolt-only drive to a Firewire port. If the only port your drive has is a Thunderbolt port and all you have on the Mac is Firewire, you can't use that drive with that computer.
    Regards.

  • Can I use AC charger from ipod mini on new nano???

    My son had an ipod mini. He had bought an AC charger for it. I am buying him an ipod nano for his birthday (ipod mini went bad...). Can he use the charger from the mini to the nano???

    Maybe, depends on the charger. It would appear that while older iPods only needed the power pins, newer ones may require the data pins to also be active for charging. Some chargers do not connect the data pins at all.
    But it won't damage the Nano. It will either work fine or do nothing at all.
    Which charger is it?
    Patrick

  • Can i use App schema from another Oracle database.

    Hi everyone,
    can i use application schema from another Oracle database and how can we do this. the reason is that current database where apex is installed is get very slow because of the size of database and application usage.
    Regards,
    Kashif.

    user10485983 wrote:
    Please update your forum profile with a real handle instead of "user10485983".
    can i use application schema from another Oracle database and how can we do this. the reason is that current database where apex is installed is get very slow because of the size of database and application usage.
    You can (using database links), but this will generally result in even poorer performance (unless by "another Oracle database" you mean using RAC?)
    It sounds more like you either need to upgrade your systems, or refactor your applications to have a smaller performance footprint.

  • Can i use the sim from an ipad1 in ipad2

    can i use the sim from a ipad1 in a ipad2

    Yes. Try inserting the SIM into the new iPad. If you have already set the iPad up, you may have to restore it and put all the data back on.

  • How can I using functions implicit in dll file in java code ?

    How can I using functions implicit in dll file in java code ?
    I'm developing a program that interfacing with fingerprint hardware.
    I have the finger print already, and I have to the SDK that have all functions for managing this fingerprint.
    These SDK functions are represented in dll files.
    I want to know how can I use these functions in java code .
    I looked on this link of sun forums :
    http://forum.java.sun.com/thread.jspa?threadID=305171&messageID=1215613
    but I don't Understand the meaning of native code.
    Thanks for help.

    please please please please please please please please help me:
    After reading a lot of articles, tutorials, and overviews about JNI (Java Native Interface)
    I found that these steps
    1.     Develop the Java code
    2.     Compile the Java code to a class file
    3.     Generate the header file
    4.     Implement the native method
    5.     Create the shared library or DLL
    6.     Run the Java program
    Is the common steps in JNI development
    The most powerful link was
    http://java.sun.com/docs/books/jni/html/start.html
    and
    http://www.netbeans.org/kb/55/beginning-jni-part2.html
    and the pdf oh this link
    http://www.ibm.com/developerworks/edu/j-dw-javajni-i.html requiring IBM registration to download it.
    But I have already the DLL, and want to the stright forward way to use its functions by java code only.
    I don not to write any C++ code .
    Is this possible???????????????????????????????
    The name of these dll is �zkemsdk.dll�
    It developed by ZKSOFTWARE company for managing a finger print �NP1500A�of
    http://www.napcogulfsecurity.com/finger_print.asp
    thanks for help

Maybe you are looking for