Page 1 of 1

Global Woes

Posted: Thu Feb 07, 2008 12:10 pm
by Yourself
Self Created DLL Code

Code: Select all

;library crypt
Global md5_f$, crc$,des$,base-en$,base-de$,md5_h$ = ""

ProcedureDLL.s md5_hash_file(file$)
res$=MD5FileFingerprint(file$)
md5_f$=res$
ProcedureReturn md5_f$
EndProcedure

ProcedureDLL.s md5_hash_string(str$)
res$=MD5Fingerprint(@str$, Len(str$))
md5_h$=res$
ProcedureReturn md5_h$
EndProcedure

ProcedureDLL.s des(p$,k$)
res$=DESFingerprint(p$,k$)
des$=res$
ProcedureReturn des$
EndProcedure

ProcedureDLL.s crc32(str$)
*MemID=AllocateMemory(500)
If *MemID
  PokeS(*MemID,str$)
  res$=CRC32Fingerprint(*MemID,MemorySize(*MemID))
  crc$=res$
  FreeMemory(*MemID)
ProcedureReturn crc$
EndProcedure
Upon Running, I get "
Syntax Error at Line 2
Why?
Also : How do I create .ocx files with VB6 for use with PureDisHelper?
ActiveX document, exe , or dll , or control?
Which one out of the above do i select in VB6 to create ActiveX control for PureDisHelper?!

Posted: Thu Feb 07, 2008 12:21 pm
by Dare
Hi Mate.

Re the syntax error, these two variables: base-en$,base-de$ have invalid names.

base-en$ is actually base (a numeric, a long) minus en$, a string.

You could use underscores instead of hyphens.

As the ocx, you need a smarter brain than mine to help you there. :)

Posted: Thu Feb 07, 2008 12:21 pm
by Demivec

Code: Select all

Global md5_f$, crc$,des$,base-en$,base-de$,md5_h$ = "" 
You can't use a hyphen "-" in a variable's name.

@Edit: too slow.

Posted: Thu Feb 07, 2008 12:22 pm
by SFSxOI
On line two, try this instead for the syntax error and you can't use a '-' in the variable name.

Code: Select all

Global md5_f$, crc$, des$, base_en$, base_de$, md5_h$
md5_h$ = ""
have you tried to use a manifest instead of creating an ocx to address the .dll?

Hey Thanks!

Posted: Thu Feb 07, 2008 12:35 pm
by Yourself
Thanks Guys!!!
Thats solved it!
WOW! I'm so exited!
And , erm... whats a manifest?