Re: Question have an about LibClamAV.dll

Brandon Perry <[email protected]>
Newsgroups gmane.comp.security.virus.clamav.devel
Message-ID <[email protected]>
> On Apr 10, 2017, at 1:50 PM, Shanmugam, Suresh (Conduent) <[email protected]> wrote:
> 
> Hi Brandon Perry,
> 
> Okay. If you don't mind. Do you have any samples of implementation using stream?. If you have please share to me.

I do not, but this should be a good start.

http://stackoverflow.com/questions/15669662/get-a-file-descriptor-handle-from-filestream <http://stackoverflow.com/questions/15669662/get-a-file-descriptor-handle-from-filestream>
> 
> Regards,
> Suresh Shanmugam.
> 
> Sent using Boxer
> On Apr 10, 2017 10:51 PM, Brandon Perry <[email protected]> wrote:
> 
>> On Apr 10, 2017, at 11:58 AM, Shanmugam, Suresh (Conduent) <[email protected]> wrote:
>> 
>> Hi Brandon Perry,
>> 
>> You are correct Perry. I am implementing the LibClamAV Library into C# application.  So I need to get the File descriptor from the Stream and need to assign the value to "cl_scandesc" Native method. Am I right?.
> 
> Yes, I believe that’s correct.
> 
>> 
>> 
>> Regards,
>> Suresh Shanmugam.
>> 
>> -----Original Message-----
>> From: clamav-devel [mailto:[email protected]] On Behalf Of Brandon Perry
>> Sent: Monday, April 10, 2017 9:12 PM
>> To: ClamAV Development <[email protected]>
>> Subject: Re: [Clamav-devel] Question have an about LibClamAV.dll
>> 
>> 
>>> On Apr 10, 2017, at 9:00 AM, Shanmugam, Suresh (Conduent) <[email protected]> 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
>> 
>> _______________________________________________
>> 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
> 
> _______________________________________________
> 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
> _______________________________________________
> 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

_______________________________________________
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
signature.asc (application/pgp-signature, 801 B)
-----BEGIN PGP SIGNATURE-----

iQIcBAEBCgAGBQJY69RqAAoJEKJq8VjVbt2pm5sP/1Kvin+smArIQgRFUa2WorVJ
4qYs5T8xjgv1eJZIJ8l31WVcYhUdW51s9ptV2wozjV+qGgPoga1GYgVucqEXM+pw
wCXFrCceprN2kT2ElCFLGc9DRkpM0OVxbnvxHXdMyEdfm7HZbo05J2EnqtlAr1CT
3nyrKJDhhdaEw8jHko1e/65rEPOYMGbDKCfheRXYYGezP6bbIQK1vpKBARYykwjJ
HhSSKWRa2+jlsXEHXgY4I/97jol4Z8Jgg6IyeV0KFjtG35uJyhDMBaDrrwq2XzDB
jCBC4LppGLsgTRWMZmrnch8jegRv5NtkRmPGyXpPtg1aNJXwdKEKtwkOr3SjyDvS
hd5/iLUYdNgFBxYl58wZ1tots97xBc2FIbiPyXUupnQGLhBd8etKFOXMSCDZYPNy
ysHbuc6+Iq1qq0wlt6A725nOdbVqLVLq604ZM9c+X28xwNcZtI+hKIfL4UcqFMy9
Noqc+lUEfVUWIWhp9ddM7CiftjOVjKYFx7b3ztHoX/ZpNSopGn5fQ5afbSOX4xMx
/URhkV08/b4qJK8epcH6rwNXJ2NyWc2DIY/IqJeJchZWqJBSkiImM3D80supgVA3
G2EjytlVr5eDT/Pu70sPZbyZx4mdw968kwm4mJS7xcUPrzwFAFlYMis7Ep9Vo3/4
pC3IC9PxqYxKLe2Ra4c7
=Y23O
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.