Older Function Prototypes Fail in VC++ 2003 Compiler

  • Thread starter Thread starter Harry Whitehouse
  • Start date Start date
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
 
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
 
Back
Top