HashLib errors
Moderators: JRL, Dorian (MJT support)
- alan1mtnview
- Newbie
- Posts: 19
- Joined: Tue Jan 29, 2008 3:34 am
- Location: Mtn View, Arkansas, USA
- Contact:
HashLib errors
Happy, Monday, everybody. I have a problem using Hashlib that is driving me NUTS. I used the code that Marcus posted from this thread:
http://www.mjtnet.com/usergroup/viewtopic.php?t=4330
//Get MD5 hash of a file
LibFunc>c:\program files\macro scheduler\Hashlib,FileMD5,r1,C:\MD5Test\help-windows.jpg,buf1
Mid>r1_2,1,r1,hash1
mdl>hash1
The only changes I made to the code was to the path to the dll and the path to the image file. I keep getting errors on my mid> statement. Am I missing something obvious? I'm on Version 10.018
http://www.mjtnet.com/usergroup/viewtopic.php?t=4330
//Get MD5 hash of a file
LibFunc>c:\program files\macro scheduler\Hashlib,FileMD5,r1,C:\MD5Test\help-windows.jpg,buf1
Mid>r1_2,1,r1,hash1
mdl>hash1
The only changes I made to the code was to the path to the dll and the path to the image file. I keep getting errors on my mid> statement. Am I missing something obvious? I'm on Version 10.018
Thanks,
Alan
Alan
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Suspect the path to the DLL is wrong. So the result var (r1) is not set (or is an error msg). Step through with the debugger to see what the value of r1 is immediately after the LibFunc line. Or add a message box:
Code: Select all
//Get MD5 hash of a file
LibFunc>c:\program files\macro scheduler\Hashlib,FileMD5,r1,C:\MD5Test\help-windows.jpg,buf1
MessageModal>r1
Mid>r1_2,1,r1,hash1
mdl>hash1
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Maybe THey are in earlier parTS of your SCripT, buT I don'T See any definiTionS for THe midSTr VariableS: r1_2, and r1.
(Sorry for mixed CaSe Spelling, HaVing a STrange problem on browSerS THaT do noT reSpond To CerTain leTTerS. STHCV...)
(Sorry for mixed CaSe Spelling, HaVing a STrange problem on browSerS THaT do noT reSpond To CerTain leTTerS. STHCV...)
Last edited by Bob Hansen on Mon Feb 04, 2008 10:53 pm, edited 2 times in total.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
r1 is the return var for the LibFunc function. Which if successful would return r1_2 for the buffer.Bob Hansen wrote:Maybe THey are in earlier parTS of your SCripT, buT I don'T See any definiTionS for THe midSTr VariableS: r1_2, and r1.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
- alan1mtnview
- Newbie
- Posts: 19
- Joined: Tue Jan 29, 2008 3:34 am
- Location: Mtn View, Arkansas, USA
- Contact:
Thanks for the quick replies Marcus and Bob (even though Bob had me worried about my eyesight momentarily).
Thanks, Marcus. I hadn't used the debugger before. A ton of information in there. It did confirm that the dll didn't load, even though I manually copied the dll to the MS dir. Would I need to register the dll with Windows?
Bob, I linked the discussion where I learned about Hashlib. Marcus had answered a question in it with some sample code that I cut and pasted, then altered as described.
Marcus, the code you supplied there is different than the example in Hashlib.txt. Will both of them work?
Thanks, Marcus. I hadn't used the debugger before. A ton of information in there. It did confirm that the dll didn't load, even though I manually copied the dll to the MS dir. Would I need to register the dll with Windows?
Bob, I linked the discussion where I learned about Hashlib. Marcus had answered a question in it with some sample code that I cut and pasted, then altered as described.
Marcus, the code you supplied there is different than the example in Hashlib.txt. Will both of them work?
Thanks,
Alan
Alan
- alan1mtnview
- Newbie
- Posts: 19
- Joined: Tue Jan 29, 2008 3:34 am
- Location: Mtn View, Arkansas, USA
- Contact:
OK, it works now, but I don't have a clue as to why. I re-downloaded the library from mjtnet and overwrote the dll. File size and dates on the two files are identical, as is the md5 hash (Irony, anyone?)
.
I can copy the dll anywhere and point the script at it, and it works normally as well.
It's too early in the week for Windows Weirdities.
Just wanted to let you know I got it working and how, if not why, and that I really appreciate the prompt feedback from both of you.

I can copy the dll anywhere and point the script at it, and it works normally as well.
It's too early in the week for Windows Weirdities.
Just wanted to let you know I got it working and how, if not why, and that I really appreciate the prompt feedback from both of you.
Thanks,
Alan
Alan
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Glad you are working Alan.
I was also having one of those Windows Weirdities.
It is now three hours later, and Case problem is gone. No known cause. Did run SpyBot and AdAware and removed some items. Also restarted the Firefox browser. My problem is gone.....no one cares but me.
I was also having one of those Windows Weirdities.
It is now three hours later, and Case problem is gone. No known cause. Did run SpyBot and AdAware and removed some items. Also restarted the Firefox browser. My problem is gone.....no one cares but me.

Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
- alan1mtnview
- Newbie
- Posts: 19
- Joined: Tue Jan 29, 2008 3:34 am
- Location: Mtn View, Arkansas, USA
- Contact: