VB, VC++/Pro C dll Problems

From: <rm_at_netcomuk.co.uk>
Date: 1997/08/19
Message-ID: <33fa24fc.4425959_at_nntp.netcruiser>#1/1


I'm using Pro C v2.2 and VC++4.2 (with VB4 front end) to extract data from an Oracle7.1 database under NT3.51.

I'm creating a C dll with functions I can call from VB4 32bit edn. I have added sqllib18.lib to my project and am using the following 2 macros as defined in vb4dll.txt:
#ifdef _WIN32

  #define CCONV _stdcall
  #define NOMANGLE
#endif

My function then looks like:
NOMANGLE short CCONV retn(void)
{
...
}

I have set the calling convention in Build|Settings to __stdcall.

The problem is that when I build this dll I get the error:



Linking...

   Creating library appserve.lib and object appserve.exp appserve.obj : error LNK2001: unresolved external symbol _sqlcxt_at_16 debug\appserve.dll : fatal error LNK1120: 1 unresolved externals


However, on changing the calling convention in Build|Settings to __cdecl*, my dll compiles and links (but then I can't call the function from VB4 - get error "Bad DLL calling convention").

Can you please help? How difficult would it be to build an OLE server instead with the same functionality?

Thanks

Raz. Received on Tue Aug 19 1997 - 00:00:00 CEST

Original text of this message