[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference 7.286::visualc

Title:Microsoft Visual C/C++
Moderator:PLUGH::needle
Created:Tue Mar 16 1993
Last Modified:Wed Jun 04 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:1121
Total number of notes:4385

1087.0. "VC++ calls to a DLL (acmsdi.dll)" by ESSB::PMOYLAN () Tue Feb 11 1997 12:32

I have a DLL called acmsdi.dll which handles the processes,  
connections etc. between Windows and Digital VMS using ACMS.

I am calling this DLL from Visual C++ (4.0). 

I have used '_declspec (dllimport) void func(..);' as a 
function declaration - this did not work.

I have also used 'void extern WINAPI void func(..);' as a 
function declaration - this did not work.

Is there any other method of calling a DLL function from C 
(compatible with VC 4.0 ), or am I using the above methods 
incorrectly.
   
T.RTitleUserPersonal
Name
DateLines
1087.1More clues?DIMOND::DZIEDZICTony Dziedzic - DTN 381-2438Tue Feb 11 1997 15:545
    Could you elaborate on "didn't work"?  Do you mean you couldn't
    call into the library, or things blew up when you did?
    
    You'll probably want to put 'extern "C"' in front of the function
    prototypes to prevent any name mangling by the compiler.