Re: problems accessing compact flash card
From: Nicolai Hansen (nic_at_aub.dk)
Date: 12/03/04
- Next message: Michael Vilhelmsen: "QR4"
- Previous message: Nick Alexander: "How to use methods of an ancestor interface"
- Next in thread: AlanGLLoyd: "Re: problems accessing compact flash card"
- Reply: AlanGLLoyd: "Re: problems accessing compact flash card"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 2 Dec 2004 22:39:54 -0800
alanglloyd@aol.com (AlanGLLoyd) wrote in message news:<20041130112601.12265.00000268@mb-m28.aol.com>...
> In article <d96764ff.0411212323.7109e647@posting.google.com>, nic@aub.dk
> (Nicolai Hansen) writes:
>
> > h:=CreateFile(PChar('\\.\'+SaveForm.Drive+':'), GENERIC_ALL,
> >0, nil, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
> > if integer(h)<0 then // wtf happened to if h=INVALID_HANDLE?
> > CloseHandle(h);
> >
>
> MSDN says of CreateFile, Return Value ...
>
> "If the function fails, the return value is INVALID_HANDLE_VALUE. To get
> extended error information, call GetLastError."
>
> Delphi assigns -1 to INVALID_HANDLE_VALUE.
Ah, that was its name :) Much appreciated as those DWORD->integer
typecasts look a bit silly :)
- Next message: Michael Vilhelmsen: "QR4"
- Previous message: Nick Alexander: "How to use methods of an ancestor interface"
- Next in thread: AlanGLLoyd: "Re: problems accessing compact flash card"
- Reply: AlanGLLoyd: "Re: problems accessing compact flash card"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|