Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Using LONG RAW in a external Procedure
Hi,
I am trying to pass a long raw into a external procedure made in C. It seems to work for small values put for larger values the extproc Dr Watsons.
I am using oracle 8i on NT + SP3.
The simple C code is meant to just save the long raw onto the file system.
DllExport int WriteRawFile( char * fileName, unsigned char * file, int *
file_len )
{
ofstream tfile( fileName , ios::binary );
tfile.write( file, *file_len );
tfile.close();
return *file_len;
}
The PLSQL function is defined as follows
CREATE OR REPLACE FUNCTION WRITERAWFILE
( filename IN VARCHAR2,
file IN LONG RAW )
RETURN BINARY_INTEGER AS EXTERNAL
LIBRARY pldll
NAME "WriteRawFile"
LANGUAGE C
CALLING STANDARD PASCAL
PARAMETERS (
filename,
file,
file LENGTH );
My guess is that it only really works for RAW and not LONG RAW.
Any pointers will be greatly appricated
Cheers
Andrew Tacchi Received on Wed Jun 02 1999 - 04:39:51 CDT
![]() |
![]() |