Re: Looking for examples that call C functions from PL/SQL!
Date: Thu, 12 Aug 1999 08:03:56 +0200
Message-ID: <7otq82$2g7$1_at_news0.skynet.be>
[Quoted] Yass Khogaly wrote in message <7n7vgj$538$1_at_inet16.us.oracle.com>...
>
> long __declspec(dllexport) OutputString(context ,
> path , path_ind ,
> message , message_ind,
> filemode , filemode_ind ,
> len , len_ind )
>
> char *path;
> char *message;
> char *filemode;
> int len;
> OCIExtProcContext *context;
> short path_ind;
> short message_ind;
> short filemode_ind;
> short len_ind;
>
> {
I don't intend to jump on every little detail, but the above declaration will make many compilers complain...
[Quoted] [Quoted] Modern c(++) requests a declaration as follows:
long __declspec(dllexport)
OutputString (
OCIExtProcContext* context ,
char* path,
short path_ind,
char* message,
short message_ind,
char* filemode,
short filemode_ind ,
int len,
short len_ind )
{
[Quoted] Furthermore, if the "path_ind", the "message_ind" etcetera are #defined as literals somewhere in a header file (I can't tell from the posting), it is slightly more efficient to use "int" everywhere (instead of short).
[Quoted] And I don't recall by it by heart, but if you're using M$, it is common to use macro's for linker directives, instead of the "__declspec(dllexport)", but that is -of course- a matter of (bad) taste (hence the nickname "Macro Foundation Classes...").
-- Dirk Bellemans Modify email address to reply (use .be instead of .belgium)Received on Thu Aug 12 1999 - 08:03:56 CEST