View Single Post
Old 08-25-2008   #3 (permalink)
alovaal


 
 

Re: VB Script Trying to use Capicom

On 25 elo, 14:56, alov...@xxxxxx wrote:
Quote:

> On 1 elo, 18:20, "mark4asp" <mark4...@xxxxxx> wrote:
>
>
>
>
>
Quote:

> > I had a script which used Capicom to calculate a MD5 hash for a file
> > and compare that to the files previous hash (calculated before network
> > transmission). The server it was on was rebuilt and some changes were
> > made to the script.
>
Quote:

> > I have independently tested the changes and they work.
>
Quote:

> > The original function is broke.
>
Quote:

> > The error message I get is:
>
Quote:

> > error loading DLL 'crypt.Algorithm'
>
Quote:

> > It breaks on the line "crypt.Algorithm = 3"
>
Quote:

> > I installed Capicom and gave Everyone full access to it. That hasn't
> > solved the problem. *The code below is actually copied from the Capicom
> > examples.
>
Quote:

> > How to I test whether Capicom is actually there and test what
> > functionality is available from it?
>
Quote:

> > Function Hash(filename)
> > * * * * Dim crypt: Set crypt = CreateObject("CAPICOM.HashedData")
>
Quote:

> > * * * * ' CAPICOM_HASH_ALGORITHM_MD5
> > * * * * crypt.Algorithm = 3
>
Quote:

> > * * * * Dim stream: Set stream = CreateObject("ADODB.Stream")
> > * * * * stream.Type = 1 ' adTypeBinary
> > * * * * stream.Open
> > * * * * stream.LoadFromFile filename
>
Quote:

> > * * * * Do Until stream.EOS : crypt.Hash stream.Read(1024000) :Loop
>
Quote:

> > * * * * Hash = crypt.Value
> > End Function
>
> Try regsrv32 capicom.dll- Piilota siteerattu teksti -
>
> - Näytä siteerattu teksti -
D'oh
regsvr32 not regsrv32
My System SpecsSystem Spec