VB, VC++/Pro C dll Problems 
Author Message
 VB, VC++/Pro C dll Problems

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)
{
...

Quote:
}

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

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.



Sat, 05 Feb 2000 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. VB, VC++/Pro C dll Problems

2. problem: vc++ dll and vb

3. Need help passing a DC handle from vb to a vc++ dll

4. Calling VC++ programs and VC created dlls from VB

5. use dlls created with vc++ in vb

6. problem with calling DLL(VC++) from VB application

7. Problem in Calling VC++ DLL in VB code on WinCE

8. Problem in call to VC++ dll from VB

9. Problems calling a VC DLL from VB

10. Problems passing Device Context handels from VB 4.0 to VC++2.0 DLL’s

11. VB/VC++ DLL problem

12. Problem Paasing 2-D Array using SAFEARRAY in DLL written with VC++ 5.0 from VB.

 

 
Powered by phpBB® Forum Software