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