Microsoft KB Archive/888324

= BUG: You do not receive a compiler error message or a warning message when the __declspec(dllexport) keyword appears to the right of the calling-convention keyword in Visual C++ .NET 2003 or in Visual C++ 2005 =

Article ID: 888324

Article Last Modified on 11/16/2007

-

APPLIES TO


 * Microsoft Visual C++ .NET 2003 Standard Edition
 * Microsoft Visual C++ 2005 Express Edition

-





SYMPTOMS
You do not receive a compiler error message or a warning message when the _declspec(dllexport) keyword appears to the right of the calling-convention keyword in Microsoft Visual C++ .NET 2003 or Visual C++ 2005.

The following Microsoft Visual C++ .NET 2003 code example compiles without errors. However, no function is exported. int __stdcall __declspec(dllexport) Func { }



CAUSE
This problem occurs when the _stdcall calling-convention keyword appears before the _declspec keyword in your code.



RESOLUTION
To resolve this problem, put the _declspec keyword before the _stdcall calling-convention keyword in your code. For example, when you resolve this problem in the code example that is mentioned in the &quot;Symptoms&quot; section, the corrected code example looks similar to the following. __declspec (dllexport) int __stdcall Func { }



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the &quot;Applies to&quot; section.



MORE INFORMATION
For more information about how to export from a DLL by using the _declspec(dllexport) keyword, visit the following Microsoft Developer Network (MSDN) Web site:

http://msdn2.microsoft.com/en-us/library/a90k134d(vs.71).aspx

Additional query words: Content Maintenance 25961

Keywords: kbdesigner kbprogramming kbtshoot kbbug KB888324

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.