Mark0's Forum
Software => TrID File Identifier => Topic started by: Tooms on October 13, 2015, 07:05:12 PM
-
Hi
First thanks alot for making the tool.
I am trying to make an application there is scanning fileservers for encrypted files after an cryptolocker attack and is there for using the TrIDLib to do the matching.
my dev VM is an windows xp with VS.2008 and i have download your sample codes for using the lib and on the XP it is working fine and it looks like this.
Microsoft Windows XP [version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\VS projekt\Trid-test1\VB.NET\bin\Debug>Demo.exe
TrIDLib demo
TrID_LoadDefsPack code: 5956
DEFSNUM: 5956
File: C:\VS projekt\Trid-test1\VB.NET\bin\Debug\triddefs.trd
1
ResNum: 3
total_point: 36009
RES_NUM: 1
RES_FILETYPE: TrID defs package
RES_FILEEXT: TRD
RES_POINTS: 22009
Procent: 61,121%)
-------------------
RES_NUM: 2
RES_FILETYPE: AOS File Format
RES_FILEEXT: AOS
RES_POINTS: 10000
Procent: 27,771%)
-------------------
RES_NUM: 3
RES_FILETYPE: Generic RIFF container
RES_FILEEXT:
RES_POINTS: 4000
Procent: 11,108%)
-------------------
Procent_calc_recalctotal: 100
Press any key to continue . . .
C:\VS projekt\Trid-test1\VB.NET\bin\Debug>
but when i am moving the app to my Windows 7 x64 then i am getting this error, that the dll cannot load the triddefs.trd file.
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
c:\temp\ToomsFSscan2>Demo.exe
TrIDLib demo
Unhandled Exception: System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
at Demo.TrIDLib.TrID_LoadDefsPack(String& sPath)
at Demo.Demo.Main()
c:\temp\ToomsFSscan2>
So why is it not able to load the same triddefs.trd file on another version of windows ?
Thanks
Tooms
-
The problem is that TrIDLib is a Win32 DLL, and so it cannot be called from a 64bit application.
To run around that, you can probably rebuild you app explicitly targeting x86 as the platform, instead of Any CPU.
Have a look here, for example: http://stackoverflow.com/questions/1108137/how-to-run-a-32-bit-net-application-in-a-64-bit-environment
-
ahh yes ofcource that will help by locking it to 32bit.
just some other questions, will there be an 64bit dll or an combined dll for 32/64bit?
Can the scanning be started from an offset, like not start at the first byte but start at byte 10?
Thanks
Thomas
-
Sorry for the late reply.
A 64bit DLL is something I'm planning to do, but I don't have any timeline at the moment.
Scanning from an offset is also something that I think to implement in some future versions.
-
Hi
That is just okay, i fully understand that time is limit and i will just play around with making my own engine so i better can hook into functions that i need like file streams, memorystreams, alternatedatastreams, start at offsets, 64bit and many other ideas.
Time will tell how it go.
Thanks for your good work on the trid
Tooms