Article View: borland.public.cppbuilder.nativeapi
Article #4652Re: Problem with DeviceIoControl() IOCTL_STORAGE_QUERY_PROPERTY
From: Andrue Cope [TeamB]
Date: Fri, 16 Dec 2005 09:13
Date: Fri, 16 Dec 2005 09:13
14 lines
1495 bytes
1495 bytes
Richard Bradbrook wrote: > I also advise you to VirtualAlloc a buffer somewhere for all your I/O > transfers. When buffers are not correctly alligned, DeviceIoControl > often fails with the error you're getting - that's where the > 'AlignmentMask' value comes in. The problem was that neither of us had 'treat enums as ints' set so the size and layout of the query structure was wrong. -- Andrue Cope [TeamB] [Bicester, Uk] http://info.borland.com/newsgroups/guide.html
Technical Details
Message-ID:
<43a284df$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<8b04q11n406hs1bonf8n9586mn3of3lqm3@4ax.com> <43a1de8b$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,f7af8c8a3ab6155a X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Andrue Cope [TeamB]" <no.spam@not.a.valid.address> Subject: Re: Problem with DeviceIoControl() IOCTL_STORAGE_QUERY_PROPERTY Newsgroups: borland.public.cppbuilder.nativeapi References: <8b04q11n406hs1bonf8n9586mn3of3lqm3@4ax.com> <43a1de8b$1@newsgroups.borland.com> Date: Fri, 16 Dec 2005 09:13:33 +0000 User-Agent: XanaNews/1.17.6.6 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 NNTP-Posting-Host: 217.207.223.34 Message-ID: <43a284df$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1134724319 217.207.223.34 (16 Dec 2005 01:11:59 -0700) Lines: 14 X-Authenticated-User: acope Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail