[DUG] RFID - EAccess violation
Jolyon Smith
jsmith at deltics.co.nz
Thu May 28 12:16:22 NZST 2015
However, since you are using Delphi 6 the StrPCopy code should be yielding
the same thing as that constant declaration.
I've also just noticed that your call to the API passes bufferr directly.
I am surprised this even compiles with the declaration for the API function
as provided in the code. This indicates that a pointer to a buffer is
required, but you are passing the buffer itself:
receive:=API_PCDRead(0,0,$00,10,1,key,bufferr);
vs (I would expect):
receive:=API_PCDRead(0,0,$00,10,1,key, at bufferr[0]);
Do you have a reference to the documentation for the API you are using ?
That will tell us what the API is expecting which might in turn point to
the problem in the code. Without that we are pretty much shooting in the
dark.
On 28 May 2015 at 12:06, Jolyon Smith <jsmith at deltics.co.nz> wrote:
> Sorry, a typo in that. As a typed constant it should have read:
>
> const
> KEY : array[0..6] of Byte = ($FF,$FF,$FF,$FF,$FF,$FF,$00);
>
> Note the first '=' is now a ':'
>
>
> On 28 May 2015 at 11:33, Marshland Engineering <marshland at marshland.co.nz>
> wrote:
>
>> Thanks for the replies.
>>
>> this is the line
>>
>> > receive:=API_PCDRead(0,0,$00,10,1,key,bufferr);
>>
>> I'm way out my depth with the workings of this function. I just do simple
>> coding - A ex dBase3 programmer.
>>
>> I took the sample code that the RFID supplier gave, stripped off
>> everything I
>> didn't need other than the read line for RFID card and then copied the
>> bits
>> into my program which now crashes.
>>
>> I was wondering if the XPMENU call or something like that is interfering
>> with
>> other modules ?
>>
>> My debugging is limited to finding the line with the error.
>>
>> Both programs are run in Delphi 6, same machine and same environment.
>>
>> I can't find how to code this, where ever I put it, it crashes. - Expected
>> expression but ARRAY found.
>>
>> const
>> KEY = array[0..6] of Byte = ($FF,$FF,$FF,$FF,$FF,$FF,$00);
>>
>> Thanks Wallace.
>>
>>
>> _______________________________________________
>> NZ Borland Developers Group - Delphi mailing list
>> Post: delphi at listserver.123.net.nz
>> Admin: http://delphi.org.nz/mailman/listinfo/delphi
>> Unsubscribe: send an email to delphi-request at listserver.123.net.nz with
>> Subject: unsubscribe
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.123.net.nz/pipermail/delphi/attachments/20150528/d2ab7ba4/attachment.html
More information about the Delphi
mailing list