Global Woes

Just starting out? Need help? Post your questions and find answers here.
Yourself
User
User
Posts: 17
Joined: Fri Jan 18, 2008 2:47 pm

Global Woes

Post 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?!
Dare
Addict
Addict
Posts: 1965
Joined: Mon May 29, 2006 1:01 am
Location: Outback

Post 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. :)
Dare2 cut down to size
User avatar
Demivec
Addict
Addict
Posts: 4260
Joined: Mon Jul 25, 2005 3:51 pm
Location: Utah, USA

Post 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.
Last edited by Demivec on Thu Feb 07, 2008 12:22 pm, edited 1 time in total.
SFSxOI
Addict
Addict
Posts: 2970
Joined: Sat Dec 31, 2005 5:24 pm
Location: Where ya would never look.....

Post 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?
Yourself
User
User
Posts: 17
Joined: Fri Jan 18, 2008 2:47 pm

Hey Thanks!

Post by Yourself »

Thanks Guys!!!
Thats solved it!
WOW! I'm so exited!
And , erm... whats a manifest?
Post Reply