Re: Why does OpenStore(TEXT("\\Hard Disk")) fail?
- From: "Bruce Eitman \(eMVP\)" <beitmannospam@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 19 Jul 2005 08:09:03 -0400
You don't set cbSize in the STOREINFO struct. I'm just guessing here, but
that is usually important.
--
Bruce Eitman (eMVP)
Senior Engineer
beitman AT applieddata DOT net
Applied Data Systems
www.applieddata.net
An ISO 9001:2000 Registered Company
Microsoft WEP Gold-level Member
"Jimbo" <cjavajim@xxxxxxxxx> wrote in message
news:1121734493.639432.122890@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> The OpenStore passed the INVALID_HANDLE_VALUE test but GetStoreInfo
> failed. Here's the code (printStoreInfo() [code not shown] simply
> prints each field of the struct):
>
>
> HANDLE hStore;
> STOREINFO StoreInfo;
> TCHAR *szDeviceName;
> TCHAR szMsgBuf[MAX_PATH];
>
>
> szDeviceName = TEXT("DSK1:");
> hStore = OpenStore(szDeviceName);
> if (INVALID_HANDLE_VALUE == hStore)
> {
> FormatMessage(
> FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
> NULL,
> GetLastError(),
> 0,
> (LPTSTR) szMsgBuf,
> MAX_PATH,
> NULL
> );
> wprintf(TEXT("'%s'\n"), szMsgBuf);
> }
> else
> {
> if ( GetStoreInfo(hStore, &StoreInfo) )
> {
> printStoreInfo(&StoreInfo);
> }
> else
> {
> FormatMessage(
> FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
> NULL,
> GetLastError(),
> 0,
> (LPTSTR) szMsgBuf,
> MAX_PATH,
> NULL
> );
> wprintf(TEXT("'%s'\n"), szMsgBuf);
> }
> }
>
.
- Follow-Ups:
- References:
- Why does OpenStore(TEXT("\\Hard Disk")) fail?
- From: Jimbo
- Re: Why does OpenStore(TEXT("\\Hard Disk")) fail?
- From: Jimbo
- Re: Why does OpenStore(TEXT("\\Hard Disk")) fail?
- From: Ariane Billings
- Re: Why does OpenStore(TEXT("\\Hard Disk")) fail?
- From: Jimbo
- Why does OpenStore(TEXT("\\Hard Disk")) fail?
- Prev by Date: Re: Any chance for 64 bit file IO on wince 5.0?
- Next by Date: Re: Storage Memory dilemma
- Previous by thread: Re: Why does OpenStore(TEXT("\\Hard Disk")) fail?
- Next by thread: Re: Why does OpenStore(TEXT("\\Hard Disk")) fail?
- Index(es):