Hello All,

I am trying to access functionality of shared library from oracle 10 store procedure .

Below is the c function i am trying to call
I have verified all oracle configuration as I am able to call other dll containing simple function using external procedure. I am unable to call function which has user datatype VsLibCtx.

VS_EXPORT int VS_CALLING_CONV VsCreateLibCtx (
unsigned int flags,
unsigned int charSet,
const char* policyLocator,
const char* storageDirectory,
const char* storagePassword,
const char* trustStoreDirectory,
VsLibCtx* libCtx
);
typedef struct VsLibCtxDef *VsLibCtx;

VsLibCtxDef is struct which further refers to other stucts.

I tried creating following oracle function
CREATE OR REPLACE FUNCTION GetLibCtx (flags IN PLS_INTEGER,
charSet IN PLS_INTEGER,
policyLocator IN VARCHAR2 ,
storageDirectory IN VARCHAR2,
storagePassword IN VARCHAR2,
trustStoreDirectory IN VARCHAR2,vsLibCtx OUT PLS_INTEGER) RETURN PLS_INTEGER AS
EXTERNAL
LIBRARY somelib
NAME "VsCreateLibCtx"
LANGUAGE C
PARAMETERS(flags INT, charSet INT ,policyLocator STRING, storageDirectory STRING ,storagePassword STRING, trustStoreDirectory STRING,vsLibCtx BY REFERENCE INT ,RETURN INT);

Function gets successfully created.
Unable to execute call to GetLibCtx

declare
nRetVal NUMBER;
vsLibCtx PLS_INTEGER;
begin
nRetVal := GetLibCtx(0,0,"https://domainname/policy.xml","../storage","","../store",vsLibCtx);
dbms_output.put_line('RetValue:'||nRetVal);
end;