469,962 Members | 2,365 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,962 developers. It's quick & easy.

Older Function Prototypes Fail in VC++ 2003 Compiler

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/de...sInVisualC.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


Nov 17 '05 #1
2 1052
Harry Whitehouse wrote:
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/de...sInVisualC.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


Nov 17 '05 #2
Thanks Carl! The compiler seemed to like that permutation!

Best
Harry
Nov 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

21 posts views Thread by Rob Somers | last post: by
90 posts views Thread by Jhon smith | last post: by
6 posts views Thread by marco_segurini | last post: by
9 posts views Thread by wizwx | last post: by
1 post views Thread by Noah Roberts | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.