Fixed a number of pointer to integer conversions that wouldn't work

right on a 64-bit platform.
This commit is contained in:
Alexandre Julliard 2005-09-12 15:14:06 +00:00
parent b597f99960
commit 261e376495
30 changed files with 117 additions and 121 deletions

View File

@ -100,7 +100,7 @@ inline static int is_version_nt(void)
static HKEY create_special_root_hkey( HANDLE hkey, DWORD access )
{
HKEY ret = 0;
int idx = (UINT)hkey - (UINT)HKEY_SPECIAL_ROOT_FIRST;
int idx = (UINT_PTR)hkey - (UINT_PTR)HKEY_SPECIAL_ROOT_FIRST;
if (hkey == HKEY_CURRENT_USER)
{
@ -135,7 +135,7 @@ inline static HKEY get_special_root_hkey( HKEY hkey )
if ((hkey >= HKEY_SPECIAL_ROOT_FIRST) && (hkey <= HKEY_SPECIAL_ROOT_LAST))
{
if (!(ret = special_root_keys[(UINT)hkey - (UINT)HKEY_SPECIAL_ROOT_FIRST]))
if (!(ret = special_root_keys[(UINT_PTR)hkey - (UINT_PTR)HKEY_SPECIAL_ROOT_FIRST]))
ret = create_special_root_hkey( hkey, KEY_ALL_ACCESS );
}
return ret;

View File

@ -341,7 +341,7 @@ static HRESULT WINAPI IGetFrame_fnSetFormat(IGetFrame *iface,
if (This->pStream == NULL)
return AVIERR_ERROR;
if ((LONG)lpbiWanted == AVIGETFRAMEF_BESTDISPLAYFMT) {
if (lpbiWanted == (LPBITMAPINFOHEADER)AVIGETFRAMEF_BESTDISPLAYFMT) {
lpbi = NULL;
bBestDisplay = TRUE;
}

View File

@ -174,10 +174,8 @@ BOOL coff_process_info(const struct msc_debug_info* msc_dbg)
coff = (const IMAGE_COFF_SYMBOLS_HEADER*)msc_dbg->root;
coff_symbols = (const IMAGE_SYMBOL*)((unsigned int)coff +
coff->LvaToFirstSymbol);
coff_linetab = (const IMAGE_LINENUMBER*)((unsigned int)coff +
coff->LvaToFirstLinenumber);
coff_symbols = (const IMAGE_SYMBOL*)((const char *)coff + coff->LvaToFirstSymbol);
coff_linetab = (const IMAGE_LINENUMBER*)((const char *)coff + coff->LvaToFirstLinenumber);
coff_strtab = (const char*)(coff_symbols + coff->NumberOfSymbols);
linetab_indx = 0;

View File

@ -308,7 +308,7 @@ DirectSoundCaptureEnumerateA(
if (GetDeviceID(&DSDEVID_DefaultCapture, &guid) == DS_OK) {
for (wid = 0; wid < devs; ++wid) {
if (IsEqualGUID( &guid, &DSOUND_capture_guids[wid] ) ) {
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD)&desc,0));
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0));
if (err == DS_OK) {
TRACE("calling lpDSEnumCallback(NULL,\"%s\",\"%s\",%p)\n",
"Primary Sound Capture Driver",desc.szDrvname,lpContext);
@ -321,7 +321,7 @@ DirectSoundCaptureEnumerateA(
}
for (wid = 0; wid < devs; ++wid) {
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD)&desc,0));
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0));
if (err == DS_OK) {
TRACE("calling lpDSEnumCallback(%s,\"%s\",\"%s\",%p)\n",
debugstr_guid(&DSOUND_capture_guids[wid]),desc.szDesc,desc.szDrvname,lpContext);
@ -370,7 +370,7 @@ DirectSoundCaptureEnumerateW(
if (GetDeviceID(&DSDEVID_DefaultCapture, &guid) == DS_OK) {
for (wid = 0; wid < devs; ++wid) {
if (IsEqualGUID( &guid, &DSOUND_capture_guids[wid] ) ) {
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD)&desc,0));
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0));
if (err == DS_OK) {
TRACE("calling lpDSEnumCallback(NULL,\"%s\",\"%s\",%p)\n",
"Primary Sound Capture Driver",desc.szDrvname,lpContext);
@ -387,7 +387,7 @@ DirectSoundCaptureEnumerateW(
}
for (wid = 0; wid < devs; ++wid) {
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD)&desc,0));
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0));
if (err == DS_OK) {
TRACE("calling lpDSEnumCallback(%s,\"%s\",\"%s\",%p)\n",
debugstr_guid(&DSOUND_capture_guids[wid]),desc.szDesc,desc.szDrvname,lpContext);
@ -681,7 +681,7 @@ IDirectSoundCaptureImpl_Initialize(
This->device = device;
device->guid = devGUID;
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDIFACE,(DWORD)&(This->device->driver),0));
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDIFACE,(DWORD_PTR)&(This->device->driver),0));
if ( (err != DS_OK) && (err != DSERR_UNSUPPORTED) ) {
WARN("waveInMessage failed; err=%lx\n",err);
return err;
@ -896,7 +896,7 @@ DSOUND_CreateDirectSoundCaptureBuffer(
flags |= WAVE_DIRECTSOUND;
err = mmErr(waveInOpen(&(ipDSC->device->hwi),
ipDSC->device->drvdesc.dnDevNode, ipDSC->device->pwfx,
(DWORD)DSOUND_capture_callback, (DWORD)ipDSC->device, flags));
(DWORD_PTR)DSOUND_capture_callback, (DWORD)ipDSC->device, flags));
if (err != DS_OK) {
WARN("waveInOpen failed\n");
This->dsound->device->capture_buffer = 0;

View File

@ -468,7 +468,7 @@ static HRESULT WINAPI IDirectSoundImpl_DuplicateSoundBuffer(
}
/* FIXME: hack to make sure we have a secondary buffer */
if ((DWORD)((SecondaryBufferImpl *)psb)->dsb == (DWORD)This) {
if ((IDirectSoundImpl *)((SecondaryBufferImpl *)psb)->dsb == This) {
WARN("trying to duplicate primary buffer\n");
*ppdsb = NULL;
return DSERR_INVALIDCALL;
@ -711,7 +711,7 @@ static HRESULT WINAPI IDirectSoundImpl_Initialize(
device->guid = devGUID;
/* DRV_QUERYDSOUNDIFACE is a "Wine extension" to get the DSound interface */
waveOutMessage((HWAVEOUT)wod, DRV_QUERYDSOUNDIFACE, (DWORD)&device->driver, 0);
waveOutMessage((HWAVEOUT)wod, DRV_QUERYDSOUNDIFACE, (DWORD_PTR)&device->driver, 0);
/* Disable the direct sound driver to force emulation if requested. */
if (ds_hw_accel == DS_HW_ACCEL_EMULATION)
@ -744,7 +744,7 @@ static HRESULT WINAPI IDirectSoundImpl_Initialize(
hr = mmErr(waveOutOpen(&(device->hwo),
device->drvdesc.dnDevNode, device->pwfx,
(DWORD)DSOUND_callback, (DWORD)device,
(DWORD_PTR)DSOUND_callback, (DWORD)device,
flags));
if (hr != DS_OK) {
WARN("waveOutOpen failed\n");
@ -817,7 +817,7 @@ static HRESULT WINAPI IDirectSoundImpl_Initialize(
DSOUND_renderer[device->drvdesc.dnDevNode] = device;
timeBeginPeriod(DS_TIME_RES);
DSOUND_renderer[device->drvdesc.dnDevNode]->timerID = timeSetEvent(DS_TIME_DEL, DS_TIME_RES, DSOUND_timer,
(DWORD)DSOUND_renderer[device->drvdesc.dnDevNode], TIME_PERIODIC | TIME_CALLBACK_FUNCTION);
(DWORD_PTR)DSOUND_renderer[device->drvdesc.dnDevNode], TIME_PERIODIC | TIME_CALLBACK_FUNCTION);
} else {
WARN("DSOUND_PrimaryCreate failed\n");
}

View File

@ -316,7 +316,7 @@ HRESULT WINAPI DirectSoundEnumerateA(
if (GetDeviceID(&DSDEVID_DefaultPlayback, &guid) == DS_OK) {
for (wod = 0; wod < devs; ++wod) {
if (IsEqualGUID( &guid, &DSOUND_renderer_guids[wod]) ) {
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD)&desc,0));
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0));
if (err == DS_OK) {
TRACE("calling lpDSEnumCallback(NULL,\"%s\",\"%s\",%p)\n",
"Primary Sound Driver",desc.szDrvname,lpContext);
@ -329,7 +329,7 @@ HRESULT WINAPI DirectSoundEnumerateA(
}
for (wod = 0; wod < devs; ++wod) {
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD)&desc,0));
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0));
if (err == DS_OK) {
TRACE("calling lpDSEnumCallback(%s,\"%s\",\"%s\",%p)\n",
debugstr_guid(&DSOUND_renderer_guids[wod]),desc.szDesc,desc.szDrvname,lpContext);
@ -377,7 +377,7 @@ HRESULT WINAPI DirectSoundEnumerateW(
if (GetDeviceID(&DSDEVID_DefaultPlayback, &guid) == DS_OK) {
for (wod = 0; wod < devs; ++wod) {
if (IsEqualGUID( &guid, &DSOUND_renderer_guids[wod] ) ) {
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD)&desc,0));
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0));
if (err == DS_OK) {
TRACE("calling lpDSEnumCallback(NULL,\"%s\",\"%s\",%p)\n",
"Primary Sound Driver",desc.szDrvname,lpContext);
@ -394,7 +394,7 @@ HRESULT WINAPI DirectSoundEnumerateW(
}
for (wod = 0; wod < devs; ++wod) {
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD)&desc,0));
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0));
if (err == DS_OK) {
TRACE("calling lpDSEnumCallback(%s,\"%s\",\"%s\",%p)\n",
debugstr_guid(&DSOUND_renderer_guids[wod]),desc.szDesc,desc.szDrvname,lpContext);

View File

@ -264,7 +264,7 @@ HRESULT DSOUND_PrimaryStop(DirectSoundDevice *device)
waveOutClose(device->hwo);
device->hwo = 0;
err = mmErr(waveOutOpen(&(device->hwo), device->drvdesc.dnDevNode,
device->pwfx, (DWORD)DSOUND_callback, (DWORD)device,
device->pwfx, (DWORD_PTR)DSOUND_callback, (DWORD)device,
flags));
if (err == DS_OK) {
err = IDsDriver_CreateSoundBuffer(device->driver,device->pwfx,
@ -372,7 +372,7 @@ static HRESULT WINAPI PrimaryBufferImpl_SetFormat(
waveOutClose(device->hwo);
device->hwo = 0;
err = mmErr(waveOutOpen(&(device->hwo), device->drvdesc.dnDevNode,
device->pwfx, (DWORD)DSOUND_callback, (DWORD)device,
device->pwfx, (DWORD_PTR)DSOUND_callback, (DWORD)device,
flags));
if (err == DS_OK) {
err = DSOUND_PrimaryOpen(device);

View File

@ -443,14 +443,14 @@ static HRESULT WINAPI DSPROPERTY_Description1(
DSDRIVERDESC desc;
ppd->WaveDeviceId = wod;
ppd->Devnode = wod;
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD)&(desc),0));
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&(desc),0));
if (err == DS_OK) {
PIDSDRIVER drv = NULL;
lstrcpynA(ppd->DescriptionA, desc.szDesc, sizeof(ppd->DescriptionA));
lstrcpynA(ppd->ModuleA, desc.szDrvname, sizeof(ppd->ModuleA));
MultiByteToWideChar( CP_ACP, 0, desc.szDesc, -1, ppd->DescriptionW, sizeof(ppd->DescriptionW)/sizeof(WCHAR) );
MultiByteToWideChar( CP_ACP, 0, desc.szDrvname, -1, ppd->ModuleW, sizeof(ppd->ModuleW)/sizeof(WCHAR) );
err = mmErr(waveOutMessage((HWAVEOUT)wod, DRV_QUERYDSOUNDIFACE, (DWORD)&drv, 0));
err = mmErr(waveOutMessage((HWAVEOUT)wod, DRV_QUERYDSOUNDIFACE, (DWORD_PTR)&drv, 0));
if (err == DS_OK && drv)
ppd->Type = DIRECTSOUNDDEVICE_TYPE_VXD;
else
@ -474,14 +474,14 @@ static HRESULT WINAPI DSPROPERTY_Description1(
DSDRIVERDESC desc;
ppd->WaveDeviceId = wid;
ppd->Devnode = wid;
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD)&(desc),0));
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&(desc),0));
if (err == DS_OK) {
PIDSCDRIVER drv;
lstrcpynA(ppd->DescriptionA, desc.szDesc, sizeof(ppd->DescriptionA));
lstrcpynA(ppd->ModuleA, desc.szDrvname, sizeof(ppd->ModuleA));
MultiByteToWideChar( CP_ACP, 0, desc.szDesc, -1, ppd->DescriptionW, sizeof(ppd->DescriptionW)/sizeof(WCHAR) );
MultiByteToWideChar( CP_ACP, 0, desc.szDrvname, -1, ppd->ModuleW, sizeof(ppd->ModuleW)/sizeof(WCHAR) );
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDIFACE,(DWORD)&drv,0));
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDIFACE,(DWORD_PTR)&drv,0));
if (err == DS_OK && drv)
ppd->Type = DIRECTSOUNDDEVICE_TYPE_VXD;
else
@ -506,14 +506,14 @@ static HRESULT WINAPI DSPROPERTY_Description1(
ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_RENDER;
ppd->WaveDeviceId = wod;
ppd->Devnode = wod;
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD)&(desc),0));
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&(desc),0));
if (err == DS_OK) {
PIDSDRIVER drv = NULL;
lstrcpynA(ppd->DescriptionA, desc.szDesc, sizeof(ppd->DescriptionA));
lstrcpynA(ppd->ModuleA, desc.szDrvname, sizeof(ppd->ModuleA));
MultiByteToWideChar( CP_ACP, 0, desc.szDesc, -1, ppd->DescriptionW, sizeof(ppd->DescriptionW)/sizeof(WCHAR) );
MultiByteToWideChar( CP_ACP, 0, desc.szDrvname, -1, ppd->ModuleW, sizeof(ppd->ModuleW)/sizeof(WCHAR) );
err = mmErr(waveOutMessage((HWAVEOUT)wod, DRV_QUERYDSOUNDIFACE, (DWORD)&drv, 0));
err = mmErr(waveOutMessage((HWAVEOUT)wod, DRV_QUERYDSOUNDIFACE, (DWORD_PTR)&drv, 0));
if (err == DS_OK && drv)
ppd->Type = DIRECTSOUNDDEVICE_TYPE_VXD;
else
@ -539,14 +539,14 @@ static HRESULT WINAPI DSPROPERTY_Description1(
ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE;
ppd->WaveDeviceId = wid;
ppd->Devnode = wid;
err = mmErr(waveInMessage((HWAVEIN)wod,DRV_QUERYDSOUNDDESC,(DWORD)&(desc),0));
err = mmErr(waveInMessage((HWAVEIN)wod,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&(desc),0));
if (err == DS_OK) {
PIDSDRIVER drv = NULL;
lstrcpynA(ppd->DescriptionA, desc.szDesc, sizeof(ppd->DescriptionA));
lstrcpynA(ppd->ModuleA, desc.szDrvname, sizeof(ppd->ModuleA));
MultiByteToWideChar( CP_ACP, 0, desc.szDesc, -1, ppd->DescriptionW, sizeof(ppd->DescriptionW)/sizeof(WCHAR) );
MultiByteToWideChar( CP_ACP, 0, desc.szDrvname, -1, ppd->ModuleW, sizeof(ppd->ModuleW)/sizeof(WCHAR) );
err = mmErr(waveInMessage((HWAVEIN)wod, DRV_QUERYDSOUNDIFACE, (DWORD)&drv, 0));
err = mmErr(waveInMessage((HWAVEIN)wod, DRV_QUERYDSOUNDIFACE, (DWORD_PTR)&drv, 0));
if (err == DS_OK && drv)
ppd->Type = DIRECTSOUNDDEVICE_TYPE_VXD;
else
@ -619,7 +619,7 @@ static HRESULT WINAPI DSPROPERTY_DescriptionA(
if (IsEqualGUID( &dev_guid, &DSOUND_renderer_guids[wod] ) ) {
DSDRIVERDESC desc;
ppd->WaveDeviceId = wod;
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD)&(desc),0));
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&(desc),0));
if (err == DS_OK) {
PIDSDRIVER drv = NULL;
/* FIXME: this is a memory leak */
@ -635,7 +635,7 @@ static HRESULT WINAPI DSPROPERTY_DescriptionA(
ppd->Description = szDescription;
ppd->Module = szModule;
ppd->Interface = szInterface;
err = mmErr(waveOutMessage((HWAVEOUT)wod, DRV_QUERYDSOUNDIFACE, (DWORD)&drv, 0));
err = mmErr(waveOutMessage((HWAVEOUT)wod, DRV_QUERYDSOUNDIFACE, (DWORD_PTR)&drv, 0));
if (err == DS_OK && drv)
ppd->Type = DIRECTSOUNDDEVICE_TYPE_VXD;
else
@ -668,7 +668,7 @@ static HRESULT WINAPI DSPROPERTY_DescriptionA(
if (IsEqualGUID( &dev_guid, &DSOUND_capture_guids[wid] ) ) {
DSDRIVERDESC desc;
ppd->WaveDeviceId = wid;
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD)&(desc),0));
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&(desc),0));
if (err == DS_OK) {
PIDSCDRIVER drv;
/* FIXME: this is a memory leak */
@ -684,7 +684,7 @@ static HRESULT WINAPI DSPROPERTY_DescriptionA(
ppd->Description = szDescription;
ppd->Module = szModule;
ppd->Interface = szInterface;
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDIFACE,(DWORD)&drv,0));
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDIFACE,(DWORD_PTR)&drv,0));
if (err == DS_OK && drv)
ppd->Type = DIRECTSOUNDDEVICE_TYPE_VXD;
else
@ -716,7 +716,7 @@ static HRESULT WINAPI DSPROPERTY_DescriptionA(
TRACE("DSOUND_renderer_guids[%ld]\n", wod);
ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_RENDER;
ppd->WaveDeviceId = wod;
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD)&(desc),0));
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&(desc),0));
if (err == DS_OK) {
PIDSDRIVER drv = NULL;
/* FIXME: this is a memory leak */
@ -732,7 +732,7 @@ static HRESULT WINAPI DSPROPERTY_DescriptionA(
ppd->Description = szDescription;
ppd->Module = szModule;
ppd->Interface = szInterface;
err = mmErr(waveOutMessage((HWAVEOUT)wod, DRV_QUERYDSOUNDIFACE, (DWORD)&drv, 0));
err = mmErr(waveOutMessage((HWAVEOUT)wod, DRV_QUERYDSOUNDIFACE, (DWORD_PTR)&drv, 0));
if (err == DS_OK && drv)
ppd->Type = DIRECTSOUNDDEVICE_TYPE_VXD;
else
@ -764,7 +764,7 @@ static HRESULT WINAPI DSPROPERTY_DescriptionA(
DSDRIVERDESC desc;
TRACE("DSOUND_capture_guids[%ld]\n", wid);
ppd->WaveDeviceId = wid;
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD)&(desc),0));
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&(desc),0));
if (err == DS_OK) {
PIDSCDRIVER drv;
/* FIXME: this is a memory leak */
@ -780,7 +780,7 @@ static HRESULT WINAPI DSPROPERTY_DescriptionA(
ppd->Description = szDescription;
ppd->Module = szModule;
ppd->Interface = szInterface;
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDIFACE,(DWORD)&drv,0));
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDIFACE,(DWORD_PTR)&drv,0));
if (err == DS_OK && drv)
ppd->Type = DIRECTSOUNDDEVICE_TYPE_VXD;
else
@ -861,7 +861,7 @@ static HRESULT WINAPI DSPROPERTY_DescriptionW(
DSDRIVERDESC desc;
TRACE("DSOUND_renderer_guids[%ld]\n", wod);
ppd->WaveDeviceId = wod;
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD)&(desc),0));
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&(desc),0));
if (err == DS_OK) {
PIDSDRIVER drv = NULL;
/* FIXME: this is a memory leak */
@ -877,7 +877,7 @@ static HRESULT WINAPI DSPROPERTY_DescriptionW(
ppd->Description = wDescription;
ppd->Module = wModule;
ppd->Interface = wInterface;
err = mmErr(waveOutMessage((HWAVEOUT)wod, DRV_QUERYDSOUNDIFACE, (DWORD)&drv, 0));
err = mmErr(waveOutMessage((HWAVEOUT)wod, DRV_QUERYDSOUNDIFACE, (DWORD_PTR)&drv, 0));
if (err == DS_OK && drv)
ppd->Type = DIRECTSOUNDDEVICE_TYPE_VXD;
else
@ -910,7 +910,7 @@ static HRESULT WINAPI DSPROPERTY_DescriptionW(
if (IsEqualGUID( &dev_guid, &DSOUND_capture_guids[wid] ) ) {
DSDRIVERDESC desc;
ppd->WaveDeviceId = wid;
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD)&(desc),0));
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&(desc),0));
if (err == DS_OK) {
PIDSCDRIVER drv;
/* FIXME: this is a memory leak */
@ -926,7 +926,7 @@ static HRESULT WINAPI DSPROPERTY_DescriptionW(
ppd->Description = wDescription;
ppd->Module = wModule;
ppd->Interface = wInterface;
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDIFACE,(DWORD)&drv,0));
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDIFACE,(DWORD_PTR)&drv,0));
if (err == DS_OK && drv)
ppd->Type = DIRECTSOUNDDEVICE_TYPE_VXD;
else
@ -958,7 +958,7 @@ static HRESULT WINAPI DSPROPERTY_DescriptionW(
TRACE("DSOUND_renderer_guids[%ld]\n", wod);
ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_RENDER;
ppd->WaveDeviceId = wod;
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD)&(desc),0));
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&(desc),0));
if (err == DS_OK) {
PIDSDRIVER drv = NULL;
/* FIXME: this is a memory leak */
@ -974,7 +974,7 @@ static HRESULT WINAPI DSPROPERTY_DescriptionW(
ppd->Description = wDescription;
ppd->Module = wModule;
ppd->Interface = wInterface;
err = mmErr(waveOutMessage((HWAVEOUT)wod, DRV_QUERYDSOUNDIFACE, (DWORD)&drv, 0));
err = mmErr(waveOutMessage((HWAVEOUT)wod, DRV_QUERYDSOUNDIFACE, (DWORD_PTR)&drv, 0));
if (err == DS_OK && drv)
ppd->Type = DIRECTSOUNDDEVICE_TYPE_VXD;
else
@ -1006,7 +1006,7 @@ static HRESULT WINAPI DSPROPERTY_DescriptionW(
DSDRIVERDESC desc;
TRACE("DSOUND_capture_guids[%ld]\n", wid);
ppd->WaveDeviceId = wid;
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD)&(desc),0));
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&(desc),0));
if (err == DS_OK) {
PIDSCDRIVER drv;
/* FIXME: this is a memory leak */
@ -1022,7 +1022,7 @@ static HRESULT WINAPI DSPROPERTY_DescriptionW(
ppd->Description = wDescription;
ppd->Module = wModule;
ppd->Interface = wInterface;
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDIFACE,(DWORD)&drv,0));
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDIFACE,(DWORD_PTR)&drv,0));
if (err == DS_OK && drv)
ppd->Type = DIRECTSOUNDDEVICE_TYPE_VXD;
else
@ -1078,7 +1078,7 @@ static HRESULT WINAPI DSPROPERTY_Enumerate1(
devs = waveOutGetNumDevs();
for (wod = 0; wod < devs; ++wod) {
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD)&desc,0));
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0));
if (err == DS_OK) {
PIDSCDRIVER drv;
ZeroMemory(&data, sizeof(data));
@ -1092,7 +1092,7 @@ static HRESULT WINAPI DSPROPERTY_Enumerate1(
MultiByteToWideChar( CP_ACP, 0, data.ModuleA, -1, data.ModuleW, sizeof(data.ModuleW) );
data.Type = DIRECTSOUNDDEVICE_TYPE_EMULATED;
err = mmErr(waveOutMessage((HWAVEOUT)wod, DRV_QUERYDSOUNDIFACE, (DWORD)&drv, 0));
err = mmErr(waveOutMessage((HWAVEOUT)wod, DRV_QUERYDSOUNDIFACE, (DWORD_PTR)&drv, 0));
if (err == DS_OK && drv)
data.Type = DIRECTSOUNDDEVICE_TYPE_VXD;
else
@ -1105,7 +1105,7 @@ static HRESULT WINAPI DSPROPERTY_Enumerate1(
devs = waveInGetNumDevs();
for (wid = 0; wid < devs; ++wid) {
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD)&desc,0));
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0));
if (err == DS_OK) {
PIDSCDRIVER drv;
ZeroMemory(&data, sizeof(data));
@ -1119,7 +1119,7 @@ static HRESULT WINAPI DSPROPERTY_Enumerate1(
MultiByteToWideChar( CP_ACP, 0, data.ModuleA, -1, data.ModuleW, sizeof(data.ModuleW) );
data.Type = DIRECTSOUNDDEVICE_TYPE_EMULATED;
err = mmErr(waveInMessage((HWAVEIN)wid, DRV_QUERYDSOUNDIFACE, (DWORD)&drv, 0));
err = mmErr(waveInMessage((HWAVEIN)wid, DRV_QUERYDSOUNDIFACE, (DWORD_PTR)&drv, 0));
if (err == DS_OK && drv)
data.Type = DIRECTSOUNDDEVICE_TYPE_VXD;
else
@ -1165,7 +1165,7 @@ static HRESULT WINAPI DSPROPERTY_EnumerateA(
devs = waveOutGetNumDevs();
for (wod = 0; wod < devs; ++wod) {
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD)&desc,0));
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0));
if (err == DS_OK) {
DWORD size;
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDEVICEINTERFACESIZE,(DWORD_PTR)&size,0));
@ -1187,7 +1187,7 @@ static HRESULT WINAPI DSPROPERTY_EnumerateA(
data.Interface = szInterface;
data.Type = DIRECTSOUNDDEVICE_TYPE_EMULATED;
err = mmErr(waveOutMessage((HWAVEOUT)wod, DRV_QUERYDSOUNDIFACE, (DWORD)&drv, 0));
err = mmErr(waveOutMessage((HWAVEOUT)wod, DRV_QUERYDSOUNDIFACE, (DWORD_PTR)&drv, 0));
if (err == DS_OK && drv)
data.Type = DIRECTSOUNDDEVICE_TYPE_VXD;
else
@ -1206,7 +1206,7 @@ static HRESULT WINAPI DSPROPERTY_EnumerateA(
devs = waveInGetNumDevs();
for (wid = 0; wid < devs; ++wid) {
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD)&desc,0));
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0));
if (err == DS_OK) {
DWORD size;
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDEVICEINTERFACESIZE,(DWORD_PTR)&size,0));
@ -1228,7 +1228,7 @@ static HRESULT WINAPI DSPROPERTY_EnumerateA(
data.Interface = szInterface;
data.Type = DIRECTSOUNDDEVICE_TYPE_EMULATED;
err = mmErr(waveInMessage((HWAVEIN)wid, DRV_QUERYDSOUNDIFACE, (DWORD)&drv, 0));
err = mmErr(waveInMessage((HWAVEIN)wid, DRV_QUERYDSOUNDIFACE, (DWORD_PTR)&drv, 0));
if (err == DS_OK && drv)
data.Type = DIRECTSOUNDDEVICE_TYPE_VXD;
else
@ -1280,7 +1280,7 @@ static HRESULT WINAPI DSPROPERTY_EnumerateW(
devs = waveOutGetNumDevs();
for (wod = 0; wod < devs; ++wod) {
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD)&desc,0));
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0));
if (err == DS_OK) {
WCHAR * wDescription = HeapAlloc(GetProcessHeap(),0,0x200);
WCHAR * wModule = HeapAlloc(GetProcessHeap(),0,0x200);
@ -1306,7 +1306,7 @@ static HRESULT WINAPI DSPROPERTY_EnumerateW(
data.Interface = wInterface;
data.Type = DIRECTSOUNDDEVICE_TYPE_EMULATED;
err = mmErr(waveOutMessage((HWAVEOUT)wod, DRV_QUERYDSOUNDIFACE, (DWORD)&drv, 0));
err = mmErr(waveOutMessage((HWAVEOUT)wod, DRV_QUERYDSOUNDIFACE, (DWORD_PTR)&drv, 0));
if (err == DS_OK && drv)
data.Type = DIRECTSOUNDDEVICE_TYPE_VXD;
else
@ -1326,7 +1326,7 @@ static HRESULT WINAPI DSPROPERTY_EnumerateW(
devs = waveInGetNumDevs();
for (wid = 0; wid < devs; ++wid) {
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD)&desc,0));
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&desc,0));
if (err == DS_OK) {
WCHAR * wDescription = HeapAlloc(GetProcessHeap(),0,0x200);
WCHAR * wModule = HeapAlloc(GetProcessHeap(),0,0x200);
@ -1351,7 +1351,7 @@ static HRESULT WINAPI DSPROPERTY_EnumerateW(
data.Module = wModule;
data.Interface = wInterface;
data.Type = DIRECTSOUNDDEVICE_TYPE_EMULATED;
err = mmErr(waveInMessage((HWAVEIN)wid, DRV_QUERYDSOUNDIFACE, (DWORD)&drv, 0));
err = mmErr(waveInMessage((HWAVEIN)wid, DRV_QUERYDSOUNDIFACE, (DWORD_PTR)&drv, 0));
if (err == DS_OK && drv)
data.Type = DIRECTSOUNDDEVICE_TYPE_VXD;
else

View File

@ -224,7 +224,7 @@ UINT DOSMEM_MapLinearToDos(LPVOID ptr)
{
if (((char*)ptr >= DOSMEM_dosmem) &&
((char*)ptr < DOSMEM_dosmem + DOSMEM_SIZE))
return (UINT)ptr - (UINT)DOSMEM_dosmem;
return (char *)ptr - DOSMEM_dosmem;
return (UINT)ptr;
}
@ -236,7 +236,7 @@ UINT DOSMEM_MapLinearToDos(LPVOID ptr)
*/
LPVOID DOSMEM_MapDosToLinear(UINT ptr)
{
if (ptr < DOSMEM_SIZE) return (LPVOID)(ptr + (UINT)DOSMEM_dosmem);
if (ptr < DOSMEM_SIZE) return DOSMEM_dosmem + ptr;
return (LPVOID)ptr;
}

View File

@ -47,19 +47,19 @@ HANDLE WINAPI GetConsoleInputWaitHandle(void);
static inline BOOL is_console_handle(HANDLE h)
{
return h != INVALID_HANDLE_VALUE && ((DWORD)h & 3) == 3;
return h != INVALID_HANDLE_VALUE && ((UINT_PTR)h & 3) == 3;
}
/* map a real wineserver handle onto a kernel32 console handle */
static inline HANDLE console_handle_map(HANDLE h)
{
return h != INVALID_HANDLE_VALUE ? (HANDLE)((DWORD)h ^ 3) : INVALID_HANDLE_VALUE;
return h != INVALID_HANDLE_VALUE ? (HANDLE)((UINT_PTR)h ^ 3) : INVALID_HANDLE_VALUE;
}
/* map a kernel32 console handle onto a real wineserver handle */
static inline HANDLE console_handle_unmap(HANDLE h)
{
return h != INVALID_HANDLE_VALUE ? (HANDLE)((DWORD)h ^ 3) : INVALID_HANDLE_VALUE;
return h != INVALID_HANDLE_VALUE ? (HANDLE)((UINT_PTR)h ^ 3) : INVALID_HANDLE_VALUE;
}
extern HMODULE kernel32_handle;

View File

@ -271,7 +271,7 @@ static INT_PTR CALLBACK FormatChooseDlgProc(HWND hWnd, UINT msg,
MMRESULT WINAPI acmFormatChooseA(PACMFORMATCHOOSEA pafmtc)
{
return DialogBoxParamA(MSACM_hInstance32, MAKEINTRESOURCEA(DLG_ACMFORMATCHOOSE_ID),
pafmtc->hwndOwner, FormatChooseDlgProc, (INT)pafmtc);
pafmtc->hwndOwner, FormatChooseDlgProc, (LPARAM)pafmtc);
}
/***********************************************************************

View File

@ -64,7 +64,7 @@ MMRESULT WINAPI acmStreamClose(HACMSTREAM has, DWORD fdwClose)
WARN("invalid handle\n");
return MMSYSERR_INVALHANDLE;
}
ret = SendDriverMessage(was->pDrv->hDrvr, ACMDM_STREAM_CLOSE, (DWORD)&was->drvInst, 0);
ret = SendDriverMessage(was->pDrv->hDrvr, ACMDM_STREAM_CLOSE, (LPARAM)&was->drvInst, 0);
if (ret == MMSYSERR_NOERROR) {
if (was->hAcmDriver)
acmDriverClose(was->hAcmDriver, 0L);
@ -116,7 +116,7 @@ MMRESULT WINAPI acmStreamConvert(HACMSTREAM has, PACMSTREAMHEADER pash,
padsh->fdwConvert = fdwConvert;
ret = SendDriverMessage(was->pDrv->hDrvr, ACMDM_STREAM_CONVERT, (DWORD)&was->drvInst, (DWORD)padsh);
ret = SendDriverMessage(was->pDrv->hDrvr, ACMDM_STREAM_CONVERT, (LPARAM)&was->drvInst, (LPARAM)padsh);
if (ret == MMSYSERR_NOERROR) {
padsh->fdwStatus |= ACMSTREAMHEADER_STATUSF_DONE;
}
@ -228,7 +228,7 @@ MMRESULT WINAPI acmStreamOpen(PHACMSTREAM phas, HACMDRIVER had, PWAVEFORMATEX pw
was->pDrv = wad;
was->hAcmDriver = 0; /* not to close it in acmStreamClose */
ret = SendDriverMessage(wad->hDrvr, ACMDM_STREAM_OPEN, (DWORD)&was->drvInst, 0L);
ret = SendDriverMessage(wad->hDrvr, ACMDM_STREAM_OPEN, (LPARAM)&was->drvInst, 0L);
if (ret != MMSYSERR_NOERROR)
goto errCleanUp;
} else {
@ -249,7 +249,7 @@ MMRESULT WINAPI acmStreamOpen(PHACMSTREAM phas, HACMDRIVER had, PWAVEFORMATEX pw
was->pDrv = wad;
was->hAcmDriver = had;
ret = SendDriverMessage(wad->hDrvr, ACMDM_STREAM_OPEN, (DWORD)&was->drvInst, 0L);
ret = SendDriverMessage(wad->hDrvr, ACMDM_STREAM_OPEN, (LPARAM)&was->drvInst, 0L);
TRACE("%s => %08x\n", debugstr_w(wadi->pszDriverAlias), ret);
if (ret == MMSYSERR_NOERROR) {
if (fdwOpen & ACM_STREAMOPENF_QUERY) {
@ -326,7 +326,7 @@ MMRESULT WINAPI acmStreamPrepareHeader(HACMSTREAM has, PACMSTREAMHEADER pash,
padsh->pbPreparedDst = 0;
padsh->cbPreparedDstLength = 0;
ret = SendDriverMessage(was->pDrv->hDrvr, ACMDM_STREAM_PREPARE, (DWORD)&was->drvInst, (DWORD)padsh);
ret = SendDriverMessage(was->pDrv->hDrvr, ACMDM_STREAM_PREPARE, (LPARAM)&was->drvInst, (DWORD)padsh);
if (ret == MMSYSERR_NOERROR || ret == MMSYSERR_NOTSUPPORTED) {
ret = MMSYSERR_NOERROR;
padsh->fdwStatus &= ~(ACMSTREAMHEADER_STATUSF_DONE|ACMSTREAMHEADER_STATUSF_INQUEUE);
@ -366,7 +366,7 @@ MMRESULT WINAPI acmStreamReset(HACMSTREAM has, DWORD fdwReset)
WARN("invalid handle\n");
return MMSYSERR_INVALHANDLE;
} else if (was->drvInst.fdwOpen & ACM_STREAMOPENF_ASYNC) {
ret = SendDriverMessage(was->pDrv->hDrvr, ACMDM_STREAM_RESET, (DWORD)&was->drvInst, 0);
ret = SendDriverMessage(was->pDrv->hDrvr, ACMDM_STREAM_RESET, (LPARAM)&was->drvInst, 0);
}
TRACE("=> (%d)\n", ret);
return ret;
@ -412,7 +412,7 @@ MMRESULT WINAPI acmStreamSize(HACMSTREAM has, DWORD cbInput,
adss.cbStruct = sizeof(adss);
adss.fdwSize = fdwSize;
ret = SendDriverMessage(was->pDrv->hDrvr, ACMDM_STREAM_SIZE,
(DWORD)&was->drvInst, (DWORD)&adss);
(LPARAM)&was->drvInst, (LPARAM)&adss);
if (ret == MMSYSERR_NOERROR) {
switch (fdwSize & ACM_STREAMSIZEF_QUERYMASK) {
case ACM_STREAMSIZEF_DESTINATION:
@ -469,7 +469,7 @@ MMRESULT WINAPI acmStreamUnprepareHeader(HACMSTREAM has, PACMSTREAMHEADER pash,
padsh->fdwConvert = fdwUnprepare;
ret = SendDriverMessage(was->pDrv->hDrvr, ACMDM_STREAM_UNPREPARE, (DWORD)&was->drvInst, (DWORD)padsh);
ret = SendDriverMessage(was->pDrv->hDrvr, ACMDM_STREAM_UNPREPARE, (LPARAM)&was->drvInst, (LPARAM)padsh);
if (ret == MMSYSERR_NOERROR || ret == MMSYSERR_NOTSUPPORTED) {
ret = MMSYSERR_NOERROR;
padsh->fdwStatus &= ~(ACMSTREAMHEADER_STATUSF_DONE|ACMSTREAMHEADER_STATUSF_INQUEUE|ACMSTREAMHEADER_STATUSF_PREPARED);

View File

@ -381,11 +381,11 @@ DEFINE_REGS_ENTRYPOINT( __CxxFrameHandler, 16, 0 );
*/
void _CxxThrowException( exception *object, const cxx_exception_type *type )
{
DWORD args[3];
ULONG_PTR args[3];
args[0] = CXX_FRAME_MAGIC;
args[1] = (DWORD)object;
args[2] = (DWORD)type;
args[1] = (ULONG_PTR)object;
args[2] = (ULONG_PTR)type;
RaiseException( CXX_EXCEPTION, EH_NONCONTINUABLE, 3, args );
}

View File

@ -130,7 +130,7 @@ static int compare_info(LCID lcid, DWORD flags, char* buff, const char* cmp)
}
static BOOL CALLBACK
find_best_locale_proc(HMODULE hModule, LPCSTR type, LPCSTR name, WORD LangID, LONG lParam)
find_best_locale_proc(HMODULE hModule, LPCSTR type, LPCSTR name, WORD LangID, LONG_PTR lParam)
{
locale_search_t *res = (locale_search_t *)lParam;
const LCID lcid = MAKELCID(LangID, SORT_DEFAULT);
@ -203,7 +203,7 @@ static LCID MSVCRT_locale_to_LCID(locale_search_t* locale)
LCID lcid;
EnumResourceLanguagesA(GetModuleHandleA("KERNEL32"), (LPSTR)RT_STRING,
(LPCSTR)LOCALE_ILANGUAGE,find_best_locale_proc,
(LONG)locale);
(LONG_PTR)locale);
if (!locale->match_flags)
return 0;

View File

@ -711,7 +711,7 @@ static BOOLEAN match_filename( const UNICODE_STRING *name_str, const UNICODE_STR
*
* helper for NtQueryDirectoryFile
*/
static FILE_BOTH_DIR_INFORMATION *append_entry( void *info_ptr, ULONG *pos, ULONG max_length,
static FILE_BOTH_DIR_INFORMATION *append_entry( void *info_ptr, ULONG_PTR *pos, ULONG max_length,
const char *long_name, const char *short_name,
const UNICODE_STRING *mask )
{

View File

@ -367,7 +367,7 @@ void WINAPI __regs_RtlUnwind( EXCEPTION_REGISTRATION_RECORD* pEndFrame, PVOID un
}
if (((void*)frame < NtCurrentTeb()->Tib.StackLimit) ||
((void*)(frame+1) > NtCurrentTeb()->Tib.StackBase) ||
(int)frame & 3)
(UINT_PTR)frame & 3)
{
newrec.ExceptionCode = STATUS_BAD_STACK;
newrec.ExceptionFlags = EH_NONCONTINUABLE;

View File

@ -96,7 +96,7 @@ static NTSTATUS add_access_ace(PACL pAcl, DWORD dwAceRevision, DWORD dwAceFlags,
/* calculate generic size of the ACE */
dwLengthSid = RtlLengthSid(pSid);
dwAceSize = sizeof(ACE_HEADER) + sizeof(DWORD) + dwLengthSid;
if ((DWORD)(pAceHeader + dwAceSize) > (DWORD)(pAcl + pAcl->AclSize))
if ((char *)pAceHeader + dwAceSize > (char *)pAcl + pAcl->AclSize)
return STATUS_ALLOTTED_SPACE_EXCEEDED;
/* fill the new ACE */
@ -1084,11 +1084,11 @@ BOOLEAN WINAPI RtlFirstFreeAce(
*x = 0;
ace = (PACE_HEADER)(acl+1);
for (i=0;i<acl->AceCount;i++) {
if ((DWORD)ace>=(((DWORD)acl)+acl->AclSize))
if ((BYTE *)ace >= (BYTE *)acl + acl->AclSize)
return 0;
ace = (PACE_HEADER)(((BYTE*)ace)+ace->AceSize);
}
if ((DWORD)ace>=(((DWORD)acl)+acl->AclSize))
if ((BYTE *)ace >= (BYTE *)acl + acl->AclSize)
return 0;
*x = ace;
return 1;
@ -1112,11 +1112,11 @@ NTSTATUS WINAPI RtlAddAce(
if (!RtlFirstFreeAce(acl,&targetace))
return STATUS_INVALID_PARAMETER;
nrofaces=0;ace=acestart;
while (((DWORD)ace-(DWORD)acestart)<acelen) {
while (((BYTE *)ace - (BYTE *)acestart) < acelen) {
nrofaces++;
ace = (PACE_HEADER)(((BYTE*)ace)+ace->AceSize);
}
if ((DWORD)targetace+acelen>(DWORD)acl+acl->AclSize) /* too much aces */
if ((BYTE *)targetace + acelen > (BYTE *)acl + acl->AclSize) /* too much aces */
return STATUS_INVALID_PARAMETER;
memcpy((LPBYTE)targetace,acestart,acelen);
acl->AceCount+=nrofaces;

View File

@ -364,7 +364,7 @@ static NTSTATUS create_view( struct file_view **view_ret, void *base, size_t siz
struct file_view *view;
struct list *ptr;
assert( !((unsigned int)base & page_mask) );
assert( !((UINT_PTR)base & page_mask) );
assert( !(size & page_mask) );
/* Create the view structure */
@ -1029,7 +1029,7 @@ static NTSTATUS map_image( HANDLE hmapping, int fd, char *base, SIZE_T total_siz
* really make sure that the *new* base address is also > 2GB.
* Some DLLs really check the MSB of the module handle :-/
*/
if ((nt->OptionalHeader.ImageBase & 0x80000000) && !((DWORD)base & 0x80000000))
if ((nt->OptionalHeader.ImageBase & 0x80000000) && !((ULONG_PTR)base & 0x80000000))
ERR( "Forced to relocate system DLL (base > 2GB). This is not good.\n" );
if (!do_relocations( ptr, relocs, ptr - base, total_size ))

View File

@ -637,7 +637,7 @@ static BOOL internal_wglUseFontBitmaps(HDC hdc,
else
DPRINTF(" ");
}
bitmap_ += (4 - (((unsigned int) bitmap_) & 0x03));
bitmap_ += (4 - ((UINT_PTR)bitmap_ & 0x03));
DPRINTF("\n");
}
}

View File

@ -1091,7 +1091,7 @@ BOOL WINAPI SetupCommitFileQueueW( HWND owner, HSPFILEQ handle, PSP_FILE_CALLBAC
if (!queue->copy_queue.count && !queue->delete_queue.count && !queue->rename_queue.count)
return TRUE; /* nothing to do */
if (!handler( context, SPFILENOTIFY_STARTQUEUE, (UINT)owner, 0 )) return FALSE;
if (!handler( context, SPFILENOTIFY_STARTQUEUE, (UINT_PTR)owner, 0 )) return FALSE;
/* perform deletes */

View File

@ -73,7 +73,7 @@ static void CARET_DisplayCaret( HWND hwnd, const RECT *r )
/*****************************************************************
* CARET_Callback
*/
static void CALLBACK CARET_Callback( HWND hwnd, UINT msg, UINT id, DWORD ctime)
static void CALLBACK CARET_Callback( HWND hwnd, UINT msg, UINT_PTR id, DWORD ctime)
{
BOOL ret;
RECT r;

View File

@ -500,7 +500,7 @@ static UINT ICO_ExtractIconExW(
const IMAGE_RESOURCE_DIRECTORY *resdir;
/* go down this resource entry, name */
resdir = (PIMAGE_RESOURCE_DIRECTORY)((DWORD)rootresdir+(xresent->u2.s3.OffsetToDirectory));
resdir = (PIMAGE_RESOURCE_DIRECTORY)((char *)rootresdir + xresent->u2.s3.OffsetToDirectory);
/* default language (0) */
resdir = find_entry_default(resdir,rootresdir);

View File

@ -1926,16 +1926,16 @@ static int indent_tls_index;
/***********************************************************************
* get_indent_level
*/
inline static int get_indent_level(void)
inline static INT_PTR get_indent_level(void)
{
return (int)TlsGetValue( indent_tls_index );
return (INT_PTR)TlsGetValue( indent_tls_index );
}
/***********************************************************************
* set_indent_level
*/
inline static void set_indent_level( int level )
inline static void set_indent_level( INT_PTR level )
{
TlsSetValue( indent_tls_index, (void *)level );
}

View File

@ -592,7 +592,7 @@ static VS_VERSION_INFO_STRUCT16 *VersionInfo16_FindChild( VS_VERSION_INFO_STRUCT
{
VS_VERSION_INFO_STRUCT16 *child = VersionInfo16_Children( info );
while ( (DWORD)child < (DWORD)info + info->wLength )
while ((char *)child < (char *)info + info->wLength )
{
if ( !strncasecmp( child->szKey, szKey, cbKey ) )
return child;
@ -612,7 +612,7 @@ static VS_VERSION_INFO_STRUCT32 *VersionInfo32_FindChild( VS_VERSION_INFO_STRUCT
{
VS_VERSION_INFO_STRUCT32 *child = VersionInfo32_Children( info );
while ( (DWORD)child < (DWORD)info + info->wLength )
while ((char *)child < (char *)info + info->wLength )
{
if ( !strncmpiW( child->szKey, szKey, cbKey ) )
return child;

View File

@ -203,7 +203,7 @@ done:
*/
static Bool filter_event( Display *display, XEvent *event, char *arg )
{
DWORD mask = (ULONG_PTR)arg;
ULONG_PTR mask = (ULONG_PTR)arg;
if ((mask & QS_ALLINPUT) == QS_ALLINPUT) return 1;
@ -233,7 +233,7 @@ static Bool filter_event( Display *display, XEvent *event, char *arg )
/***********************************************************************
* process_events
*/
static int process_events( Display *display, DWORD mask )
static int process_events( Display *display, ULONG_PTR mask )
{
XEvent event;
HWND hwnd;

View File

@ -1748,7 +1748,7 @@ UINT X11DRV_GetKeyboardLayoutList(INT size, HKL *hkl)
{
if (hkl)
{
DWORD layout = main_key_tab[i].lcid;
ULONG_PTR layout = main_key_tab[i].lcid;
LANGID langid;
/* see comment for GetKeyboardLayout */
@ -1770,7 +1770,7 @@ UINT X11DRV_GetKeyboardLayoutList(INT size, HKL *hkl)
*/
HKL X11DRV_GetKeyboardLayout(DWORD dwThreadid)
{
DWORD layout;
ULONG_PTR layout;
LANGID langid;
if (dwThreadid && dwThreadid != GetCurrentThreadId())

View File

@ -36,28 +36,28 @@ extern "C" {
#define GET_X_LPARAM(lp) ((int)(short)LOWORD(lp))
#define GET_Y_LPARAM(lp) ((int)(short)HIWORD(lp))
#define GET_EM_LINESCROLL_MPS(vert, horz) (WPARAM)horz, (LONG)vert
#define GET_EM_LINESCROLL_MPS(vert, horz) (WPARAM)horz, (LPARAM)vert
#define GET_EM_SETSEL_START(wp, lp) (INT)(wp)
#define GET_EM_SETSEL_END(wp, lp) (lp)
#define GET_EM_SETSEL_MPS(iStart, iEnd) (WPARAM)(iStart), (LONG)(iEnd)
#define GET_EM_SETSEL_MPS(iStart, iEnd) (WPARAM)(iStart), (LPARAM)(iEnd)
#define GET_WM_ACTIVATE_STATE(wp, lp) LOWORD(wp)
#define GET_WM_ACTIVATE_FMINIMIZED(wp, lp) (BOOL)HIWORD(wp)
#define GET_WM_ACTIVATE_HWND(wp, lp) (HWND)(lp)
#define GET_WM_ACTIVATE_MPS(s, fmin, hwnd) (WPARAM)MAKELONG((s), (fmin)), (LONG)(hwnd)
#define GET_WM_ACTIVATE_MPS(s, fmin, hwnd) (WPARAM)MAKELONG((s), (fmin)), (LPARAM)(hwnd)
#define GET_WM_CHANGECBCHAIN_HWNDNEXT(wp, lp) (HWND)(lp)
#define GET_WM_CHARTOITEM_CHAR(wp, lp) (TCHAR)LOWORD(wp)
#define GET_WM_CHARTOITEM_POS(wp, lp) HIWORD(wp)
#define GET_WM_CHARTOITEM_HWND(wp, lp) (HWND)(lp)
#define GET_WM_CHARTOITEM_MPS(ch, pos, hwnd) (WPARAM)MAKELONG((pos), (ch)), (LONG)(hwnd)
#define GET_WM_CHARTOITEM_MPS(ch, pos, hwnd) (WPARAM)MAKELONG((pos), (ch)), (LPARAM)(hwnd)
#define GET_WM_COMMAND_ID(wp, lp) LOWORD(wp)
#define GET_WM_COMMAND_HWND(wp, lp) (HWND)(lp)
#define GET_WM_COMMAND_CMD(wp, lp) HIWORD(wp)
#define GET_WM_COMMAND_MPS(id, hwnd, cmd) (WPARAM)MAKELONG(id, cmd), (LONG)(hwnd)
#define GET_WM_COMMAND_MPS(id, hwnd, cmd) (WPARAM)MAKELONG(id, cmd), (LPARAM)(hwnd)
#define WM_CTLCOLOR 0x0019
@ -65,46 +65,46 @@ extern "C" {
#define GET_WM_CTLCOLOR_HWND(wp, lp, msg) (HWND)(lp)
#define GET_WM_CTLCOLOR_TYPE(wp, lp, msg) (WORD)(msg - WM_CTLCOLORMSGBOX)
#define GET_WM_CTLCOLOR_MSG(type) (WORD)(WM_CTLCOLORMSGBOX+(type))
#define GET_WM_CTLCOLOR_MPS(hdc, hwnd, type) (WPARAM)(hdc), (LONG)(hwnd)
#define GET_WM_CTLCOLOR_MPS(hdc, hwnd, type) (WPARAM)(hdc), (LPARAM)(hwnd)
#define GET_WM_HSCROLL_CODE(wp, lp) LOWORD(wp)
#define GET_WM_HSCROLL_POS(wp, lp) HIWORD(wp)
#define GET_WM_HSCROLL_HWND(wp, lp) (HWND)(lp)
#define GET_WM_HSCROLL_MPS(code, pos, hwnd) (WPARAM)MAKELONG(code, pos), (LONG)(hwnd)
#define GET_WM_HSCROLL_MPS(code, pos, hwnd) (WPARAM)MAKELONG(code, pos), (LPARAM)(hwnd)
#define GET_WM_MENUCHAR_CHAR(wp, lp) (TCHAR)LOWORD(wp)
#define GET_WM_MENUCHAR_HMENU(wp, lp) (HMENU)(lp)
#define GET_WM_MENUCHAR_FMENU(wp, lp) (BOOL)HIWORD(wp)
#define GET_WM_MENUCHAR_MPS(ch, hmenu, f) (WPARAM)MAKELONG(ch, f), (LONG)(hmenu)
#define GET_WM_MENUCHAR_MPS(ch, hmenu, f) (WPARAM)MAKELONG(ch, f), (LPARAM)(hmenu)
#define GET_WM_MENUSELECT_CMD(wp, lp) LOWORD(wp)
#define GET_WM_MENUSELECT_FLAGS(wp, lp) (UINT)(int)(short)HIWORD(wp)
#define GET_WM_MENUSELECT_HMENU(wp, lp) (HMENU)(lp)
#define GET_WM_MENUSELECT_MPS(cmd, f, hmenu) (WPARAM)MAKELONG(cmd, f), (LONG)(hmenu)
#define GET_WM_MENUSELECT_MPS(cmd, f, hmenu) (WPARAM)MAKELONG(cmd, f), (LPARAM)(hmenu)
#define GET_WM_MDIACTIVATE_FACTIVATE(hwnd, wp, lp) (lp == (LONG)hwnd)
#define GET_WM_MDIACTIVATE_FACTIVATE(hwnd, wp, lp) (lp == (LPARAM)hwnd)
#define GET_WM_MDIACTIVATE_HWNDDEACT(wp, lp) (HWND)(wp)
#define GET_WM_MDIACTIVATE_HWNDACTIVATE(wp, lp) (HWND)(lp)
#define GET_WM_MDIACTIVATE_MPS(f, hwndD, hwndA) (WPARAM)(hwndA), 0
#define GET_WM_MDISETMENU_MPS(hmenuF, hmenuW) (WPARAM)hmenuF, (LONG)hmenuW
#define GET_WM_MDISETMENU_MPS(hmenuF, hmenuW) (WPARAM)hmenuF, (LPARAM)hmenuW
#define GET_WM_PARENTNOTIFY_MSG(wp, lp) LOWORD(wp)
#define GET_WM_PARENTNOTIFY_ID(wp, lp) HIWORD(wp)
#define GET_WM_PARENTNOTIFY_HWNDCHILD(wp, lp) (HWND)(lp)
#define GET_WM_PARENTNOTIFY_X(wp, lp) (int)(short)LOWORD(lp)
#define GET_WM_PARENTNOTIFY_Y(wp, lp) (int)(short)HIWORD(lp)
#define GET_WM_PARENTNOTIFY_MPS(msg, id, hwnd) (WPARAM)MAKELONG(id, msg), (LONG)(hwnd)
#define GET_WM_PARENTNOTIFY_MPS(msg, id, hwnd) (WPARAM)MAKELONG(id, msg), (LPARAM)(hwnd)
#define GET_WM_PARENTNOTIFY2_MPS(msg, x, y) (WPARAM)MAKELONG(0, msg), MAKELONG(x, y)
#define GET_WM_VKEYTOITEM_CODE(wp, lp) (int)(short)LOWORD(wp)
#define GET_WM_VKEYTOITEM_ITEM(wp, lp) HIWORD(wp)
#define GET_WM_VKEYTOITEM_HWND(wp, lp) (HWND)(lp)
#define GET_WM_VKEYTOITEM_MPS(code, item, hwnd) (WPARAM)MAKELONG(item, code), (LONG)(hwnd)
#define GET_WM_VKEYTOITEM_MPS(code, item, hwnd) (WPARAM)MAKELONG(item, code), (LPARAM)(hwnd)
#define GET_WM_VSCROLL_CODE(wp, lp) LOWORD(wp)
#define GET_WM_VSCROLL_POS(wp, lp) HIWORD(wp)
#define GET_WM_VSCROLL_HWND(wp, lp) (HWND)(lp)
#define GET_WM_VSCROLL_MPS(code, pos, hwnd) (WPARAM)MAKELONG(code, pos), (LONG)(hwnd)
#define GET_WM_VSCROLL_MPS(code, pos, hwnd) (WPARAM)MAKELONG(code, pos), (LPARAM)(hwnd)
/****** KERNEL Macro APIs ******************************************************/

View File

@ -208,7 +208,7 @@ static void load_next_resource( DLLSPEC *spec )
res->data = file_pos - 2*sizeof(DWORD) + hdr_size;
get_string( &res->type );
get_string( &res->name );
if ((int)file_pos & 2) get_word(); /* align to dword boundary */
if ((UINT_PTR)file_pos & 2) get_word(); /* align to dword boundary */
get_dword(); /* skip data version */
get_word(); /* skip mem options */
res->lang = get_word();

View File

@ -521,8 +521,8 @@ void dump_coff(unsigned long coffbase, unsigned long len, void* pmt)
coff = (PIMAGE_COFF_SYMBOLS_HEADER)PRD(coffbase, len);
coff_symbols = (PIMAGE_SYMBOL) ((unsigned int) coff + coff->LvaToFirstSymbol);
coff_linetab = (PIMAGE_LINENUMBER) ((unsigned int) coff + coff->LvaToFirstLinenumber);
coff_symbols = (PIMAGE_SYMBOL) ((char *)coff + coff->LvaToFirstSymbol);
coff_linetab = (PIMAGE_LINENUMBER) ((char *)coff + coff->LvaToFirstLinenumber);
coff_strtab = (char *) (coff_symbols + coff->NumberOfSymbols);
printf("\nDebug table: COFF format. modbase %p, coffbase %p\n", PRD(0, 0), coff);

View File

@ -816,8 +816,7 @@ static void handle_ani_list(riff_tag_t *lst, enum res_e type, int isswapped)
isprint(rtp->tag[2]) ? rtp->tag[2] : '.',
isprint(rtp->tag[3]) ? rtp->tag[3] : '.');
/* FIXME: This relies in sizeof(DWORD) == sizeof(pointer_type) */
if((DWORD)rtp & 1)
if((UINT_PTR)rtp & 1)
rtp = SKIP_TAG(rtp,1);
}
}
@ -927,8 +926,7 @@ ani_curico_t *new_ani_curico(enum res_e type, raw_data_t *rd, int *memopt)
isprint(rtp->tag[2]) ? rtp->tag[2] : '.',
isprint(rtp->tag[3]) ? rtp->tag[3] : '.');
/* FIXME: This relies in sizeof(DWORD) == sizeof(pointer_type) */
if((DWORD)rtp & 1)
if((UINT_PTR)rtp & 1)
rtp = SKIP_TAG(rtp,1);
}