BUG: Problems when Function Name Exceeds 127 Characters |
Q117797
When you build a Windows DLL with Visual C++, version 1.0, the compiler may
hang.
When you build a Windows DLL with Visual C++, version 1.5, under Windows
NT, IMPLIB fails with the following error message:
Under Windows or Windows for Workgroups, IMPLIB returns the following DOSXNT error messages:IMPLIB.EXE - Application Error
The instruction at "0x0001b14d" referenced memory at "0x00164000". The memory could not be "written".
DOSXNT : fatal error DX1020: unhandled exception: General protection fault
DOSXNT : system error DX5110: ProcTerm: error(s) occurred during process termination
The name of an exported function is longer than 127 characters. This can occur with a decorated name if the function takes several parameters with different data types.
With a C++ DLL, shorten the parameter names of the function and/or the function's name until its decorated name is 127 characters or less. With a C DLL, shorten the function name so that it is 127 characters or less.
Microsoft has confirmed this to be a bug in Visual C++ for Windows, versions 1.0 and 1.5. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
When the sample code below is compiled in a C++ DLL, TestRoutine's
decorated name has 128 characters in it. To reproduce the problems listed
above, perform the following steps:
/* Project Options needed = /Alw /GD
#include "windows.h"
#ifdef __cplusplus
extern "C"
{
#endif
typedef struct tagFIRSTPARAMARGS FIRSTPARAMARGS;
typedef FIRSTPARAMARGS * PFIRSTPARAMARGS;
struct tagFIRSTPARAMARGS
{ int dummy; };
typedef struct tagSECONDPARAMARGS SECONDPARAMARGS;
typedef SECONDPARAMARGS * PSECONDPARAMARGS;
struct tagSECONDPARAMARGS
{ int dummy; };
typedef struct tagTHIRDPARAMARGS THIRDPARAMARGS;
typedef THIRDPARAMARGS * PTHIRDPARAMARGS;
struct tagTHIRDPARAMARGS
{ int dummy; };
typedef struct tagFOURTPMARGS FOURPARGS;
typedef FOURPARGS * PFOURTHPARGS;
struct tagFOURTPMARGS
{ int dummy; };
typedef struct tagNOTIFYPARAMARGS NOTIFYPARAMARGS;
typedef NOTIFYPARAMARGS * PNOTIFYPARAMARGS;
struct tagNOTIFYPARAMARGS
{ int dummy; };
#ifdef __cplusplus
}
#endif
int PASCAL __export TestRoutine (PFIRSTPARAMARGS pFirstParamArgs,
PSECONDPARAMARGS pSecondParamArgs,
PTHIRDPARAMARGS pThirdParamArgs,
PNOTIFYPARAMARGS pNotifyParamArgs,
PFOURTHPARGS pFourthParamArgs)
{ return 0; }
Additional query words: 1.00 1.50 buglist1.00 buglist1.50
Keywords : kb16bitonly
Issue type : kbbug
Technology : kbVCsearch kbAudDeveloper kbvc150 kbvc100
|
Last Reviewed: May 9, 2001 © 2001 Microsoft Corporation. All rights reserved. Terms of Use. |