Microsoft KB Archive/250906

{|
 * width="100%"|

Prototype of Traffic Notification Handler Changed to Avoid Crash on Win64

 * }

Q250906

-

The information in this article applies to:


 * Microsoft Platform Software Development Kit (SDK) January 2000 Edition

-

SYMPTOMS
In Microsoft Platform SDK releases up to and including the January 2000 edition, the ClNotifyHandler function prototype is declared in traffic.h as follows:

typedef VOID (CALLBACK * TCI_NOTIFY_HANDLER)(   IN  HANDLE      ClRegCtx,    IN  HANDLE      ClIfcCtx,    IN  ULONG       Event,    IN  ULONG       SubCode,    IN  ULONG       BufSize,    IN  PVOID       Buffer    ); A Win32 traffic control program that is compiled by using the ClNotifyHandler declaration will crash in future releases of the Win64 operating system.

CAUSE
The SubCode parameter on the TC_NOTIFY_PARAM_CHANGED event contains a pointer to the globally unique identifier (GUID) for a traffic control parameter. On a Win32-based computer, this works correctly because the size of a pointer is the same as the size of ULONG. However, typing the SubCode parameter to ULONG causes an access violation on a Win64-based computer because the 64-bit pointer is truncated to 32-bit ULONG.

RESOLUTION
To allow your Win32 traffic control program to work "as is" on a future Win64-based computer, modify the ClNotifyHandler function prototype in traffic.h to the following and recompile the program:

typedef VOID (CALLBACK * TCI_NOTIFY_HANDLER)(   IN  HANDLE      ClRegCtx,    IN  HANDLE      ClIfcCtx,    IN  ULONG       Event,    IN  HANDLE      SubCode,    IN  ULONG       BufSize,    IN  PVOID       Buffer    );

STATUS
Microsoft has confirmed this to be a problem in Microsoft Platform SDK releases up to and including the January 2000 edition.

Additional query words:

Keywords : kbnetwork kbAPI kbGQos kbSDKPlatform kbSDKWin32 kbTrafficControl kbDSupport kbGrpDSNet

Issue type : kbbug

Technology : kbWin32SDKSearch kbAudDeveloper kbSDKSearch