Make Unicode const strings static so they are not copied to the stack

each time we enter the function.
This commit is contained in:
Francois Gouget 2004-04-19 20:12:14 +00:00 committed by Alexandre Julliard
parent b7852de12f
commit 6a6c85c6d8
32 changed files with 182 additions and 181 deletions

View File

@ -424,13 +424,13 @@ CreateServiceW( SC_HANDLE hSCManager, LPCWSTR lpServiceName,
HKEY hKey;
LONG r;
DWORD dp;
const WCHAR szDisplayName[] = { 'D','i','s','p','l','a','y','N','a','m','e', 0 };
const WCHAR szType[] = {'T','y','p','e',0};
const WCHAR szStart[] = {'S','t','a','r','t',0};
const WCHAR szError[] = {'E','r','r','o','r','C','o','n','t','r','o','l', 0};
const WCHAR szImagePath[] = {'I','m','a','g','e','P','a','t','h',0};
const WCHAR szGroup[] = {'G','r','o','u','p',0};
const WCHAR szDependencies[] = { 'D','e','p','e','n','d','e','n','c','i','e','s',0};
static const WCHAR szDisplayName[] = { 'D','i','s','p','l','a','y','N','a','m','e', 0 };
static const WCHAR szType[] = {'T','y','p','e',0};
static const WCHAR szStart[] = {'S','t','a','r','t',0};
static const WCHAR szError[] = {'E','r','r','o','r','C','o','n','t','r','o','l', 0};
static const WCHAR szImagePath[] = {'I','m','a','g','e','P','a','t','h',0};
static const WCHAR szGroup[] = {'G','r','o','u','p',0};
static const WCHAR szDependencies[] = { 'D','e','p','e','n','d','e','n','c','i','e','s',0};
FIXME("%p %s %s\n", hSCManager,
debugstr_w(lpServiceName), debugstr_w(lpDisplayName));
@ -894,15 +894,15 @@ QueryServiceConfigW( SC_HANDLE hService,
LPQUERY_SERVICE_CONFIGW lpServiceConfig,
DWORD cbBufSize, LPDWORD pcbBytesNeeded)
{
const WCHAR szDisplayName[] = {
static const WCHAR szDisplayName[] = {
'D','i','s','p','l','a','y','N','a','m','e', 0 };
const WCHAR szType[] = {'T','y','p','e',0};
const WCHAR szStart[] = {'S','t','a','r','t',0};
const WCHAR szError[] = {
static const WCHAR szType[] = {'T','y','p','e',0};
static const WCHAR szStart[] = {'S','t','a','r','t',0};
static const WCHAR szError[] = {
'E','r','r','o','r','C','o','n','t','r','o','l', 0};
const WCHAR szImagePath[] = {'I','m','a','g','e','P','a','t','h',0};
const WCHAR szGroup[] = {'G','r','o','u','p',0};
const WCHAR szDependencies[] = {
static const WCHAR szImagePath[] = {'I','m','a','g','e','P','a','t','h',0};
static const WCHAR szGroup[] = {'G','r','o','u','p',0};
static const WCHAR szDependencies[] = {
'D','e','p','e','n','d','e','n','c','i','e','s',0};
LONG r;
DWORD type, val, sz, total, n;

View File

@ -1866,8 +1866,8 @@ static HGLOBAL PRINTDLG_GetDlgTemplateW(PRINTDLGW *lppd)
{
HRSRC hResInfo;
HGLOBAL hDlgTmpl;
const WCHAR xpsetup[] = { 'P','R','I','N','T','3','2','_','S','E','T','U','P',0};
const WCHAR xprint[] = { 'P','R','I','N','T','3','2',0};
static const WCHAR xpsetup[] = { 'P','R','I','N','T','3','2','_','S','E','T','U','P',0};
static const WCHAR xprint[] = { 'P','R','I','N','T','3','2',0};
if (lppd->Flags & PD_PRINTSETUP) {
if(lppd->Flags & PD_ENABLESETUPTEMPLATEHANDLE) {
@ -2875,7 +2875,7 @@ BOOL WINAPI PageSetupDlgW(LPPAGESETUPDLGW setupdlg) {
/* short cut exit, just return default values */
if (setupdlg->Flags & PSD_RETURNDEFAULT) {
const WCHAR a4[] = {'A','4',0};
static const WCHAR a4[] = {'A','4',0};
setupdlg->hDevMode = pdlg.hDevMode;
setupdlg->hDevNames = pdlg.hDevNames;
/* FIXME: Just return "A4" for now. */

View File

@ -91,16 +91,16 @@ static void CRYPT_guid2wstr( LPGUID guid, LPWSTR wstr )
static LONG CRYPT_SIPWriteFunction( LPGUID guid, LPCWSTR szKey,
LPCWSTR szDll, LPCWSTR szFunction )
{
const WCHAR szOID[] = {
static const WCHAR szOID[] = {
'S','o','f','t','w','a','r','e','\\',
'M','i','c','r','o','s','o','f','t','\\',
'C','r','y','p','t','o','g','r','a','p','h','y','\\',
'O','I','D','\\',
'E','n','c','o','d','i','n','g','T','y','p','e',' ','0','\\',
'C','r','y','p','t','S','I','P','D','l','l', 0 };
const WCHAR szBackSlash[] = { '\\', 0 };
const WCHAR szDllName[] = { 'D','l','l',0 };
const WCHAR szFuncName[] = { 'F','u','n','c','N','a','m','e',0 };
static const WCHAR szBackSlash[] = { '\\', 0 };
static const WCHAR szDllName[] = { 'D','l','l',0 };
static const WCHAR szFuncName[] = { 'F','u','n','c','N','a','m','e',0 };
WCHAR szFullKey[ 0x100 ];
LONG r;
HKEY hKey;
@ -134,19 +134,19 @@ static LONG CRYPT_SIPWriteFunction( LPGUID guid, LPCWSTR szKey,
BOOL WINAPI CryptSIPAddProvider(SIP_ADD_NEWPROVIDER *psNewProv)
{
const WCHAR szCreate[] = {
static const WCHAR szCreate[] = {
'C','r','e','a','t','e',
'I','n','d','i','r','e','c','t','D','a','t','a',0};
const WCHAR szGetSigned[] = {
static const WCHAR szGetSigned[] = {
'G','e','t','S','i','g','n','e','d','D','a','t','a','M','s','g',0};
const WCHAR szIsMyFile[] = {
static const WCHAR szIsMyFile[] = {
'I','s','M','y','F','i','l','e','T','y','p','e', 0 };
const WCHAR szPutSigned[] = {
static const WCHAR szPutSigned[] = {
'P','u','t','S','i','g','n','e','d','D','a','t','a','M','s','g',0};
const WCHAR szRemoveSigned[] = {
static const WCHAR szRemoveSigned[] = {
'R','e','m','o','v','e',
'S','i','g','n','e','d','D','a','t','a','M','s','g',0};
const WCHAR szVerify[] = {
static const WCHAR szVerify[] = {
'V','e','r','i','f','y',
'I','n','d','i','r','e','c','t','D','a','t','a',0};
@ -214,9 +214,9 @@ BOOL WINAPI CryptRegisterOIDFunction(DWORD dwEncodingType, LPCSTR pszFuncName,
LPCSTR pszOID, LPCWSTR pwszDll, LPCSTR pszOverrideFuncName)
{
LONG r;
const char szOID[] = "Software\\Microsoft\\Cryptography\\OID";
const char szType1[] = "EncodingType 1";
const WCHAR szDllName[] = { 'D','l','l',0 };
static const char szOID[] = "Software\\Microsoft\\Cryptography\\OID";
static const char szType1[] = "EncodingType 1";
static const WCHAR szDllName[] = { 'D','l','l',0 };
HKEY hKey;
LPSTR szKey;
UINT len;

View File

@ -305,8 +305,8 @@ static HRESULT register_clsids(int count, const register_info * pRegInfo, LPCWST
HKEY hkeyInproc32;
HKEY hkeyInstance = NULL;
int i;
const WCHAR wcszInproc32[] = {'I','n','p','r','o','c','S','e','r','v','e','r','3','2',0};
const WCHAR wcszThreadingModel[] = {'T','h','r','e','a','d','i','n','g','M','o','d','e','l',0};
static const WCHAR wcszInproc32[] = {'I','n','p','r','o','c','S','e','r','v','e','r','3','2',0};
static const WCHAR wcszThreadingModel[] = {'T','h','r','e','a','d','i','n','g','M','o','d','e','l',0};
res = RegOpenKeyW(HKEY_CLASSES_ROOT, clsid_keyname, &hkeyClsid)
== ERROR_SUCCESS ? S_OK : E_FAIL;

View File

@ -587,7 +587,7 @@ static HRESULT WINAPI DEVENUM_IMediaCatMoniker_GetDisplayName(
{
ICOM_THIS(MediaCatMoniker, iface);
WCHAR wszBuffer[MAX_PATH];
const WCHAR wszFriendlyName[] = {'F','r','i','e','n','d','l','y','N','a','m','e',0};
static const WCHAR wszFriendlyName[] = {'F','r','i','e','n','d','l','y','N','a','m','e',0};
LONG received = sizeof(wszFriendlyName);
TRACE("(%p, %p, %p)\n", pbc, pmkToLeft, ppszDisplayName);

View File

@ -755,8 +755,8 @@ void update_reg_entries(void)
Family *family;
Face *face;
WCHAR *file;
const WCHAR TrueType[] = {' ','(','T','r','u','e','T','y','p','e',')','\0'};
const WCHAR spaceW[] = {' ', '\0'};
static const WCHAR TrueType[] = {' ','(','T','r','u','e','T','y','p','e',')','\0'};
static const WCHAR spaceW[] = {' ', '\0'};
char *path;
if(RegCreateKeyExW(HKEY_LOCAL_MACHINE, is_win9x() ? win9x_font_reg_key : winnt_font_reg_key,

View File

@ -180,7 +180,7 @@ static int COMM_WhackModem(int fd, unsigned int andy, unsigned int orrie)
*/
static LPCWSTR COMM_ParseStart(LPCWSTR ptr)
{
const WCHAR comW[] = {'C','O','M',0};
static const WCHAR comW[] = {'C','O','M',0};
/* The device control string may optionally start with "COMx" followed
by an optional ':' and spaces. */
@ -272,7 +272,7 @@ static LPCWSTR COMM_ParseByteSize(LPCWSTR ptr, LPBYTE lpbytesize)
static LPCWSTR COMM_ParseStopBits(LPCWSTR ptr, LPBYTE lpstopbits)
{
DWORD temp;
const WCHAR stopbits15W[] = {'1','.','5',0};
static const WCHAR stopbits15W[] = {'1','.','5',0};
if(!strncmpW(stopbits15W, ptr, 3))
{
@ -297,8 +297,8 @@ static LPCWSTR COMM_ParseStopBits(LPCWSTR ptr, LPBYTE lpstopbits)
static LPCWSTR COMM_ParseOnOff(LPCWSTR ptr, LPDWORD lponoff)
{
const WCHAR onW[] = {'o','n',0};
const WCHAR offW[] = {'o','f','f',0};
static const WCHAR onW[] = {'o','n',0};
static const WCHAR offW[] = {'o','f','f',0};
if(!strncmpiW(onW, ptr, 2))
{
@ -425,17 +425,17 @@ static BOOL COMM_BuildNewCommDCB(LPCWSTR device, LPDCB lpdcb, LPCOMMTIMEOUTS lpt
{
DWORD temp;
BOOL baud = FALSE, stop = FALSE;
const WCHAR baudW[] = {'b','a','u','d','=',0};
const WCHAR parityW[] = {'p','a','r','i','t','y','=',0};
const WCHAR dataW[] = {'d','a','t','a','=',0};
const WCHAR stopW[] = {'s','t','o','p','=',0};
const WCHAR toW[] = {'t','o','=',0};
const WCHAR xonW[] = {'x','o','n','=',0};
const WCHAR odsrW[] = {'o','d','s','r','=',0};
const WCHAR octsW[] = {'o','c','t','s','=',0};
const WCHAR dtrW[] = {'d','t','r','=',0};
const WCHAR rtsW[] = {'r','t','s','=',0};
const WCHAR idsrW[] = {'i','d','s','r','=',0};
static const WCHAR baudW[] = {'b','a','u','d','=',0};
static const WCHAR parityW[] = {'p','a','r','i','t','y','=',0};
static const WCHAR dataW[] = {'d','a','t','a','=',0};
static const WCHAR stopW[] = {'s','t','o','p','=',0};
static const WCHAR toW[] = {'t','o','=',0};
static const WCHAR xonW[] = {'x','o','n','=',0};
static const WCHAR odsrW[] = {'o','d','s','r','=',0};
static const WCHAR octsW[] = {'o','c','t','s','=',0};
static const WCHAR dtrW[] = {'d','t','r','=',0};
static const WCHAR rtsW[] = {'r','t','s','=',0};
static const WCHAR idsrW[] = {'i','d','s','r','=',0};
while(*device)
{
@ -2311,8 +2311,8 @@ BOOL WINAPI GetDefaultCommConfigW(
{
LPDCB lpdcb = &(lpCC->dcb);
WCHAR temp[40];
const WCHAR comW[] = {'C','O','M',0};
const WCHAR formatW[] = {'C','O','M','%','c',':','3','8','4','0','0',',','n',',','8',',','1',0};
static const WCHAR comW[] = {'C','O','M',0};
static const WCHAR formatW[] = {'C','O','M','%','c',':','3','8','4','0','0',',','n',',','8',',','1',0};
if (strncmpiW(lpszName,comW,3)) {
ERR("not implemented for <%s>\n", debugstr_w(lpszName));

View File

@ -61,8 +61,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(resource);
* Yes, ANSI strings in win32 resources. Go figure.
*/
const WCHAR PCNTFMTWSTR[] = { '%','%','%','s',0 };
const WCHAR FMTWSTR[] = { '%','s',0 };
static const WCHAR PCNTFMTWSTR[] = { '%','%','%','s',0 };
static const WCHAR FMTWSTR[] = { '%','s',0 };
/**********************************************************************
* load_messageW (internal)

View File

@ -1060,7 +1060,7 @@ BOOL WINAPI SetLocaleInfoA(LCID lcid, LCTYPE lctype, LPCSTR data)
BOOL WINAPI SetLocaleInfoW( LCID lcid, LCTYPE lctype, LPCWSTR data )
{
const WCHAR *value;
const WCHAR intlW[] = {'i','n','t','l',0 };
static const WCHAR intlW[] = {'i','n','t','l',0 };
UNICODE_STRING valueW;
NTSTATUS status;
HKEY hkey;

View File

@ -65,11 +65,11 @@ static BOOL MSHTML_GetMozctlPath( LPWSTR szPath, DWORD sz )
DWORD r, type;
BOOL ret = FALSE;
HKEY hkey;
const WCHAR szPre[] = {
static const WCHAR szPre[] = {
'S','o','f','t','w','a','r','e','\\',
'C','l','a','s','s','e','s','\\',
'C','L','S','I','D','\\',0 };
const WCHAR szPost[] = {
static const WCHAR szPost[] = {
'\\','I','n','p','r','o','c','S','e','r','v','e','r','3','2',0 };
WCHAR szRegPath[(sizeof(szPre)+sizeof(szPost))/sizeof(WCHAR)+40];

View File

@ -61,8 +61,8 @@ static UINT CREATE_execute( struct tagMSIVIEW *view, MSIHANDLE record )
MSICREATEVIEW *cv = (MSICREATEVIEW*)view;
create_col_info *col;
UINT r, nField, row, table_val, column_val;
const WCHAR szTables[] = { '_','T','a','b','l','e','s',0 };
const WCHAR szColumns[] = { '_','C','o','l','u','m','n','s',0 };
static const WCHAR szTables[] = { '_','T','a','b','l','e','s',0 };
static const WCHAR szColumns[] = { '_','C','o','l','u','m','n','s',0 };
MSIVIEW *tv = NULL;
TRACE("%p Table %s (%s)\n", cv, debugstr_w(cv->name),

View File

@ -63,8 +63,8 @@ static UINT INSERT_execute( struct tagMSIVIEW *view, MSIHANDLE record )
MSIINSERTVIEW *iv = (MSIINSERTVIEW*)view;
create_col_info *col;
UINT r, nField, row, table_val, column_val;
const WCHAR szTables[] = { '_','T','a','b','l','e','s',0 };
const WCHAR szColumns[] = { '_','C','o','l','u','m','n','s',0 };
static const WCHAR szTables[] = { '_','T','a','b','l','e','s',0 };
static const WCHAR szColumns[] = { '_','C','o','l','u','m','n','s',0 };
MSIVIEW *tv = NULL;
TRACE("%p Table %s (%s)\n", iv, debugstr_w(iv->name),

View File

@ -45,16 +45,16 @@ WINE_DEFAULT_DEBUG_CHANNEL(msi);
*/
#define LPCTSTR LPCWSTR
const WCHAR szInstaller[] = {
static const WCHAR szInstaller[] = {
'S','o','f','t','w','a','r','e','\\',
'M','i','c','r','o','s','o','f','t','\\',
'W','i','n','d','o','w','s','\\',
'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\',
'I','n','s','t','a','l','l','e','r',0 };
const WCHAR szFeatures[] = {
static const WCHAR szFeatures[] = {
'F','e','a','t','u','r','e','s',0 };
const WCHAR szComponents[] = {
static const WCHAR szComponents[] = {
'C','o','m','p','o','n','e','n','t','s',0 };
/*
@ -286,13 +286,13 @@ UINT WINAPI MsiOpenProductA(LPCSTR szProduct, MSIHANDLE *phProduct)
UINT WINAPI MsiOpenProductW(LPCWSTR szProduct, MSIHANDLE *phProduct)
{
const WCHAR szKey[] = {
static const WCHAR szKey[] = {
'S','o','f','t','w','a','r','e','\\',
'M','i','c','r','o','s','o','f','t','\\',
'W','i','n','d','o','w','s','\\',
'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\',
'U','n','i','n','s','t','a','l','l',0 };
const WCHAR szLocalPackage[] = {
static const WCHAR szLocalPackage[] = {
'L','o','c','a','l','P','a','c','k','a','g','e', 0
};
LPWSTR path = NULL;
@ -879,8 +879,8 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {
/* FIXME: Cleanup */
}
/*
const WCHAR szMSIServerSvc[] = { 'M','S','I','S','e','r','v','e','r',0 };
const WCHAR szNull[] = { 0 };
static const WCHAR szMSIServerSvc[] = { 'M','S','I','S','e','r','v','e','r',0 };
static const WCHAR szNull[] = { 0 };
if (!strcmpW(lpServiceName, szMSIServerSvc)) {
hKey = CreateServiceW(hSCManager,
szMSIServerSvc,

View File

@ -314,7 +314,7 @@ UINT WINAPI MsiRecordGetStringW(MSIHANDLE handle, unsigned int iField,
MSIRECORD *rec;
UINT len=0, ret;
WCHAR buffer[16];
const WCHAR szFormat[] = { '%','d',0 };
static const WCHAR szFormat[] = { '%','d',0 };
TRACE("%ld %d %p %p\n", handle, iField, szValue, pcchValue);

View File

@ -35,7 +35,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(msi);
const WCHAR szSumInfo[] = { 5 ,'S','u','m','m','a','r','y',
static const WCHAR szSumInfo[] = { 5 ,'S','u','m','m','a','r','y',
'I','n','f','o','r','m','a','t','i','o','n',0 };
static void MSI_CloseSummaryInfo( VOID *arg )

View File

@ -544,9 +544,9 @@ UINT save_table( MSIDATABASE *db, MSITABLE *t )
HRESULT init_string_table( IStorage *stg )
{
HRESULT r;
const WCHAR szStringData[] = {
static const WCHAR szStringData[] = {
'_','S','t','r','i','n','g','D','a','t','a',0 };
const WCHAR szStringPool[] = {
static const WCHAR szStringPool[] = {
'_','S','t','r','i','n','g','P','o','o','l',0 };
USHORT zero[2] = { 0, 0 };
ULONG count = 0;
@ -593,9 +593,9 @@ UINT load_string_table( MSIDATABASE *db )
USHORT *pool;
UINT r, ret = ERROR_FUNCTION_FAILED, datasize = 0, poolsize = 0;
DWORD i, count, offset, len, n;
const WCHAR szStringData[] = {
static const WCHAR szStringData[] = {
'_','S','t','r','i','n','g','D','a','t','a',0 };
const WCHAR szStringPool[] = {
static const WCHAR szStringPool[] = {
'_','S','t','r','i','n','g','P','o','o','l',0 };
if( db->strings )
@ -643,9 +643,9 @@ UINT save_string_table( MSIDATABASE *db )
{
UINT i, count, datasize, poolsize, sz, used, r;
UINT ret = ERROR_FUNCTION_FAILED;
const WCHAR szStringData[] = {
static const WCHAR szStringData[] = {
'_','S','t','r','i','n','g','D','a','t','a',0 };
const WCHAR szStringPool[] = {
static const WCHAR szStringPool[] = {
'_','S','t','r','i','n','g','P','o','o','l',0 };
CHAR *data = NULL;
USHORT *pool = NULL;
@ -731,13 +731,13 @@ static LPWSTR strdupW( LPCWSTR str )
}
/* information for default tables */
const WCHAR szTables[] = { '_','T','a','b','l','e','s',0 };
const WCHAR szTable[] = { 'T','a','b','l','e',0 };
const WCHAR szName[] = { 'N','a','m','e',0 };
const WCHAR szColumns[] = { '_','C','o','l','u','m','n','s',0 };
const WCHAR szColumn[] = { 'C','o','l','u','m','n',0 };
const WCHAR szNumber[] = { 'N','u','m','b','e','r',0 };
const WCHAR szType[] = { 'T','y','p','e',0 };
static const WCHAR szTables[] = { '_','T','a','b','l','e','s',0 };
static const WCHAR szTable[] = { 'T','a','b','l','e',0 };
static const WCHAR szName[] = { 'N','a','m','e',0 };
static const WCHAR szColumns[] = { '_','C','o','l','u','m','n','s',0 };
static const WCHAR szColumn[] = { 'C','o','l','u','m','n',0 };
static const WCHAR szNumber[] = { 'N','u','m','b','e','r',0 };
static const WCHAR szType[] = { 'T','y','p','e',0 };
struct standard_table {
LPCWSTR tablename;
@ -809,7 +809,7 @@ static UINT get_tablecolumns( MSIDATABASE *db,
{
UINT r, i, n=0, table_id, count, maxcount = *sz;
MSITABLE *table = NULL;
const WCHAR szColumns[] = { '_','C','o','l','u','m','n','s',0 };
static const WCHAR szColumns[] = { '_','C','o','l','u','m','n','s',0 };
/* first check if there is a default table with that name */
r = get_defaulttablecolumns( szTableName, colinfo, sz );
@ -877,8 +877,8 @@ static UINT get_tablecolumns( MSIDATABASE *db,
/* try to find the table name in the _Tables table */
BOOL TABLE_Exists( MSIDATABASE *db, LPWSTR name )
{
const WCHAR szTables[] = { '_','T','a','b','l','e','s',0 };
const WCHAR szColumns[] = { '_','C','o','l','u','m','n','s',0 };
static const WCHAR szTables[] = { '_','T','a','b','l','e','s',0 };
static const WCHAR szColumns[] = { '_','C','o','l','u','m','n','s',0 };
UINT r, table_id = 0, i, count;
MSITABLE *table = NULL;

View File

@ -33,9 +33,9 @@
WINE_DEFAULT_DEBUG_CHANNEL(netapi32);
const WCHAR sAdminUserName[] = {'A','d','m','i','n','i','s','t','r','a','t',
static const WCHAR sAdminUserName[] = {'A','d','m','i','n','i','s','t','r','a','t',
'o','r',0};
const WCHAR sGuestUserName[] = {'G','u','e','s','t',0};
static const WCHAR sGuestUserName[] = {'G','u','e','s','t',0};
/************************************************************
* NETAPI_ValidateServername
@ -277,7 +277,7 @@ NetUserEnum(LPCWSTR servername, DWORD level, DWORD filter, LPBYTE* bufptr,
*/
void ACCESS_QueryAdminDisplayInformation(PNET_DISPLAY_USER *buf, PDWORD pdwSize)
{
const WCHAR sAdminUserName[] = {
static const WCHAR sAdminUserName[] = {
'A','d','m','i','n','i','s','t','r','a','t','o','r',0};
/* sizes of the field buffers in WCHARS */
@ -316,7 +316,7 @@ void ACCESS_QueryAdminDisplayInformation(PNET_DISPLAY_USER *buf, PDWORD pdwSize)
*/
void ACCESS_QueryGuestDisplayInformation(PNET_DISPLAY_USER *buf, PDWORD pdwSize)
{
const WCHAR sGuestUserName[] = {
static const WCHAR sGuestUserName[] = {
'G','u','e','s','t',0 };
/* sizes of the field buffers in WCHARS */

View File

@ -31,15 +31,15 @@
WCHAR user_name[UNLEN + 1];
WCHAR computer_name[MAX_COMPUTERNAME_LENGTH + 1];
const WCHAR sAdminUserName[] = {'A','d','m','i','n','i','s','t','r','a','t',
static const WCHAR sAdminUserName[] = {'A','d','m','i','n','i','s','t','r','a','t',
'o','r',0};
const WCHAR sGuestUserName[] = {'G','u','e','s','t',0};
const WCHAR sNonexistentUser[] = {'N','o','n','e','x','i','s','t','e','n','t',' ',
static const WCHAR sGuestUserName[] = {'G','u','e','s','t',0};
static const WCHAR sNonexistentUser[] = {'N','o','n','e','x','i','s','t','e','n','t',' ',
'U','s','e','r',0};
const WCHAR sBadNetPath[] = {'\\','\\','B','a',' ',' ','p','a','t','h',0};
const WCHAR sInvalidName[] = {'\\',0};
const WCHAR sInvalidName2[] = {'\\','\\',0};
const WCHAR sEmptyStr[] = { 0 };
static const WCHAR sBadNetPath[] = {'\\','\\','B','a',' ',' ','p','a','t','h',0};
static const WCHAR sInvalidName[] = {'\\',0};
static const WCHAR sInvalidName2[] = {'\\','\\',0};
static const WCHAR sEmptyStr[] = { 0 };
static NET_API_STATUS (WINAPI *pNetApiBufferFree)(LPVOID)=NULL;
static NET_API_STATUS (WINAPI *pNetApiBufferSize)(LPVOID,LPDWORD)=NULL;

View File

@ -4927,7 +4927,7 @@ static HRESULT WINAPI ITypeInfo_fnGetDllEntry( ITypeInfo2 *iface, MEMBERID memid
/* FIXME: This is wrong, but how do you find that out? */
if (pBstrDllName) {
const WCHAR oleaut32W[] = {'O','L','E','A','U','T','3','2','.','D','L','L',0};
static const WCHAR oleaut32W[] = {'O','L','E','A','U','T','3','2','.','D','L','L',0};
*pBstrDllName = SysAllocString(oleaut32W);
}

View File

@ -209,7 +209,7 @@ static HRESULT GetClassMediaFile(IAsyncReader * pReader, LPCOLESTR pszFileName,
HKEY hkeyMajor;
WCHAR wszMajorKeyName[CHARS_IN_GUID];
DWORD dwKeyNameLength = sizeof(wszMajorKeyName) / sizeof(wszMajorKeyName[0]);
const WCHAR wszExtensions[] = {'E','x','t','e','n','s','i','o','n','s',0};
static const WCHAR wszExtensions[] = {'E','x','t','e','n','s','i','o','n','s',0};
if (RegEnumKeyExW(hkeyMediaType, indexMajor, wszMajorKeyName, &dwKeyNameLength, NULL, NULL, NULL, NULL) != ERROR_SUCCESS)
break;
@ -251,7 +251,7 @@ static HRESULT GetClassMediaFile(IAsyncReader * pReader, LPCOLESTR pszFileName,
LPWSTR wszPatternString = HeapAlloc(GetProcessHeap(), 0, maxValueLen);
DWORD dwValueNameLen = sizeof(wszValueName) / sizeof(wszValueName[0]); /* remember this is in chars */
DWORD dwDataLen = maxValueLen; /* remember this is in bytes */
const WCHAR wszSourceFilter[] = {'S','o','u','r','c','e',' ','F','i','l','t','e','r',0};
static const WCHAR wszSourceFilter[] = {'S','o','u','r','c','e',' ','F','i','l','t','e','r',0};
LONG temp;
if ((temp = RegEnumValueW(hkeyMinor, indexValue, wszValueName, &dwValueNameLen, NULL, &dwType, (LPBYTE)wszPatternString, &dwDataLen)) != ERROR_SUCCESS)

View File

@ -95,7 +95,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
INT RICHEDIT_GetSelText(HWND hwnd,LPSTR lpstrBuffer);
const WCHAR RichEditInfoStr[] = { '_','R','T','F','_','I','n','f','o', 0 };
static const WCHAR RichEditInfoStr[] = { '_','R','T','F','_','I','n','f','o', 0 };
typedef struct _RTFControl_info
{

View File

@ -69,11 +69,11 @@ static BOOL SHDOCVW_GetMozctlPath( LPWSTR szPath, DWORD sz )
DWORD r, type;
BOOL ret = FALSE;
HKEY hkey;
const WCHAR szPre[] = {
static const WCHAR szPre[] = {
'S','o','f','t','w','a','r','e','\\',
'C','l','a','s','s','e','s','\\',
'C','L','S','I','D','\\',0 };
const WCHAR szPost[] = {
static const WCHAR szPost[] = {
'\\','I','n','p','r','o','c','S','e','r','v','e','r','3','2',0 };
WCHAR szRegPath[(sizeof(szPre)+sizeof(szPost))/sizeof(WCHAR)+40];

View File

@ -439,7 +439,7 @@ static INT_PTR CALLBACK BrsFolderDlgProc(HWND hWnd, UINT msg, WPARAM wParam,
return FALSE;
}
static WCHAR swBrowseTempName[] = {'S','H','B','R','S','F','O','R','F','O','L','D','E','R','_','M','S','G','B','O','X',0};
static const WCHAR swBrowseTempName[] = {'S','H','B','R','S','F','O','R','F','O','L','D','E','R','_','M','S','G','B','O','X',0};
/*************************************************************************
* SHBrowseForFolderA [SHELL32.@]

View File

@ -265,7 +265,7 @@ BOOL HCR_GetDefaultIconFromGUIDW(REFIID riid, LPWSTR szDest, DWORD len, LPDWORD
*
* Gets the name of a registred class
*/
static WCHAR swEmpty[] = {0};
static const WCHAR swEmpty[] = {0};
BOOL HCR_GetClassNameW(REFIID riid, LPWSTR szDest, DWORD len)
{

View File

@ -249,7 +249,7 @@ static HRESULT WINAPI IPersistFile_fnLoad(IPersistFile* iface, LPCOLESTR pszFile
static BOOL StartLinkProcessor( LPCOLESTR szLink )
{
const WCHAR szFormat[] = {'w','i','n','e','m','e','n','u','b','u','i','l','d','e','r','.','e','x','e',
static const WCHAR szFormat[] = {'w','i','n','e','m','e','n','u','b','u','i','l','d','e','r','.','e','x','e',
' ','-','r',' ','"','%','s','"',0 };
LONG len;
LPWSTR buffer;

View File

@ -1061,9 +1061,9 @@ HRESULT WINAPI FindMimeFromData(LPBC pBC, LPCWSTR pwzUrl, LPVOID pBuffer,
DWORD cbSize, LPCWSTR pwzMimeProposed, DWORD dwMimeFlags,
LPWSTR* ppwzMimeOut, DWORD dwReserved)
{
const WCHAR szBinaryMime[] = {'a','p','p','l','i','c','a','t','i','o','n','/','o','c','t','e','t','-','s','t','r','e','a','m','\0'};
const WCHAR szTextMime[] = {'t','e','x','t','/','p','l','a','i','n','\0'};
const WCHAR szContentType[] = {'C','o','n','t','e','n','t',' ','T','y','p','e','\0'};
static const WCHAR szBinaryMime[] = {'a','p','p','l','i','c','a','t','i','o','n','/','o','c','t','e','t','-','s','t','r','e','a','m','\0'};
static const WCHAR szTextMime[] = {'t','e','x','t','/','p','l','a','i','n','\0'};
static const WCHAR szContentType[] = {'C','o','n','t','e','n','t',' ','T','y','p','e','\0'};
WCHAR szTmpMime[256];
LPCWSTR mimeType = NULL;
HKEY hKey = NULL;

View File

@ -191,13 +191,13 @@ HRESULT UXTHEME_SetActiveTheme(PTHEME_FILE tf)
*/
void UXTHEME_InitSystem(HINSTANCE hInst)
{
const WCHAR szWindowTheme[] = {
static const WCHAR szWindowTheme[] = {
'u','x','_','t','h','e','m','e','\0'
};
const WCHAR szSubAppName[] = {
static const WCHAR szSubAppName[] = {
'u','x','_','s','u','b','a','p','p','\0'
};
const WCHAR szSubIdList[] = {
static const WCHAR szSubIdList[] = {
'u','x','_','s','u','b','i','d','l','s','t','\0'
};

View File

@ -343,11 +343,11 @@ BOOL WINAPI InternetGetCookieW(LPCWSTR lpszUrl, LPCWSTR lpszCookieName,
* It'd be nice to know what exactly is going on, M$ tracking users? Does this need
* to be unique? Should I generate a random number here? etc.
*/
const WCHAR TrackingString[] = {
static const WCHAR TrackingString[] = {
'M','t','r','x','T','r','a','c','k','i','n','g','I','D','=',
'0','1','2','3','4','5','6','7','8','9','0','1','2','3','4','5',
'6','7','8','9','0','1','2','3','4','5','6','7','8','9','0','1', 0 };
const WCHAR szps[] = { '%','s',0 };
static const WCHAR szps[] = { '%','s',0 };
TRACE("(%s, %s, %p, %p)\n", debugstr_w(lpszUrl),debugstr_w(lpszCookieName),
lpCookieData, lpdwSize);
@ -377,8 +377,8 @@ BOOL WINAPI InternetGetCookieW(LPCWSTR lpszUrl, LPCWSTR lpszCookieName,
}
while (thisCookie)
{
const WCHAR szsc[] = { ';',' ',0 };
const WCHAR szpseq[] = { '%','s','=','%','s',0 };
static const WCHAR szsc[] = { ';',' ',0 };
static const WCHAR szpseq[] = { '%','s','=','%','s',0 };
cnt += snprintfW(lpCookieData + cnt, *lpdwSize - cnt, szsc);
cnt += snprintfW(lpCookieData + cnt, *lpdwSize - cnt, szpseq,
thisCookie->lpCookieName,

View File

@ -93,7 +93,7 @@ static BOOL WININET_GetAuthRealm( HINTERNET hRequest, LPWSTR szBuf, DWORD sz )
{
LPWSTR p, q;
DWORD index;
const WCHAR szRealm[] = { 'r','e','a','l','m','=',0 };
static const WCHAR szRealm[] = { 'r','e','a','l','m','=',0 };
/* extract the Realm from the proxy response and show it */
index = 0;
@ -136,7 +136,8 @@ static BOOL WININET_GetSetPassword( HWND hdlg, LPCWSTR szServer,
DWORD r, dwMagic = 19;
UINT r_len, u_len;
WORD sz;
const WCHAR szColon[] = { ':',0 }, szbs[] = { '/', 0 };
static const WCHAR szColon[] = { ':',0 };
static const WCHAR szbs[] = { '/', 0 };
hUserItem = GetDlgItem( hdlg, IDC_USERNAME );
hPassItem = GetDlgItem( hdlg, IDC_PASSWORD );

View File

@ -55,11 +55,11 @@
WINE_DEFAULT_DEBUG_CHANNEL(wininet);
const WCHAR g_szHttp[] = {' ','H','T','T','P','/','1','.','0',0 };
const WCHAR g_szHost[] = {'\r','\n','H','o','s','t',':',' ',0 };
const WCHAR g_szReferer[] = {'R','e','f','e','r','e','r',0};
const WCHAR g_szAccept[] = {'A','c','c','e','p','t',0};
const WCHAR g_szUserAgent[] = {'U','s','e','r','-','A','g','e','n','t',0};
static const WCHAR g_szHttp[] = {' ','H','T','T','P','/','1','.','0',0 };
static const WCHAR g_szHost[] = {'\r','\n','H','o','s','t',':',' ',0 };
static const WCHAR g_szReferer[] = {'R','e','f','e','r','e','r',0};
static const WCHAR g_szAccept[] = {'A','c','c','e','p','t',0};
static const WCHAR g_szUserAgent[] = {'U','s','e','r','-','A','g','e','n','t',0};
#define HTTPHEADER g_szHttp
@ -470,8 +470,8 @@ static LPWSTR HTTP_EncodeBasicAuth( LPCWSTR username, LPCWSTR password)
{
UINT len;
LPWSTR in, out;
const WCHAR szBasic[] = {'B','a','s','i','c',' ',0};
const WCHAR szColon[] = {':',0};
static const WCHAR szBasic[] = {'B','a','s','i','c',' ',0};
static const WCHAR szColon[] = {':',0};
len = lstrlenW( username ) + 1 + lstrlenW ( password ) + 1;
in = HeapAlloc( GetProcessHeap(), 0, len*sizeof(WCHAR) );
@ -504,7 +504,7 @@ BOOL HTTP_InsertProxyAuthorization( LPWININETHTTPREQW lpwhr,
{
HTTPHEADERW hdr;
INT index;
const WCHAR szProxyAuthorization[] = {
static const WCHAR szProxyAuthorization[] = {
'P','r','o','x','y','-','A','u','t','h','o','r','i','z','a','t','i','o','n',0 };
hdr.lpszValue = HTTP_EncodeBasicAuth( username, password );
@ -606,7 +606,7 @@ HINTERNET WINAPI HTTP_HttpOpenRequestW(HINTERNET hHttpSession,
LPWSTR lpszUrl = NULL;
DWORD nCookieSize;
HINTERNET handle;
const WCHAR szUrlForm[] = {'h','t','t','p',':','/','/','%','s',0};
static const WCHAR szUrlForm[] = {'h','t','t','p',':','/','/','%','s',0};
DWORD len;
TRACE("--> \n");
@ -669,7 +669,7 @@ HINTERNET WINAPI HTTP_HttpOpenRequestW(HINTERNET hHttpSession,
if (NULL == lpszVerb)
{
const WCHAR szGet[] = {'G','E','T',0};
static const WCHAR szGet[] = {'G','E','T',0};
lpwhr->lpszVerb = WININET_strdupW(szGet);
}
else if (strlenW(lpszVerb))
@ -697,7 +697,7 @@ HINTERNET WINAPI HTTP_HttpOpenRequestW(HINTERNET hHttpSession,
if (hIC->lpszAgent)
{
WCHAR *agent_header;
const WCHAR user_agent[] = {'U','s','e','r','-','A','g','e','n','t',':',' ','%','s','\r','\n',0 };
static const WCHAR user_agent[] = {'U','s','e','r','-','A','g','e','n','t',':',' ','%','s','\r','\n',0 };
len = strlenW(hIC->lpszAgent) + strlenW(user_agent);
agent_header = HeapAlloc( GetProcessHeap(), 0, len*sizeof(WCHAR) );
@ -715,8 +715,8 @@ HINTERNET WINAPI HTTP_HttpOpenRequestW(HINTERNET hHttpSession,
if (InternetGetCookieW(lpszUrl, NULL, NULL, &nCookieSize))
{
int cnt = 0;
const WCHAR szCookie[] = {'C','o','o','k','i','e',':',' ',0};
const WCHAR szcrlf[] = {'\r','\n',0};
static const WCHAR szCookie[] = {'C','o','o','k','i','e',':',' ',0};
static const WCHAR szcrlf[] = {'\r','\n',0};
lpszCookies = HeapAlloc(GetProcessHeap(), 0, (nCookieSize + 1 + 8)*sizeof(WCHAR));
@ -788,9 +788,9 @@ BOOL WINAPI HttpQueryInfoW(HINTERNET hHttpRequest, DWORD dwInfoLevel,
LPHTTPHEADERW lphttpHdr = NULL;
BOOL bSuccess = FALSE;
LPWININETHTTPREQW lpwhr;
const WCHAR szFmt[] = { '%','s',':',' ','%','s','%','s',0 };
const WCHAR szcrlf[] = { '\r','\n',0 };
const WCHAR sznul[] = { 0 };
static const WCHAR szFmt[] = { '%','s',':',' ','%','s','%','s',0 };
static const WCHAR szcrlf[] = { '\r','\n',0 };
static const WCHAR sznul[] = { 0 };
if (TRACE_ON(wininet)) {
#define FE(x) { x, #x }
@ -1418,12 +1418,12 @@ BOOL WINAPI HTTP_HttpSendRequestW(HINTERNET hHttpRequest, LPCWSTR lpszHeaders,
do
{
const WCHAR szSlash[] = { '/',0 };
const WCHAR szSpace[] = { ' ',0 };
const WCHAR szHttp[] = { 'h','t','t','p',':','/','/', 0 };
const WCHAR szcrlf[] = {'\r','\n', 0};
const WCHAR sztwocrlf[] = {'\r','\n','\r','\n', 0};
const WCHAR szSetCookie[] = {'S','e','t','-','C','o','o','k','i','e',0 };
static const WCHAR szSlash[] = { '/',0 };
static const WCHAR szSpace[] = { ' ',0 };
static const WCHAR szHttp[] = { 'h','t','t','p',':','/','/', 0 };
static const WCHAR szcrlf[] = {'\r','\n', 0};
static const WCHAR sztwocrlf[] = {'\r','\n','\r','\n', 0};
static const WCHAR szSetCookie[] = {'S','e','t','-','C','o','o','k','i','e',0 };
TRACE("Going to url %s %s\n", debugstr_w(lpwhr->lpszHostName), debugstr_w(lpwhr->lpszPath));
loop_next = FALSE;
@ -1539,7 +1539,7 @@ BOOL WINAPI HTTP_HttpSendRequestW(HINTERNET hHttpRequest, LPCWSTR lpszHeaders,
{
if (lpwhr->StdHeaders[i].wFlags & HDR_ISREQUEST)
{
const WCHAR szFmt[] = { '\r','\n','%','s',':',' ','%','s', 0};
static const WCHAR szFmt[] = { '\r','\n','%','s',':',' ','%','s', 0};
cnt += sprintfW(requestString + cnt, szFmt,
lpwhr->StdHeaders[i].lpszField, lpwhr->StdHeaders[i].lpszValue);
TRACE("Adding header %s (%s)\n",
@ -1553,7 +1553,7 @@ BOOL WINAPI HTTP_HttpSendRequestW(HINTERNET hHttpRequest, LPCWSTR lpszHeaders,
{
if (lpwhr->pCustHeaders[i].wFlags & HDR_ISREQUEST)
{
const WCHAR szFmt[] = { '\r','\n','%','s',':',' ','%','s', 0};
static const WCHAR szFmt[] = { '\r','\n','%','s',':',' ','%','s', 0};
cnt += sprintfW(requestString + cnt, szFmt,
lpwhr->pCustHeaders[i].lpszField, lpwhr->pCustHeaders[i].lpszValue);
TRACE("Adding custom header %s (%s)\n",
@ -1564,7 +1564,7 @@ BOOL WINAPI HTTP_HttpSendRequestW(HINTERNET hHttpRequest, LPCWSTR lpszHeaders,
if (lpwhr->lpszHostName)
{
const WCHAR szFmt[] = { '%','s','%','s',0 };
static const WCHAR szFmt[] = { '%','s','%','s',0 };
cnt += sprintfW(requestString + cnt, szFmt, HTTPHOSTHEADER, lpwhr->lpszHostName);
}
@ -1657,7 +1657,7 @@ BOOL WINAPI HTTP_HttpSendRequestW(HINTERNET hHttpRequest, LPCWSTR lpszHeaders,
{
LPHTTPHEADERW setCookieHeader;
int nPosStart = 0, nPosEnd = 0, len;
const WCHAR szFmt[] = { 'h','t','t','p',':','/','/','%','s','/',0};
static const WCHAR szFmt[] = { 'h','t','t','p',':','/','/','%','s','/',0};
setCookieHeader = &lpwhr->pCustHeaders[CustHeaderIndex];
@ -1677,7 +1677,7 @@ BOOL WINAPI HTTP_HttpSendRequestW(HINTERNET hHttpRequest, LPCWSTR lpszHeaders,
/* fixme: not case sensitive, strcasestr is gnu only */
int nDomainPosEnd = 0;
int nDomainPosStart = 0, nDomainLength = 0;
const WCHAR szDomain[] = {'d','o','m','a','i','n','=',0};
static const WCHAR szDomain[] = {'d','o','m','a','i','n','=',0};
LPWSTR lpszDomain = strstrW(&setCookieHeader->lpszValue[nPosEnd], szDomain);
if (lpszDomain)
{ /* they have specified their own domain, lets use it */
@ -1951,8 +1951,8 @@ BOOL HTTP_GetResponseHeaders(LPWININETHTTPREQW lpwhr)
BOOL bSuccess = FALSE;
INT rc = 0;
WCHAR value[MAX_FIELD_VALUE_LEN], field[MAX_FIELD_LEN];
const WCHAR szStatus[] = {'S','t','a','t','u','s',0};
const WCHAR szHttp[] = { 'H','T','T','P',0 };
static const WCHAR szStatus[] = {'S','t','a','t','u','s',0};
static const WCHAR szHttp[] = { 'H','T','T','P',0 };
char bufferA[MAX_REPLY_LEN];
TRACE("-->\n");
@ -2086,32 +2086,32 @@ BOOL HTTP_InterpretHttpHeader(LPWSTR buffer, LPWSTR field, INT fieldlen, LPWSTR
INT HTTP_GetStdHeaderIndex(LPCWSTR lpszField)
{
INT index = -1;
const WCHAR szContentLength[] = {
static const WCHAR szContentLength[] = {
'C','o','n','t','e','n','t','-','L','e','n','g','t','h',0};
const WCHAR szStatus[] = {'S','t','a','t','u','s',0};
const WCHAR szContentType[] = {
static const WCHAR szStatus[] = {'S','t','a','t','u','s',0};
static const WCHAR szContentType[] = {
'C','o','n','t','e','n','t','-','T','y','p','e',0};
const WCHAR szLastModified[] = {
static const WCHAR szLastModified[] = {
'L','a','s','t','-','M','o','d','i','f','i','e','d',0};
const WCHAR szLocation[] = {'L','o','c','a','t','i','o','n',0};
const WCHAR szAccept[] = {'A','c','c','e','p','t',0};
const WCHAR szReferer[] = { 'R','e','f','e','r','e','r',0};
const WCHAR szContentTrans[] = { 'C','o','n','t','e','n','t','-',
static const WCHAR szLocation[] = {'L','o','c','a','t','i','o','n',0};
static const WCHAR szAccept[] = {'A','c','c','e','p','t',0};
static const WCHAR szReferer[] = { 'R','e','f','e','r','e','r',0};
static const WCHAR szContentTrans[] = { 'C','o','n','t','e','n','t','-',
'T','r','a','n','s','f','e','r','-','E','n','c','o','d','i','n','g',0};
const WCHAR szDate[] = { 'D','a','t','e',0};
const WCHAR szServer[] = { 'S','e','r','v','e','r',0};
const WCHAR szConnection[] = { 'C','o','n','n','e','c','t','i','o','n',0};
const WCHAR szETag[] = { 'E','T','a','g',0};
const WCHAR szAcceptRanges[] = {
static const WCHAR szDate[] = { 'D','a','t','e',0};
static const WCHAR szServer[] = { 'S','e','r','v','e','r',0};
static const WCHAR szConnection[] = { 'C','o','n','n','e','c','t','i','o','n',0};
static const WCHAR szETag[] = { 'E','T','a','g',0};
static const WCHAR szAcceptRanges[] = {
'A','c','c','e','p','t','-','R','a','n','g','e','s',0 };
const WCHAR szExpires[] = { 'E','x','p','i','r','e','s',0 };
const WCHAR szMimeVersion[] = {
static const WCHAR szExpires[] = { 'E','x','p','i','r','e','s',0 };
static const WCHAR szMimeVersion[] = {
'M','i','m','e','-','V','e','r','s','i','o','n', 0};
const WCHAR szPragma[] = { 'P','r','a','g','m','a', 0};
const WCHAR szCacheControl[] = {
static const WCHAR szPragma[] = { 'P','r','a','g','m','a', 0};
static const WCHAR szCacheControl[] = {
'C','a','c','h','e','-','C','o','n','t','r','o','l',0};
const WCHAR szUserAgent[] = { 'U','s','e','r','-','A','g','e','n','t',0};
const WCHAR szProxyAuth[] = {
static const WCHAR szUserAgent[] = { 'U','s','e','r','-','A','g','e','n','t',0};
static const WCHAR szProxyAuth[] = {
'P','r','o','x','y','-',
'A','u','t','h','e','n','t','i','c','a','t','e', 0};

View File

@ -342,7 +342,7 @@ static BOOL INTERNET_ConfigureProxyFromReg( LPWININETAPPINFOW lpwai )
DWORD r, keytype, len, enabled;
LPSTR lpszInternetSettings =
"Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings";
const WCHAR szProxyServer[] = { 'P','r','o','x','y','S','e','r','v','e','r', 0 };
static const WCHAR szProxyServer[] = { 'P','r','o','x','y','S','e','r','v','e','r', 0 };
r = RegOpenKeyA(HKEY_CURRENT_USER, lpszInternetSettings, &key);
if ( r != ERROR_SUCCESS )
@ -361,7 +361,7 @@ static BOOL INTERNET_ConfigureProxyFromReg( LPWININETAPPINFOW lpwai )
if( (r == ERROR_SUCCESS) && len && (keytype == REG_SZ) )
{
LPWSTR szProxy, p;
const WCHAR szHttp[] = {'h','t','t','p','=',0};
static const WCHAR szHttp[] = {'h','t','t','p','=',0};
szProxy=HeapAlloc( GetProcessHeap(), 0, len );
RegQueryValueExW( key, szProxyServer, NULL, &keytype,
@ -1070,14 +1070,14 @@ BOOL WINAPI InternetCrackUrlA(LPCSTR lpszUrl, DWORD dwUrlLength, DWORD dwFlags,
INTERNET_SCHEME GetInternetSchemeW(LPCWSTR lpszScheme, INT nMaxCmp)
{
INTERNET_SCHEME iScheme=INTERNET_SCHEME_UNKNOWN;
const WCHAR lpszFtp[]={'f','t','p',0};
const WCHAR lpszGopher[]={'g','o','p','h','e','r',0};
const WCHAR lpszHttp[]={'h','t','t','p',0};
const WCHAR lpszHttps[]={'h','t','t','p','s',0};
const WCHAR lpszFile[]={'f','i','l','e',0};
const WCHAR lpszNews[]={'n','e','w','s',0};
const WCHAR lpszMailto[]={'m','a','i','l','t','o',0};
const WCHAR lpszRes[]={'r','e','s',0};
static const WCHAR lpszFtp[]={'f','t','p',0};
static const WCHAR lpszGopher[]={'g','o','p','h','e','r',0};
static const WCHAR lpszHttp[]={'h','t','t','p',0};
static const WCHAR lpszHttps[]={'h','t','t','p','s',0};
static const WCHAR lpszFile[]={'f','i','l','e',0};
static const WCHAR lpszNews[]={'n','e','w','s',0};
static const WCHAR lpszMailto[]={'m','a','i','l','t','o',0};
static const WCHAR lpszRes[]={'r','e','s',0};
WCHAR* tempBuffer=NULL;
TRACE("\n");
if(lpszScheme==NULL)
@ -1197,7 +1197,7 @@ BOOL WINAPI InternetCrackUrlW(LPCWSTR lpszUrl, DWORD dwUrlLength, DWORD dwFlags,
if (bIsAbsolute) /* Parse <protocol>:[//<net_loc>] */
{
LPWSTR lpszNetLoc;
const WCHAR wszAbout[]={'a','b','o','u','t',':',0};
static const WCHAR wszAbout[]={'a','b','o','u','t',':',0};
/* Get scheme first. */
lpUC->nScheme = GetInternetSchemeW(lpszUrl, lpszcp - lpszUrl);
@ -1680,7 +1680,7 @@ static BOOL INET_QueryOptionHelper(BOOL bIsUnicode, HINTERNET hInternet, DWORD d
{
LPWININETHTTPREQW lpreq = (LPWININETHTTPREQW) lpwhh;
WCHAR url[1023];
const WCHAR szFmt[] = {'h','t','t','p',':','/','/','%','s','%','s',0};
static const WCHAR szFmt[] = {'h','t','t','p',':','/','/','%','s','%','s',0};
sprintfW(url,szFmt,lpreq->lpszHostName,lpreq->lpszPath);
TRACE("INTERNET_OPTION_URL: %s\n",debugstr_w(url));
@ -2076,7 +2076,7 @@ HINTERNET WINAPI INTERNET_InternetOpenUrlW(HINTERNET hInternet, LPCWSTR lpszUrl,
case INTERNET_SCHEME_HTTP:
case INTERNET_SCHEME_HTTPS: {
const WCHAR szStars[] = { '*','/','*', 0 };
static const WCHAR szStars[] = { '*','/','*', 0 };
LPCWSTR accept[2] = { szStars, NULL };
if(urlComponents.nPort == 0) {
if(urlComponents.nScheme == INTERNET_SCHEME_HTTP)

View File

@ -518,14 +518,14 @@ static BOOL DeferToRunOnce(LPWSTR link)
{
HKEY hkey;
LONG r, len;
const WCHAR szRunOnce[] = {
static const WCHAR szRunOnce[] = {
'S','o','f','t','w','a','r','e','\\',
'M','i','c','r','o','s','o','f','t','\\',
'W','i','n','d','o','w','s','\\',
'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\',
'R','u','n','O','n','c','e',0
};
const WCHAR szFormat[] = { '%','s',' ','"','%','s','"',0 };
static const WCHAR szFormat[] = { '%','s',' ','"','%','s','"',0 };
LPWSTR buffer;
WCHAR szExecutable[MAX_PATH];