Re: two revision levels are incompatible??
From: Doron Holan [MS] (doronh_at_nospam.microsoft.com)
Date: 02/04/05
- Next message: Ivan Brugiolo [MSFT]: "Re: Win32 Service App for Terminal services"
- Previous message: vipin: "Re: Win32 Service App for Terminal services"
- In reply to: Daniel Miller: "Re: two revision levels are incompatible??"
- Next in thread: Daniel Miller: "Re: two revision levels are incompatible??"
- Reply: Daniel Miller: "Re: two revision levels are incompatible??"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 3 Feb 2005 18:41:47 -0800
instead of manually adding the padding, i would use explicit padding (ie use
the #pragma directive) around teh structures that need 1 byte packing, or,
if you can use the std padding setting for windows throughout the project.
this will only come back and get you again sometime.
--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.
"Daniel Miller" <dan@invalid.com> wrote in message
news:Xns95F29C151D3D7dancarddupercom@216.65.98.70...
> By golly, that's exactly what it was!! Thank you *very* much, I don't
> know that I would have ever thought to look at that... all the web info
> on that warning discussed issues with access permissions, which was *way*
> off in left field!!
>
> It turns out that SCSI_PASS_THROUGH and SPT_DIRECT have a UCHAR field
> followed by a ULONG, and DeviceIOControl obviously expects three bytes of
> padding there. I was using /Zp1 in my builds, as you suspected, and I
> need that for other structs in the app.
>
> I just padded the two structs with a three-byte unused field, then
> rebuilt; now everything works fine!! That means I have a decent IDE
> again!! Wow...
>
> Thank you again for that insight...
>
> Dan Miller
>
> "Doron Holan [MS]" <doronh@nospam.microsoft.com> wrote in
> news:ORJonwaCFHA.904@TK2MSFTNGP12.phx.gbl:
>
>> i would bet that the size of your structure is different due to
>> different packing alignment settings on the compilers. from both
>> versions of the app, issue a printf("size %d\n", sizeof(struct Xxxx))
>> before the DeviceIoControl call. if they are different sizes, that is
>> probably the issue.
>>
>> d
>>
> "Daniel Miller" <dan@invalid.com> wrote in message
> news:Xns95F1A3266A137dancarddupercom@216.65.98.71...
>> I'm developing an application on Windows XP... It uses DeviceIOControl/
>> SCSI_PASS_THROUGH_etc to send SCSI commands to USB devices.
>>
>> I was previously using MinGW to build my app, and everything was
> working
>> as
>> expected. Now I'm trying to build the app using Visual C++ 6.0 SP6.
> The
>> program compiles without warnings, but when I try to send INQUIRY to a
>> device, DeviceIOControl fails with
>>
>> "Indicates two revision levels are incompatible"
>>
>> I'm baffled by this; what is it trying to tell me??
>>
>
>
> ----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet
> News==----
> http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000
> Newsgroups
> ---= East/West-Coast Server Farms - Total Privacy via Encryption =---
- Next message: Ivan Brugiolo [MSFT]: "Re: Win32 Service App for Terminal services"
- Previous message: vipin: "Re: Win32 Service App for Terminal services"
- In reply to: Daniel Miller: "Re: two revision levels are incompatible??"
- Next in thread: Daniel Miller: "Re: two revision levels are incompatible??"
- Reply: Daniel Miller: "Re: two revision levels are incompatible??"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|