Older Function Prototypes Fail in VC++ 2003 Compiler

H

Harry Whitehouse

I'm porting an application from Borland C++ to VS .NET 2003. The VC++
compiler doesn't want to deal with declarations like this in my code:

LONG FAR PASCAL _export StdPVDlgProc(HWND hWnd, UINT msg, WPARAM wParam,
LPARAM lParam)

{

}

I gather this is part of VC 2003's compiler standards compliance:

http://msdn.microsoft.com/library/d...ml/vclrfStandardComplianceIssuesInVisualC.asp

But I'm at a loss as to how to define my function in the VC++ environment
while maintaining their original functionality.

Can anyone give me some help?

TIA

Harry
 
C

Carl Daniel [VC++ MVP]

Harry said:
I'm porting an application from Borland C++ to VS .NET 2003. The VC++
compiler doesn't want to deal with declarations like this in my code:

LONG FAR PASCAL _export StdPVDlgProc(HWND hWnd, UINT msg, WPARAM
wParam, LPARAM lParam)

{

}

I gather this is part of VC 2003's compiler standards compliance:

http://msdn.microsoft.com/library/d...ml/vclrfStandardComplianceIssuesInVisualC.asp

But I'm at a loss as to how to define my function in the VC++
environment while maintaining their original functionality.

Can anyone give me some help?

_export is a Borland-specific extension, not part of the C/C++ standard and
never supported by VC++.

You need to replace it with the corresponding Microsoft-specific extension:

LONG FAR PASCAL __declspec(dllexport) StdPVDlgProc(
HWND hWnd,
UINT msg, WPARAM wParam,
LPARAM lParam
)

-cd
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top