Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

56 lines
977 B

/*++
Copyright (c) 1992 Microsoft Corporation
Module Name:
ULToW.c
Abstract:
ULToW converts an unsigned long to a wide-character string.
Author:
John Rogers (JohnRo) 10-Jan-1992
Environment:
Win32 - User mode only.
Requires ANSI C extensions: slash-slash comments, long external names,
_ultoa().
Revision History:
10-Jan-1992 JohnRo
Created.
--*/
#include <windef.h>
#include <netdebug.h> // _ultoa().
#include <stdlib.h> // _ultoa().
#include <tstring.h> // My prototypes.
LPWSTR
ultow (
IN DWORD Value,
OUT LPWSTR Area,
IN DWORD Radix
)
{
CHAR TempStr[33]; // Space for 32 bit num in base 2, and null.
NetpAssert( Area != NULL );
NetpAssert( Radix >= 2 );
NetpAssert( Radix <= 36 );
(void) _ultoa(Value, TempStr, Radix);
NetpCopyStrToWStr( Area, TempStr );
return (Area);
}