mirror of
https://github.com/reactos/reactos.git
synced 2025-06-01 15:38:37 +00:00
* fixed some warnings
svn path=/trunk/; revision=25316
This commit is contained in:
parent
d2e64780de
commit
d5de43d13e
11 changed files with 174 additions and 174 deletions
|
@ -31,7 +31,7 @@ PCHAR *GetSubkeyNames( PCHAR MainKeyName, PCHAR Append ) {
|
||||||
DH_DbgPrint(MID_TRACE,("AppendLen: %d, CharTotal: %d\n",
|
DH_DbgPrint(MID_TRACE,("AppendLen: %d, CharTotal: %d\n",
|
||||||
AppendLen, CharTotal));
|
AppendLen, CharTotal));
|
||||||
|
|
||||||
Out = malloc( CharTotal );
|
Out = (CHAR**) malloc( CharTotal );
|
||||||
OutKeyName = ((PCHAR)&Out[MaxSubKeys+1]);
|
OutKeyName = ((PCHAR)&Out[MaxSubKeys+1]);
|
||||||
|
|
||||||
if( !Out ) { RegCloseKey( MainKey ); return NULL; }
|
if( !Out ) { RegCloseKey( MainKey ); return NULL; }
|
||||||
|
@ -73,7 +73,7 @@ PCHAR RegReadString( HKEY Root, PCHAR Subkey, PCHAR Value ) {
|
||||||
|
|
||||||
DH_DbgPrint(MID_TRACE,("Value %s has size %d\n", Value, SubOutLen));
|
DH_DbgPrint(MID_TRACE,("Value %s has size %d\n", Value, SubOutLen));
|
||||||
|
|
||||||
if( !(SubOut = malloc(SubOutLen)) )
|
if( !(SubOut = (CHAR*) malloc(SubOutLen)) )
|
||||||
goto regerror;
|
goto regerror;
|
||||||
|
|
||||||
if( (Error = RegQueryValueEx( ValueKey, Value, NULL, NULL,
|
if( (Error = RegQueryValueEx( ValueKey, Value, NULL, NULL,
|
||||||
|
@ -128,7 +128,7 @@ HKEY FindAdapterKey( PDHCP_ADAPTER Adapter ) {
|
||||||
RootDevice &&
|
RootDevice &&
|
||||||
!strcmp( DriverDesc, Adapter->DhclientInfo.name ) ) {
|
!strcmp( DriverDesc, Adapter->DhclientInfo.name ) ) {
|
||||||
TargetKeyName =
|
TargetKeyName =
|
||||||
malloc( strlen( TargetKeyNameStart ) +
|
(CHAR*) malloc( strlen( TargetKeyNameStart ) +
|
||||||
strlen( RootDevice ) +
|
strlen( RootDevice ) +
|
||||||
strlen( TargetKeyNameEnd ) + 1 );
|
strlen( TargetKeyNameEnd ) + 1 );
|
||||||
if( !TargetKeyName ) goto cleanup;
|
if( !TargetKeyName ) goto cleanup;
|
||||||
|
@ -219,7 +219,7 @@ BOOL PrepareAdapterForService( PDHCP_ADAPTER Adapter ) {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void AdapterInit() {
|
void AdapterInit() {
|
||||||
PMIB_IFTABLE Table = malloc(sizeof(MIB_IFTABLE));
|
PMIB_IFTABLE Table = (PMIB_IFTABLE) malloc(sizeof(MIB_IFTABLE));
|
||||||
DWORD Error, Size, i;
|
DWORD Error, Size, i;
|
||||||
PDHCP_ADAPTER Adapter = NULL;
|
PDHCP_ADAPTER Adapter = NULL;
|
||||||
|
|
||||||
|
@ -233,7 +233,7 @@ void AdapterInit() {
|
||||||
ERROR_INSUFFICIENT_BUFFER ) {
|
ERROR_INSUFFICIENT_BUFFER ) {
|
||||||
DH_DbgPrint(MID_TRACE,("Error %d, New Buffer Size: %d\n", Error, Size));
|
DH_DbgPrint(MID_TRACE,("Error %d, New Buffer Size: %d\n", Error, Size));
|
||||||
free( Table );
|
free( Table );
|
||||||
Table = malloc( Size );
|
Table = (PMIB_IFTABLE) malloc( Size );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( Error != NO_ERROR ) goto term;
|
if( Error != NO_ERROR ) goto term;
|
||||||
|
@ -243,7 +243,7 @@ void AdapterInit() {
|
||||||
for( i = 0; i < Table->dwNumEntries; i++ ) {
|
for( i = 0; i < Table->dwNumEntries; i++ ) {
|
||||||
DH_DbgPrint(MID_TRACE,("Getting adapter %d attributes\n",
|
DH_DbgPrint(MID_TRACE,("Getting adapter %d attributes\n",
|
||||||
Table->table[i].dwIndex));
|
Table->table[i].dwIndex));
|
||||||
Adapter = calloc( sizeof( DHCP_ADAPTER ) + Table->table[i].dwMtu, 1 );
|
Adapter = (DHCP_ADAPTER*) calloc( sizeof( DHCP_ADAPTER ) + Table->table[i].dwMtu, 1 );
|
||||||
|
|
||||||
if( Adapter && Table->table[i].dwType == MIB_IF_TYPE_ETHERNET ) {
|
if( Adapter && Table->table[i].dwType == MIB_IF_TYPE_ETHERNET ) {
|
||||||
memcpy( &Adapter->IfMib, &Table->table[i],
|
memcpy( &Adapter->IfMib, &Table->table[i],
|
||||||
|
|
|
@ -261,7 +261,7 @@ PLOGFILE LogfCreate(WCHAR *LogName,
|
||||||
PLOGFILE LogFile;
|
PLOGFILE LogFile;
|
||||||
BOOL bResult, bCreateNew = FALSE;
|
BOOL bResult, bCreateNew = FALSE;
|
||||||
|
|
||||||
LogFile = HeapAlloc(MyHeap,
|
LogFile = (LOGFILE*) HeapAlloc(MyHeap,
|
||||||
HEAP_ZERO_MEMORY,
|
HEAP_ZERO_MEMORY,
|
||||||
sizeof(LOGFILE));
|
sizeof(LOGFILE));
|
||||||
if(!LogFile)
|
if(!LogFile)
|
||||||
|
@ -288,7 +288,7 @@ PLOGFILE LogfCreate(WCHAR *LogName,
|
||||||
|
|
||||||
bCreateNew = (GetLastError() == ERROR_ALREADY_EXISTS) ? FALSE : TRUE;
|
bCreateNew = (GetLastError() == ERROR_ALREADY_EXISTS) ? FALSE : TRUE;
|
||||||
|
|
||||||
LogFile->LogName = HeapAlloc(MyHeap,
|
LogFile->LogName = (WCHAR*) HeapAlloc(MyHeap,
|
||||||
HEAP_ZERO_MEMORY,
|
HEAP_ZERO_MEMORY,
|
||||||
(lstrlenW(LogName)+1)*sizeof(WCHAR));
|
(lstrlenW(LogName)+1)*sizeof(WCHAR));
|
||||||
|
|
||||||
|
@ -300,7 +300,7 @@ PLOGFILE LogfCreate(WCHAR *LogName,
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
LogFile->FileName = HeapAlloc(MyHeap,
|
LogFile->FileName = (WCHAR*) HeapAlloc(MyHeap,
|
||||||
HEAP_ZERO_MEMORY,
|
HEAP_ZERO_MEMORY,
|
||||||
(lstrlenW(FileName)+1)*sizeof(WCHAR));
|
(lstrlenW(FileName)+1)*sizeof(WCHAR));
|
||||||
|
|
||||||
|
@ -796,7 +796,7 @@ PBYTE LogfAllocAndBuildNewRecord(LPDWORD lpRecSize,
|
||||||
if(dwRecSize % 4 != 0) dwRecSize += 4 - (dwRecSize % 4);
|
if(dwRecSize % 4 != 0) dwRecSize += 4 - (dwRecSize % 4);
|
||||||
dwRecSize+=4;
|
dwRecSize+=4;
|
||||||
|
|
||||||
Buffer = HeapAlloc(MyHeap, HEAP_ZERO_MEMORY, dwRecSize);
|
Buffer = (BYTE*) HeapAlloc(MyHeap, HEAP_ZERO_MEMORY, dwRecSize);
|
||||||
if(!Buffer)
|
if(!Buffer)
|
||||||
{
|
{
|
||||||
DPRINT1("Can't allocate heap!\n");
|
DPRINT1("Can't allocate heap!\n");
|
||||||
|
|
|
@ -300,7 +300,7 @@ GetButtonHeight(HDC hDC,
|
||||||
rect.top = 0;
|
rect.top = 0;
|
||||||
rect.bottom = 25;
|
rect.bottom = 25;
|
||||||
|
|
||||||
hOldFont = SelectObject(hDC, hFont);
|
hOldFont = (HFONT) SelectObject(hDC, hFont);
|
||||||
DrawText(hDC, szText, -1, &rect, DT_TOP | DT_CALCRECT | DT_WORDBREAK);
|
DrawText(hDC, szText, -1, &rect, DT_TOP | DT_CALCRECT | DT_WORDBREAK);
|
||||||
SelectObject(hDC, hOldFont);
|
SelectObject(hDC, hOldFont);
|
||||||
|
|
||||||
|
@ -487,7 +487,7 @@ PaintBanner(HDC hdc, LPRECT rcPanel)
|
||||||
HBRUSH hOldBrush;
|
HBRUSH hOldBrush;
|
||||||
|
|
||||||
/* Title bitmap */
|
/* Title bitmap */
|
||||||
hOldBitmap = SelectObject(hdcMem, hTitleBitmap);
|
hOldBitmap = (HBITMAP) SelectObject(hdcMem, hTitleBitmap);
|
||||||
BitBlt(hdc,
|
BitBlt(hdc,
|
||||||
rcPanel->left,
|
rcPanel->left,
|
||||||
rcPanel->top,
|
rcPanel->top,
|
||||||
|
@ -497,7 +497,7 @@ PaintBanner(HDC hdc, LPRECT rcPanel)
|
||||||
SelectObject(hdcMem, hOldBitmap);
|
SelectObject(hdcMem, hOldBitmap);
|
||||||
|
|
||||||
/* Dark blue line */
|
/* Dark blue line */
|
||||||
hOldBrush = SelectObject(hdc, hbrDarkBlue);
|
hOldBrush = (HBRUSH) SelectObject(hdc, hbrDarkBlue);
|
||||||
PatBlt(hdc,
|
PatBlt(hdc,
|
||||||
rcPanel->left,
|
rcPanel->left,
|
||||||
rcPanel->bottom - 3,
|
rcPanel->bottom - 3,
|
||||||
|
@ -535,7 +535,7 @@ OnPaint(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
PaintBanner(hdc, &rcTitlePanel);
|
PaintBanner(hdc, &rcTitlePanel);
|
||||||
|
|
||||||
/* Left panel */
|
/* Left panel */
|
||||||
hOldBrush = SelectObject (hdc, hbrLightBlue);
|
hOldBrush = (HBRUSH) SelectObject (hdc, hbrLightBlue);
|
||||||
PatBlt(hdc,
|
PatBlt(hdc,
|
||||||
rcLeftPanel.left,
|
rcLeftPanel.left,
|
||||||
rcLeftPanel.top,
|
rcLeftPanel.top,
|
||||||
|
@ -545,7 +545,7 @@ OnPaint(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
SelectObject(hdc, hOldBrush);
|
SelectObject(hdc, hOldBrush);
|
||||||
|
|
||||||
/* Right panel */
|
/* Right panel */
|
||||||
hOldBrush = SelectObject (hdc, WHITE_BRUSH);
|
hOldBrush = (HBRUSH) SelectObject (hdc, WHITE_BRUSH);
|
||||||
PatBlt(hdc,
|
PatBlt(hdc,
|
||||||
rcRightPanel.left,
|
rcRightPanel.left,
|
||||||
rcRightPanel.top,
|
rcRightPanel.top,
|
||||||
|
@ -556,7 +556,7 @@ OnPaint(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
||||||
/* Draw dark verical line */
|
/* Draw dark verical line */
|
||||||
hPen = CreatePen(PS_SOLID, 0, DARK_BLUE);
|
hPen = CreatePen(PS_SOLID, 0, DARK_BLUE);
|
||||||
hOldPen = SelectObject(hdc, hPen);
|
hOldPen = (HPEN) SelectObject(hdc, hPen);
|
||||||
MoveToEx(hdc, rcRightPanel.left, rcRightPanel.top, NULL);
|
MoveToEx(hdc, rcRightPanel.left, rcRightPanel.top, NULL);
|
||||||
LineTo(hdc, rcRightPanel.left, rcRightPanel.bottom);
|
LineTo(hdc, rcRightPanel.left, rcRightPanel.bottom);
|
||||||
SelectObject(hdc, hOldPen);
|
SelectObject(hdc, hOldPen);
|
||||||
|
@ -566,7 +566,7 @@ OnPaint(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
if ((nTopic == -1) && (hDefaultTopicBitmap != 0))
|
if ((nTopic == -1) && (hDefaultTopicBitmap != 0))
|
||||||
{
|
{
|
||||||
GetObject(hDefaultTopicBitmap, sizeof(BITMAP), &bmpInfo);
|
GetObject(hDefaultTopicBitmap, sizeof(BITMAP), &bmpInfo);
|
||||||
hOldBitmap = SelectObject (hdcMem, hDefaultTopicBitmap);
|
hOldBitmap = (HBITMAP) SelectObject (hdcMem, hDefaultTopicBitmap);
|
||||||
BitBlt(hdc,
|
BitBlt(hdc,
|
||||||
rcRightPanel.right - bmpInfo.bmWidth,
|
rcRightPanel.right - bmpInfo.bmWidth,
|
||||||
rcRightPanel.bottom - bmpInfo.bmHeight,
|
rcRightPanel.bottom - bmpInfo.bmHeight,
|
||||||
|
@ -580,7 +580,7 @@ OnPaint(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
else if ((nTopic != -1) && (hTopicBitmap[nTopic] != 0))
|
else if ((nTopic != -1) && (hTopicBitmap[nTopic] != 0))
|
||||||
{
|
{
|
||||||
GetObject(hTopicBitmap[nTopic], sizeof(BITMAP), &bmpInfo);
|
GetObject(hTopicBitmap[nTopic], sizeof(BITMAP), &bmpInfo);
|
||||||
hOldBitmap = SelectObject (hdcMem, hTopicBitmap[nTopic]);
|
hOldBitmap = (HBITMAP) SelectObject (hdcMem, hTopicBitmap[nTopic]);
|
||||||
BitBlt(hdc,
|
BitBlt(hdc,
|
||||||
rcRightPanel.right - bmpInfo.bmWidth,
|
rcRightPanel.right - bmpInfo.bmWidth,
|
||||||
rcRightPanel.bottom - bmpInfo.bmHeight,
|
rcRightPanel.bottom - bmpInfo.bmHeight,
|
||||||
|
@ -626,7 +626,7 @@ OnPaint(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
rcTitle.right = rcLeftPanel.right - 5;
|
rcTitle.right = rcLeftPanel.right - 5;
|
||||||
rcTitle.top = rcLeftPanel.bottom - 40;
|
rcTitle.top = rcLeftPanel.bottom - 40;
|
||||||
rcTitle.bottom = rcLeftPanel.bottom - 5;
|
rcTitle.bottom = rcLeftPanel.bottom - 5;
|
||||||
hOldFont = SelectObject(hdc, hfontTopicDescription);
|
hOldFont = (HFONT) SelectObject(hdc, hfontTopicDescription);
|
||||||
DrawText(hdc, version, -1, &rcTitle, DT_BOTTOM | DT_CALCRECT | DT_SINGLELINE);
|
DrawText(hdc, version, -1, &rcTitle, DT_BOTTOM | DT_CALCRECT | DT_SINGLELINE);
|
||||||
DrawText(hdc, version, -1, &rcTitle, DT_BOTTOM | DT_SINGLELINE);
|
DrawText(hdc, version, -1, &rcTitle, DT_BOTTOM | DT_SINGLELINE);
|
||||||
SelectObject(hdc, hOldFont);
|
SelectObject(hdc, hOldFont);
|
||||||
|
@ -636,7 +636,7 @@ OnPaint(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
rcTitle.right = rcRightPanel.right - 8;
|
rcTitle.right = rcRightPanel.right - 8;
|
||||||
rcTitle.top = rcRightPanel.top + 8;
|
rcTitle.top = rcRightPanel.top + 8;
|
||||||
rcTitle.bottom = rcTitle.top + 57;
|
rcTitle.bottom = rcTitle.top + 57;
|
||||||
hOldFont = SelectObject(hdc, hfontTopicTitle);
|
hOldFont = (HFONT) SelectObject(hdc, hfontTopicTitle);
|
||||||
DrawText(hdc, szTopicTitle, -1, &rcTitle, DT_TOP | DT_CALCRECT);
|
DrawText(hdc, szTopicTitle, -1, &rcTitle, DT_TOP | DT_CALCRECT);
|
||||||
|
|
||||||
SetTextColor(hdc, DARK_BLUE);
|
SetTextColor(hdc, DARK_BLUE);
|
||||||
|
@ -686,9 +686,9 @@ OnDrawItem(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (lpDis->CtlID == (ULONG)nTopic)
|
if (lpDis->CtlID == (ULONG)nTopic)
|
||||||
hOldBrush = SelectObject(lpDis->hDC, hbrRightPanel);
|
hOldBrush = (HBRUSH) SelectObject(lpDis->hDC, hbrRightPanel);
|
||||||
else
|
else
|
||||||
hOldBrush = SelectObject(lpDis->hDC, hbrLightBlue);
|
hOldBrush = (HBRUSH) SelectObject(lpDis->hDC, hbrLightBlue);
|
||||||
|
|
||||||
PatBlt(lpDis->hDC,
|
PatBlt(lpDis->hDC,
|
||||||
lpDis->rcItem.left,
|
lpDis->rcItem.left,
|
||||||
|
@ -699,7 +699,7 @@ OnDrawItem(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
SelectObject(lpDis->hDC, hOldBrush);
|
SelectObject(lpDis->hDC, hOldBrush);
|
||||||
|
|
||||||
hPen = CreatePen(PS_SOLID, 0, DARK_BLUE);
|
hPen = CreatePen(PS_SOLID, 0, DARK_BLUE);
|
||||||
hOldPen = SelectObject(lpDis->hDC, hPen);
|
hOldPen = (HPEN) SelectObject(lpDis->hDC, hPen);
|
||||||
MoveToEx(lpDis->hDC, lpDis->rcItem.left, lpDis->rcItem.bottom-1, NULL);
|
MoveToEx(lpDis->hDC, lpDis->rcItem.left, lpDis->rcItem.bottom-1, NULL);
|
||||||
LineTo(lpDis->hDC, lpDis->rcItem.right, lpDis->rcItem.bottom-1);
|
LineTo(lpDis->hDC, lpDis->rcItem.right, lpDis->rcItem.bottom-1);
|
||||||
SelectObject(lpDis->hDC, hOldPen);
|
SelectObject(lpDis->hDC, hOldPen);
|
||||||
|
|
|
@ -275,7 +275,7 @@ BOOL Batch (LPTSTR fullname, LPTSTR firstword, LPTSTR param)
|
||||||
//
|
//
|
||||||
// Allocate enough memory to hold the params and copy them over without modifications
|
// Allocate enough memory to hold the params and copy them over without modifications
|
||||||
//
|
//
|
||||||
bc->raw_params = malloc((_tcslen(param)+1) * sizeof(TCHAR));
|
bc->raw_params = (TCHAR*) malloc((_tcslen(param)+1) * sizeof(TCHAR));
|
||||||
if (bc->raw_params != NULL)
|
if (bc->raw_params != NULL)
|
||||||
{
|
{
|
||||||
memset (bc->raw_params, 0, _tcslen(bc->raw_params) * sizeof(TCHAR));
|
memset (bc->raw_params, 0, _tcslen(bc->raw_params) * sizeof(TCHAR));
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<!DOCTYPE project SYSTEM "tools/rbuild/project.dtd">
|
<!DOCTYPE project SYSTEM "tools/rbuild/project.dtd">
|
||||||
<module name="expand" type="win32cui" installbase="system32" installname="expand.exe" usewrc="false">
|
<module name="expand" type="win32cui" installbase="system32" installname="expand.exe" usewrc="false">
|
||||||
<include base="ReactOS">include/reactos/wine</include>
|
<include base="ReactOS">include/reactos/wine</include>
|
||||||
<include base="cmd">.</include>
|
<include base="expand">.</include>
|
||||||
<define name="__USE_W32API" />
|
<define name="__USE_W32API" />
|
||||||
<define name="ANONYMOUSUNIONS" />
|
<define name="ANONYMOUSUNIONS" />
|
||||||
<define name="_WIN32_WINNT">0x0501</define>
|
<define name="_WIN32_WINNT">0x0501</define>
|
||||||
|
|
|
@ -135,7 +135,7 @@ static LPWSTR build_properties(struct string_list *property_list)
|
||||||
for(list = property_list; list; list = list->next)
|
for(list = property_list; list; list = list->next)
|
||||||
len += lstrlenW(list->str) + 3;
|
len += lstrlenW(list->str) + 3;
|
||||||
|
|
||||||
ret = HeapAlloc( GetProcessHeap(), 0, len*sizeof(WCHAR) );
|
ret = (WCHAR*) HeapAlloc( GetProcessHeap(), 0, len*sizeof(WCHAR) );
|
||||||
|
|
||||||
/* add a space before each string, and quote the value */
|
/* add a space before each string, and quote the value */
|
||||||
p = ret;
|
p = ret;
|
||||||
|
@ -179,7 +179,7 @@ static LPWSTR build_transforms(struct string_list *transform_list)
|
||||||
for(list = transform_list; list; list = list->next)
|
for(list = transform_list; list; list = list->next)
|
||||||
len += lstrlenW(list->str) + 1;
|
len += lstrlenW(list->str) + 1;
|
||||||
|
|
||||||
ret = HeapAlloc( GetProcessHeap(), 0, len*sizeof(WCHAR) );
|
ret = (WCHAR*) HeapAlloc( GetProcessHeap(), 0, len*sizeof(WCHAR) );
|
||||||
|
|
||||||
/* add all the transforms with a semicolon between each one */
|
/* add all the transforms with a semicolon between each one */
|
||||||
p = ret;
|
p = ret;
|
||||||
|
@ -211,7 +211,7 @@ static DWORD msi_atou(LPCWSTR str)
|
||||||
static LPWSTR msi_strdup(LPCWSTR str)
|
static LPWSTR msi_strdup(LPCWSTR str)
|
||||||
{
|
{
|
||||||
DWORD len = lstrlenW(str)+1;
|
DWORD len = lstrlenW(str)+1;
|
||||||
LPWSTR ret = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)*len);
|
LPWSTR ret = (WCHAR*) HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)*len);
|
||||||
lstrcpyW(ret, str);
|
lstrcpyW(ret, str);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -227,7 +227,7 @@ static BOOL msi_strequal(LPCWSTR str1, LPCSTR str2)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
if( lstrlenW(str1) != (len-1) )
|
if( lstrlenW(str1) != (len-1) )
|
||||||
return TRUE;
|
return TRUE;
|
||||||
strW = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)*len);
|
strW = (WCHAR*) HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)*len);
|
||||||
MultiByteToWideChar( CP_ACP, 0, str2, -1, strW, len);
|
MultiByteToWideChar( CP_ACP, 0, str2, -1, strW, len);
|
||||||
ret = CompareStringW(GetThreadLocale(), NORM_IGNORECASE, str1, len, strW, len);
|
ret = CompareStringW(GetThreadLocale(), NORM_IGNORECASE, str1, len, strW, len);
|
||||||
HeapFree(GetProcessHeap(), 0, strW);
|
HeapFree(GetProcessHeap(), 0, strW);
|
||||||
|
@ -245,7 +245,7 @@ static BOOL msi_strprefix(LPCWSTR str1, LPCSTR str2)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
if( lstrlenW(str1) < (len-1) )
|
if( lstrlenW(str1) < (len-1) )
|
||||||
return TRUE;
|
return TRUE;
|
||||||
strW = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)*len);
|
strW = (WCHAR*) HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)*len);
|
||||||
MultiByteToWideChar( CP_ACP, 0, str2, -1, strW, len);
|
MultiByteToWideChar( CP_ACP, 0, str2, -1, strW, len);
|
||||||
ret = CompareStringW(GetThreadLocale(), NORM_IGNORECASE, str1, len-1, strW, len-1);
|
ret = CompareStringW(GetThreadLocale(), NORM_IGNORECASE, str1, len-1, strW, len-1);
|
||||||
HeapFree(GetProcessHeap(), 0, strW);
|
HeapFree(GetProcessHeap(), 0, strW);
|
||||||
|
@ -393,7 +393,7 @@ static void process_args( WCHAR *cmdline, int *pargc, WCHAR ***pargv )
|
||||||
int i, n;
|
int i, n;
|
||||||
|
|
||||||
n = chomp( p );
|
n = chomp( p );
|
||||||
argv = HeapAlloc(GetProcessHeap(), 0, sizeof (WCHAR*)*(n+1));
|
argv = (WCHAR**) HeapAlloc(GetProcessHeap(), 0, sizeof (WCHAR*)*(n+1));
|
||||||
for( i=0; i<n; i++ )
|
for( i=0; i<n; i++ )
|
||||||
{
|
{
|
||||||
argv[i] = p;
|
argv[i] = p;
|
||||||
|
@ -419,7 +419,7 @@ static BOOL process_args_from_reg( LPWSTR ident, int *pargc, WCHAR ***pargv )
|
||||||
r = RegQueryValueExW(hkey, ident, 0, &type, 0, &sz);
|
r = RegQueryValueExW(hkey, ident, 0, &type, 0, &sz);
|
||||||
if(r == ERROR_SUCCESS && type == REG_SZ)
|
if(r == ERROR_SUCCESS && type == REG_SZ)
|
||||||
{
|
{
|
||||||
buf = HeapAlloc(GetProcessHeap(), 0, sz);
|
buf = (WCHAR*) HeapAlloc(GetProcessHeap(), 0, sz);
|
||||||
r = RegQueryValueExW(hkey, ident, 0, &type, (LPBYTE)buf, &sz);
|
r = RegQueryValueExW(hkey, ident, 0, &type, (LPBYTE)buf, &sz);
|
||||||
if( r == ERROR_SUCCESS )
|
if( r == ERROR_SUCCESS )
|
||||||
{
|
{
|
||||||
|
@ -781,23 +781,23 @@ int main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
else if(!msi_strequal(argvW[i]+2, "f"))
|
else if(!msi_strequal(argvW[i]+2, "f"))
|
||||||
{
|
{
|
||||||
InstallUILevel = INSTALLUILEVEL_FULL|INSTALLUILEVEL_ENDDIALOG;
|
InstallUILevel = (INSTALLUILEVEL) (INSTALLUILEVEL_FULL|INSTALLUILEVEL_ENDDIALOG);
|
||||||
}
|
}
|
||||||
else if(!msi_strequal(argvW[i]+2, "n+"))
|
else if(!msi_strequal(argvW[i]+2, "n+"))
|
||||||
{
|
{
|
||||||
InstallUILevel = INSTALLUILEVEL_NONE|INSTALLUILEVEL_ENDDIALOG;
|
InstallUILevel = (INSTALLUILEVEL) (INSTALLUILEVEL_NONE|INSTALLUILEVEL_ENDDIALOG);
|
||||||
}
|
}
|
||||||
else if(!msi_strequal(argvW[i]+2, "b+"))
|
else if(!msi_strequal(argvW[i]+2, "b+"))
|
||||||
{
|
{
|
||||||
InstallUILevel = INSTALLUILEVEL_BASIC|INSTALLUILEVEL_ENDDIALOG;
|
InstallUILevel = (INSTALLUILEVEL) (INSTALLUILEVEL_BASIC|INSTALLUILEVEL_ENDDIALOG);
|
||||||
}
|
}
|
||||||
else if(!msi_strequal(argvW[i]+2, "b-"))
|
else if(!msi_strequal(argvW[i]+2, "b-"))
|
||||||
{
|
{
|
||||||
InstallUILevel = INSTALLUILEVEL_BASIC|INSTALLUILEVEL_PROGRESSONLY;
|
InstallUILevel = (INSTALLUILEVEL) (INSTALLUILEVEL_BASIC|INSTALLUILEVEL_PROGRESSONLY);
|
||||||
}
|
}
|
||||||
else if(!msi_strequal(argvW[i]+2, "b+!"))
|
else if(!msi_strequal(argvW[i]+2, "b+!"))
|
||||||
{
|
{
|
||||||
InstallUILevel = INSTALLUILEVEL_BASIC|INSTALLUILEVEL_ENDDIALOG;
|
InstallUILevel = (INSTALLUILEVEL) (INSTALLUILEVEL_BASIC|INSTALLUILEVEL_ENDDIALOG);
|
||||||
WINE_FIXME("Unknown modifier: !\n");
|
WINE_FIXME("Unknown modifier: !\n");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -137,7 +137,7 @@ ScmCreateNewServiceRecord(LPWSTR lpServiceName,
|
||||||
DPRINT("Service: '%S'\n", lpServiceName);
|
DPRINT("Service: '%S'\n", lpServiceName);
|
||||||
|
|
||||||
/* Allocate service entry */
|
/* Allocate service entry */
|
||||||
lpService = HeapAlloc(GetProcessHeap(),
|
lpService = (SERVICE*) HeapAlloc(GetProcessHeap(),
|
||||||
HEAP_ZERO_MEMORY,
|
HEAP_ZERO_MEMORY,
|
||||||
sizeof(SERVICE) + ((wcslen(lpServiceName) + 1) * sizeof(WCHAR)));
|
sizeof(SERVICE) + ((wcslen(lpServiceName) + 1) * sizeof(WCHAR)));
|
||||||
if (lpService == NULL)
|
if (lpService == NULL)
|
||||||
|
@ -449,7 +449,7 @@ ScmCheckDriver(PSERVICE Service)
|
||||||
|
|
||||||
BufferLength = sizeof(OBJECT_DIRECTORY_INFORMATION) +
|
BufferLength = sizeof(OBJECT_DIRECTORY_INFORMATION) +
|
||||||
2 * MAX_PATH * sizeof(WCHAR);
|
2 * MAX_PATH * sizeof(WCHAR);
|
||||||
DirInfo = HeapAlloc(GetProcessHeap(),
|
DirInfo = (OBJECT_DIRECTORY_INFORMATION*) HeapAlloc(GetProcessHeap(),
|
||||||
HEAP_ZERO_MEMORY,
|
HEAP_ZERO_MEMORY,
|
||||||
BufferLength);
|
BufferLength);
|
||||||
|
|
||||||
|
@ -541,7 +541,7 @@ ScmControlService(PSERVICE Service,
|
||||||
|
|
||||||
DPRINT("ScmControlService() called\n");
|
DPRINT("ScmControlService() called\n");
|
||||||
|
|
||||||
ControlPacket = HeapAlloc(GetProcessHeap(),
|
ControlPacket = (SCM_CONTROL_PACKET*) HeapAlloc(GetProcessHeap(),
|
||||||
HEAP_ZERO_MEMORY,
|
HEAP_ZERO_MEMORY,
|
||||||
sizeof(SCM_CONTROL_PACKET));
|
sizeof(SCM_CONTROL_PACKET));
|
||||||
if (ControlPacket == NULL)
|
if (ControlPacket == NULL)
|
||||||
|
@ -600,7 +600,7 @@ ScmSendStartCommand(PSERVICE Service,
|
||||||
DPRINT("ArgsLength: %ld\nTotalLength: %ld\n\n", ArgsLength, TotalLength);
|
DPRINT("ArgsLength: %ld\nTotalLength: %ld\n\n", ArgsLength, TotalLength);
|
||||||
|
|
||||||
/* Allocate a control packet */
|
/* Allocate a control packet */
|
||||||
ControlPacket = HeapAlloc(GetProcessHeap(),
|
ControlPacket = (SCM_CONTROL_PACKET*) HeapAlloc(GetProcessHeap(),
|
||||||
HEAP_ZERO_MEMORY,
|
HEAP_ZERO_MEMORY,
|
||||||
sizeof(SCM_CONTROL_PACKET) + (TotalLength - 1) * sizeof(WCHAR));
|
sizeof(SCM_CONTROL_PACKET) + (TotalLength - 1) * sizeof(WCHAR));
|
||||||
if (ControlPacket == NULL)
|
if (ControlPacket == NULL)
|
||||||
|
|
|
@ -123,7 +123,7 @@ ScmGetDriverStatus(PSERVICE lpService,
|
||||||
|
|
||||||
BufferLength = sizeof(OBJECT_DIRECTORY_INFORMATION) +
|
BufferLength = sizeof(OBJECT_DIRECTORY_INFORMATION) +
|
||||||
2 * MAX_PATH * sizeof(WCHAR);
|
2 * MAX_PATH * sizeof(WCHAR);
|
||||||
DirInfo = HeapAlloc(GetProcessHeap(),
|
DirInfo = (OBJECT_DIRECTORY_INFORMATION*) HeapAlloc(GetProcessHeap(),
|
||||||
HEAP_ZERO_MEMORY,
|
HEAP_ZERO_MEMORY,
|
||||||
BufferLength);
|
BufferLength);
|
||||||
|
|
||||||
|
|
|
@ -139,13 +139,13 @@ CreateGroupListRoutine(PWSTR ValueName,
|
||||||
|
|
||||||
Group = (PSERVICE_GROUP)HeapAlloc(GetProcessHeap(),
|
Group = (PSERVICE_GROUP)HeapAlloc(GetProcessHeap(),
|
||||||
HEAP_ZERO_MEMORY,
|
HEAP_ZERO_MEMORY,
|
||||||
sizeof(SERVICE_GROUP) + (wcslen(ValueData) * sizeof(WCHAR)));
|
sizeof(SERVICE_GROUP) + (wcslen((const wchar_t*) ValueData) * sizeof(WCHAR)));
|
||||||
if (Group == NULL)
|
if (Group == NULL)
|
||||||
{
|
{
|
||||||
return STATUS_INSUFFICIENT_RESOURCES;
|
return STATUS_INSUFFICIENT_RESOURCES;
|
||||||
}
|
}
|
||||||
|
|
||||||
wcscpy(Group->szGroupName, ValueData);
|
wcscpy(Group->szGroupName, (const wchar_t*) ValueData);
|
||||||
Group->lpGroupName = Group->szGroupName;
|
Group->lpGroupName = Group->szGroupName;
|
||||||
Group->dwRefCount = (DWORD)-1;
|
Group->dwRefCount = (DWORD)-1;
|
||||||
|
|
||||||
|
|
|
@ -146,7 +146,7 @@ ScmCreateManagerHandle(LPWSTR lpDatabaseName,
|
||||||
if (lpDatabaseName == NULL)
|
if (lpDatabaseName == NULL)
|
||||||
lpDatabaseName = SERVICES_ACTIVE_DATABASEW;
|
lpDatabaseName = SERVICES_ACTIVE_DATABASEW;
|
||||||
|
|
||||||
Ptr = HeapAlloc(GetProcessHeap(),
|
Ptr = (MANAGER_HANDLE*) HeapAlloc(GetProcessHeap(),
|
||||||
HEAP_ZERO_MEMORY,
|
HEAP_ZERO_MEMORY,
|
||||||
sizeof(MANAGER_HANDLE) + wcslen(lpDatabaseName) * sizeof(WCHAR));
|
sizeof(MANAGER_HANDLE) + wcslen(lpDatabaseName) * sizeof(WCHAR));
|
||||||
if (Ptr == NULL)
|
if (Ptr == NULL)
|
||||||
|
@ -171,7 +171,7 @@ ScmCreateServiceHandle(PSERVICE lpServiceEntry,
|
||||||
{
|
{
|
||||||
PSERVICE_HANDLE Ptr;
|
PSERVICE_HANDLE Ptr;
|
||||||
|
|
||||||
Ptr = HeapAlloc(GetProcessHeap(),
|
Ptr = (SERVICE_HANDLE*) HeapAlloc(GetProcessHeap(),
|
||||||
HEAP_ZERO_MEMORY,
|
HEAP_ZERO_MEMORY,
|
||||||
sizeof(SERVICE_HANDLE));
|
sizeof(SERVICE_HANDLE));
|
||||||
if (Ptr == NULL)
|
if (Ptr == NULL)
|
||||||
|
@ -1033,7 +1033,7 @@ ScmrCreateServiceW(handle_t BindingHandle,
|
||||||
* first part of full file name is the OS directory */
|
* first part of full file name is the OS directory */
|
||||||
if (lpBinaryPathName[1] == ':') lpBinaryPathName += GetWindowsDirectoryW(NULL, 0);
|
if (lpBinaryPathName[1] == ':') lpBinaryPathName += GetWindowsDirectoryW(NULL, 0);
|
||||||
|
|
||||||
lpImagePath = HeapAlloc(GetProcessHeap(),
|
lpImagePath = (WCHAR*) HeapAlloc(GetProcessHeap(),
|
||||||
HEAP_ZERO_MEMORY,
|
HEAP_ZERO_MEMORY,
|
||||||
(wcslen(lpBinaryPathName) + 1) * sizeof(WCHAR));
|
(wcslen(lpBinaryPathName) + 1) * sizeof(WCHAR));
|
||||||
if (lpImagePath == NULL)
|
if (lpImagePath == NULL)
|
||||||
|
@ -1060,7 +1060,7 @@ ScmrCreateServiceW(handle_t BindingHandle,
|
||||||
*lpDisplayName != 0 &&
|
*lpDisplayName != 0 &&
|
||||||
wcsicmp(lpService->lpDisplayName, lpDisplayName) != 0)
|
wcsicmp(lpService->lpDisplayName, lpDisplayName) != 0)
|
||||||
{
|
{
|
||||||
lpService->lpDisplayName = HeapAlloc(GetProcessHeap(), 0,
|
lpService->lpDisplayName = (WCHAR*) HeapAlloc(GetProcessHeap(), 0,
|
||||||
(wcslen(lpDisplayName) + 1) * sizeof(WCHAR));
|
(wcslen(lpDisplayName) + 1) * sizeof(WCHAR));
|
||||||
if (lpService->lpDisplayName == NULL)
|
if (lpService->lpDisplayName == NULL)
|
||||||
{
|
{
|
||||||
|
|
|
@ -51,7 +51,7 @@ ReadRegSzKey(
|
||||||
return rc;
|
return rc;
|
||||||
if (dwType != REG_SZ)
|
if (dwType != REG_SZ)
|
||||||
return ERROR_FILE_NOT_FOUND;
|
return ERROR_FILE_NOT_FOUND;
|
||||||
Value = HeapAlloc(GetProcessHeap(), 0, cbData + sizeof(WCHAR));
|
Value = (WCHAR*) HeapAlloc(GetProcessHeap(), 0, cbData + sizeof(WCHAR));
|
||||||
if (!Value)
|
if (!Value)
|
||||||
return ERROR_NOT_ENOUGH_MEMORY;
|
return ERROR_NOT_ENOUGH_MEMORY;
|
||||||
rc = RegQueryValueExW(hKey, pszKey, NULL, NULL, (LPBYTE)Value, &cbData);
|
rc = RegQueryValueExW(hKey, pszKey, NULL, NULL, (LPBYTE)Value, &cbData);
|
||||||
|
|
Loading…
Reference in a new issue