ClamWin Free Antivirus Forum Index
ClamWin Free Antivirus
Support and Discussion Forums
Reply to topic
Using ClamWin from C++
xeres


Joined: 12 Jun 2006
Posts: 0
Reply with quote
I should write some piece of code for scanning files against viruses. Is it possible to use ClamWin from C++. If it is, where could I find more info on how to do it?

thnx
View user's profileSend private message
alch
Site Admin

Joined: 27 Nov 2005
Posts: 0
Reply with quote
look at libclamav at https://www.clamav.net (and just a reminder about GPL license terms)
View user's profileSend private message
xeres


Joined: 12 Jun 2006
Posts: 0
Reply with quote
alch wrote:
look at libclamav at https://www.clamav.net (and just a reminder about GPL license terms)


I did, but I didn't find anything there.
View user's profileSend private message
budtse


Joined: 14 Jan 2006
Posts: 0
Location: Belgium
Reply with quote
Here's the link : https://www.clamav.net/doc/0.80/html/node30.html https://www.clamav.net/doc/0.80/html/node30.html
View user's profileSend private message
xeres


Joined: 12 Jun 2006
Posts: 0
Reply with quote
budtse wrote:
Here's the link : https://www.clamav.net/doc/0.80/html/node30.html https://www.clamav.net/doc/0.80/html/node30.html


Thank you very much!
View user's profileSend private message
xeres


Joined: 12 Jun 2006
Posts: 0
Reply with quote
I'm trying to compile this code on windows platform (VS 2003 .NET)
If I comment #include <unistd> which is I believe Unix header, then I can compile my example with a few lines of code, but I'm not able to link it. As far as I can see, there is no libclamav.lib.

Any suggestions are more then welcome.
View user's profileSend private message
alch
Site Admin

Joined: 27 Nov 2005
Posts: 0
Reply with quote
I suggest you look around... It is in the web links on our site:
https://oss.netfarm.it/clamav/
View user's profileSend private message
sherpya


Joined: 22 Mar 2006
Posts: 0
Location: Italy
Reply with quote
yes each package includes fixed clamav.h, lib and dll files,
also when sf's svn decides to become avaiable again, look at
https://svn.sourceforge.net/viewcvs.cgi/clamwin/trunk/clamwind-prototype/exe/profiler.cpp?view=markup&rev=235 https://svn.sourceforge.net/viewcvs.cgi/clamwin/trunk/clamwind-prototype/exe/profiler.cpp?view=markup&rev=235
it's the code we use to profile the scanner before making a profile guided build,
it scans system32 directory using libclamav api and it has no external dependancies

you must check the return code of cl_scandesc, and virname will have the virus name if found

return codes from clamav.h
Code:

/* return codes */
#define CL_CLEAN   0   /* virus not found */
#define CL_VIRUS   1   /* virus found */
View user's profileSend private message
Lai_mason


Joined: 09 Mar 2007
Posts: 0
Location: Taiwan
Reply with quote
alch wrote:
I suggest you look around... It is in the web links on our site:
https://oss.netfarm.it/clamav/


hi,
I want do some applications on clamAV, and i met some problems. I have downloaded the source codes from https://w32.clamav.net/, but the codes can not be compiled in VC 6.0 environment. Then i viewed your website and downloaded clamav-win32-vc6-devel.7z. But i still can not understand how to do applications through the 7z file. Please tell me how to develope applications on ClamAV or where i can find resource to doing this.

Thanks and have a nice day.
Best regards.
Mason
View user's profileSend private message
alch
Site Admin

Joined: 27 Nov 2005
Posts: 0
Reply with quote
please do a google search before posting:
https://www.google.com/search?q=7z
View user's profileSend private message
Lai_mason


Joined: 09 Mar 2007
Posts: 0
Location: Taiwan
Reply with quote
alch wrote:
please do a google search before posting:
https://www.google.com/search?q=7z


I have extracted the the file.
Sorry for not mentioned at the post.
View user's profileSend private message
Using ClamWin from C++
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 1  

  
  
 Reply to topic