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.
|
|
/*++
Copyright (c) 1996 Microsoft Corporation
Module Name:
charset.h
Abstract:
Contains prototypes Unicode <-> Ansi/MBCS conversions (see charset.c)
Author:
Danilo Almeida (t-danal) 06-17-96
Revision History:
--*/
#include <windows.h>
//#include <memory.h>
//
// Memory allocation macros
//
#define \
MyAllocMem( \ Size, \ pBuffer \ ) \ ( \ (*pBuffer = (LPBYTE)AllocADsMem((DWORD)Size)) == NULL \ ? \ ERROR_NOT_ENOUGH_MEMORY \ : \ NO_ERROR \ );
#define \
MyFreeMem( \ Buffer \ ) \ ( \ FreeADsMem((void *)Buffer) \ );
// Function prototypes
UINT AllocAnsi( LPCWSTR pwszUnicode, LPSTR *ppszAnsi );
VOID FreeAnsi( LPSTR pszAnsi );
UINT AllocUnicode( LPCSTR pszAnsi, LPWSTR *ppwszUnicode );
int AllocUnicode2( LPCSTR pszAnsi, int cch, LPWSTR *ppwszUnicode );
VOID FreeUnicode( LPWSTR pwszUnicodeAllocated );
|