بتاريخ: 25 مايو 200619 سنة comment_70198 كيف يتم استخدم ملفات DLL في developer6i لاني لم استخدمها من قبل ......وهل بالامكان شرح لاستخدام هذه الملفات وكيف ربطها في الفورم تقديم بلاغ
بتاريخ: 27 مايو 200619 سنة comment_70360 hi all how to read dll file in oracle you need to call dll file with external procedure like this example :------------------------------------------------------First, we need to define a "library" to tell Oracle where the DLL lives /* Filename on companion disk: nt_space.sql */CREATE OR REPLACE LIBRARY nt_kernelAS 'c:\windows\system32\kernel32.dll';------------------------------------------------------We'll create a package called disk_util that will contain our function, which we will call get_disk_free_space as shown here: CREATE OR REPLACE PACKAGE disk_utilAS FUNCTION get_disk_free_space (root_path IN VARCHAR2, sectors_per_cluster OUT PLS_INTEGER, bytes_per_sector OUT PLS_INTEGER, number_of_free_clusters OUT PLS_INTEGER, total_number_of_clusters OUT PLS_INTEGER) RETURN PLS_INTEGER; PRAGMA RESTRICT_REFERENCES (get_disk_free_space, WNPS, RNPS, WNDS, RNDS);END disk_util;------------------------------------------------------All the magic is in the package body, which uses the EXTERNAL clause rather than a BEGIN..END block. This clause is where we define the interface between PL/SQL and the external routine: CREATE OR REPLACE PACKAGE BODY disk_utilAS FUNCTION get_disk_free_space (root_path IN VARCHAR2, sectors_per_cluster OUT PLS_INTEGER, bytes_per_sector OUT PLS_INTEGER, number_of_free_clusters OUT pls_integer, total_number_of_clusters OUT PLS_INTEGER) RETURN PLS_INTEGER IS EXTERNAL LIBRARY nt_kernel -- our library (defined previously) NAME "GetDiskFreeSpaceA" -- name of function in kernel32.dll LANGUAGE C -- external routine is written in C CALLING STANDARD PASCAL -- uses Pascal parameter convention PARAMETERS -- map PL/SQL to C parameters by -- position (root_path STRING, sectors_per_cluster BY REFERENCE LONG, bytes_per_sector BY REFERENCE LONG, number_of_free_clusters BY REFERENCE LONG, total_number_of_clusters BY REFERENCE LONG, RETURN LONG); -- "return code" indicating success or failureEND disk_util;------------------------------------------------------SET SERVEROUTPUT ON SIZE 100000DECLARE lroot_path VARCHAR2(3) := 'C:\'; -- look at C drive lsectors_per_cluster PLS_INTEGER; lbytes_per_sector PLS_INTEGER; lnumber_of_free_clusters PLS_INTEGER; ltotal_number_of_clusters PLS_INTEGER; return_code PLS_INTEGER; free_meg REAL;BEGIN /* Call the external procedure. We ignore the return code || in this simple example. */ return_code := disk_util.get_disk_free_space (lroot_path, lsectors_per_cluster, lbytes_per_sector, lnumber_of_free_clusters, ltotal_number_of_clusters); /* Using the drive statistics that are returned from the || external procedure, compute the amount of free disk space. || Remember Megabytes = (Bytes / 1024 / 1024) */ free_meg := lsectors_per_cluster * lbytes_per_sector * lnumber_of_free_clusters / 1024 / 1024; DBMS_OUTPUT.PUT_LINE('free disk space, megabytes = ' || free_meg);END;-----------------------------------------------------good luck any help send me in my mail تقديم بلاغ
بتاريخ: 1 يونيو 200619 سنة كاتب الموضوع comment_70949 والله ما فهمت حاجه ممكن توضح بالعربي تقديم بلاغ
بتاريخ: 1 يونيو 200619 سنة comment_70959 http://www.araboug.org/ib/index.php?showtopic=14441&hl= تقديم بلاغ
انضم إلى المناقشة
يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.