home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!oracle!unrepliable!bounce
- Newsgroups: comp.databases.oracle
- From: dcriswel@oracle.uucp (David Criswell)
- Subject: Re: Using Pro*C from inside a Windows DLL
- Message-ID: <1993Jan8.202437.14795@oracle.us.oracle.com>
- Sender: usenet@oracle.us.oracle.com (Oracle News Poster)
- Nntp-Posting-Host: mailseq.us.oracle.com
- Organization: Oracle Corporation, Redwood Shores CA
- References: <1993Jan07.204648.21545@dlogics.com>
- Date: Fri, 8 Jan 1993 20:24:37 GMT
- X-Disclaimer: This message was written by an unauthenticated user
- at Oracle Corporation. The opinions expressed are those
- of the user and not necessarily those of Oracle.
- Lines: 33
-
- In article <1993Jan07.204648.21545@dlogics.com> rsimkin@dlogics.com (Rick Simkin) writes:
- >I've been asked to find out...
- >
- >Is it possible to write a DLL for Microsoft Windows which uses Pro*C? Are
- >there special restrictions, limitations or tricks that you need to know?
- >Has anybody out there actually written a DLL that uses Pro*C?
- >
- >Thanks for any help you can give me on this. (I myself have no experience
- >with Pro*C or DLLs--at least, not yet :-)
- >
- >================ I speak for myself only, not for my employer ================
- >Rick Simkin UUCP: uunet!dlogics!rsimkin
- >Datalogics, Inc. INTERNET: rsimkin@dlogics.com
- >441 W. Huron St. PHONE: +1 312 2664437
- >Chicago, Illinois 60610-3498 USA FAX: +1 312 2664473
-
- Yes, this works. Specify REENTRANT=YES on the Pro*C command line and include
- only 1 function per .pc file. Declare the variables as local to the
- procedure, i.e.
- int proc ()
- {
- EXEC SQL BEGIN DECLARE SECTION
- char myvar
- EXEC SQL END DECLARE SECTION
- ...
- }
- The reentrancy stuff is due to the fact that under Windows, all instances of
- a dll share the same data space - the reentrant problems crop up when a second
- instance invokes the DLL. If the DLL is only to be used by 1 app, this isn't
- necessary.
-
- Dave Criswell
- Oracle Desktop Products
-