Skip to Main Content

Oracle Forms

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to Read a character pointer from a DLL with WEBUTIL

327559Dec 20 2007 — edited Dec 21 2007
Hi guys,

I need some help with Webutil (Forms 10g and OAS). The oracle support can´t show me the way. 8-(

I have a DLL, witten in C, that returns a error message, like this:
char erro[12] = "Erro Fatal!";
char *ptr_erro = erro;

char * Display_Erro(int Ip_Setado)
{
return erro;
}

Looks pretty simple...

I have a PL/SQL function:
FUNCTION Display_Erro( IP_SETADO IN OUT PLS_INTEGER ) RETURN VARCHAR2 IS
RC VARCHAR2(32000) := RPAD(' ',32000,CHR(0));
l_IP_SETADO PLS_INTEGER := IP_SETADO;
args WEBUTIL_C_API.ParameterList;
param1 WEBUTIL_C_API.ParameterHandle;
BEGIN
args := WEBUTIL_C_API.create_parameter_list;
param1 := WEBUTIL_C_API.add_parameter( args
,WEBUTIL_C_API.C_INT
,WEBUTIL_C_API.PARAM_IN
,l_IP_SETADO );

-- Here's what the hole thing happens... better say: don´t happen 8-(
RC := WEBUTIL_C_API.Invoke_STRING("MyDLL.dll", 'Display_Erro', args);

WEBUTIL_C_API.Destroy_Parameter_List(args);
RETURN RC;

END Display_Erro;


I try:
WEBUTIL_C_API.Invoke_PTR = DLL Error
WEBUTIL_C_API.Invoke_STRING = Forms Error
WEBUTIL_C_API.Invoke_CHAR = DLL Error
WEBUTIL_C_API.Invoke_LONG = Gimme the Memory Address (...and what I´ve todo with this?)

So, who I've to kill to get a string "Erro Fatal!" in RC varchar?

Thank´s in advance... and sorry my english.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 18 2008
Added on Dec 20 2007
2 comments
474 views