checksum on a file in Windows

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

checksum on a file in Windows

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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: checksum on a file in Windows

SebastianHC
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 [hidden email].
> To post to this group, send email to [hidden email].
> Visit this group at http://groups.google.com/group/va-smalltalk.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/groups/opt_out.


Reply | Threaded
Open this post in threaded view
|

Re: checksum on a file in Windows

Marten Feldtmann-2
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

Am Dienstag, 9. Juli 2013 21:06:42 UTC+2 schrieb Sebastian Heidbrink:
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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="_0SDxklX7e0J">va-smalltalk...@googlegroups.com.
> To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="_0SDxklX7e0J">va-sma...@....
> Visit this group at http://groups.google.com/group/va-smalltalk.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/groups/opt_out.