Re: checksum on a file in Windows

38 views
Skip to first unread message

Sebastian Heidbrink

unread,
Jul 9, 2013, 3:06:42 PM7/9/13
to va-sma...@googlegroups.com
Hi Wayne,

I can only point you on this article.
http://www.codeguru.com/cpp/cpp/algorithms/checksum/article.php/c5103/CRC32-Generating-a-checksum-for-a-file.htm
You should be able to reimplement this in VAST or just bind it.

I already mapped filea into memory with VAST. It works but as far as I
can remember I had to bind some further windows api functions, or define
further constants in the pools. Ican't remember right now.

A good startingpoint could also be:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms680355(v=vs.85).aspx

Good luck!
Sebastian



Am 09.07.2013 07:36, schrieb Wayne Johnston:
> I can't seem to find an existing way to find the checksum on a file in
> Windows (preferably via a primitive so it's efficient). A way to do
> it doesn't even seem to be built into Windows as far as I can tell.
> I'd like to do this without having to require new software on all of
> our client machines. Ideas? --
> You received this message because you are subscribed to the Google
> Groups "VA Smalltalk" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to va-smalltalk...@googlegroups.com.
> To post to this group, send email to va-sma...@googlegroups.com.
> Visit this group at http://groups.google.com/group/va-smalltalk.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Marten Feldtmann

unread,
Jul 9, 2013, 3:37:34 PM7/9/13
to va-sma...@googlegroups.com
When thinking about crc32 (or as an alternative: adler) you should always consider zip/unzip libraries.

Since VA8.52 Instantiations has support for this. Look at:

MZDllCall>>crc32:buffer:length:

or

MSDllCall>>adler:buffer:length:

and when you notice the c example in the method you might implement this loop in Smalltalk and use this low level c call.

Marten
Reply all
Reply to author
Forward
0 new messages