[Clamav-devel] Question have an about LibClamAV.dll

Brandon Perry bperry.volatile at gmail.com
Mon Apr 10 11:42:13 EDT 2017

> On Apr 10, 2017, at 9:00 AM, Shanmugam, Suresh (Conduent) <Suresh.Shanmugam at conduent.com> wrote:
> Hi Developers,
> I've an query about doing the scan using byte[] help of LibClamAV.dll(win32). If anyone know the methods to pass the byte[] provide the details?.
> Note:
> I able to do the scan a physical path file. But not able to do with byte[]. Please help me.

It sounds like you are interacting with libclamav from C#. ClamAV requires a rewindable file stream, so a byte array can’t be scanned on its own.

You could map the byte array to a MemoryMappedFile.

http://stackoverflow.com/questions/10806518/write-string-data-to-memorymappedfile <http://stackoverflow.com/questions/10806518/write-string-data-to-memorymappedfile>

Then you could potentially pass the file descriptor for this to native library.

> Regards,
> Suresh Shanmugam.
> _______________________________________________
> http://lurker.clamav.net/list/clamav-devel.html
> Please submit your patches to our Bugzilla: http://bugs.clamav.net
> http://www.clamav.net/contact.html#ml

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Message signed with OpenPGP
URL: <https://lists.clamav.net/pipermail/clamav-devel/attachments/20170410/453d4147/attachment.sig>

More information about the clamav-devel mailing list