Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> c cartridge (cweb) install problem
c cartridge (cweb) install problem
We are having problems getting OAS 4.0.8.1 to recognize our C cartridge. We are running on NT 4.0 and have created a dll for the Hello World example in the OAS Developer's Guide for C Applications. We use Microsoft's Visual C++ to create the dll.
We've specified the location of the dll, the entry point, and the virtual path. However, when we try to access it from a browser, we get the 'application error has occurred' message. I've included the details below.
Any help would be appreciated.
Miki
#ifdef HELLOORACLE_EXPORTS
#define HELLOORACLE_API __declspec(dllexport)
#else
#define HELLOORACLE_API __declspec(dllimport)
#endif
extern "C" {
# include "oratypes.h"
# include "wrb.h"
}
HELLOORACLE_API WRBReturnCode testentry (WRBCallbacks *WRBCalls); HELLOORACLE_API WRBReturnCode test_init(void *, void **); HELLOORACLE_API WRBReturnCode test_auth(void *WRBCtx, void *clientcxp,boolean *bAuthorized);
#include "helloOracle.h"
#include <string.h>
#include <stdlib.h>
HELLOORACLE_API WRBReturnCode testentry (WRBCallbacks *WRBCalls) {
WRBCalls->init_WRBCallback = test_init; WRBCalls->authorize_WRBCallback = test_auth; WRBCalls->exec_WRBCallback = test_exec; WRBCalls->shut_WRBCallback = test_shut;
return WRB_DONE;
}
HELLOORACLE_API WRBReturnCode test_init(void *WRBCtx, void **clientcxp) {
return WRB_DONE;
}
HELLOORACLE_API WRBReturnCode test_auth(void *WRBCtx, void *clientcxp, boolean *bAuthorized) {
text *userID, *password; userID = WRB_getRequestInfo(WRBCtx, WRBR_USER); password = WRB_getRequestInfo(WRBCtx, WRBR_PASSWORD); if (*bAuthorized = ((userID != (text*)NULL) && !strcmp((const char *) userID, "guest") && (password != (text *)NULL) && !strcmp((const char *) password, "welcome"))) return WRB_DONE; else { WRB_setAuthBasic(WRBCtx, (text *) "Aloha World"); return WRB_DONE; }
HELLOORACLE_API WRBReturnCode test_exec(void *WRBCtx, void *clientcxp) {
char *cp = "Content-type: text/html<HTML>\n\n" \ "<HEAD><TITLE>Aloha World</TITLE></HEAD>\n" \ "<BODY bgcolor=\"white\"><p>Aloha cuzin, howzit?<HR>\n" \ "<ADDRESS>(c) 1998 Oracle Corp</ADDRESS></BODY></HTML>"; WRBClientWrite(WRBCtx, cp, strlen(cp)); return WRB_DONE;
HELLOORACLE_API WRBReturnCode test_shut(void *WRBCtx, void *clientcxp) {
return WRB_DONE;
}
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Fri Oct 13 2000 - 14:34:30 CDT