ClamWin Free Antivirus Forum Index
ClamWin Free Antivirus
Support and Discussion Forums
Reply to topic
Onix Hoque


Joined: 23 Apr 2013
Posts: 0
Location: Bangladesh
Reply with quote
Did you mean compiling ClamAV individually? I am just using ex1.c and included clamav.h and libclamav.lib. I'm also using the release mode and Visual Studio 2010, but no luck yet :/

I looked over the net and
Quote:
https://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/54f97051-0882-4341-abb8-9332ca8bf8f3/
this scenario almost matches mine, but I don't understand how they've solved the issue :/ :/
View user's profileSend private message
xqrzd


Joined: 18 Feb 2013
Posts: 0
Reply with quote
Did you compile libclamav in release mode though? Debug assertions shouldn't be included in release mode.
View user's profileSend private message
Onix Hoque


Joined: 23 Apr 2013
Posts: 0
Location: Bangladesh
Reply with quote
You, my friend, are awesome!!! Very Happy Very Happy Very Happy

https://postimg.org/image/niwt4d4qr/

Two things:

1) I've used
Quote:
fd = open("C:\\notepad.exe", O_RDONLY)
, here, there is double backslash, in my project, I generate file paths which are in normal format (i.e.: C:\notepad.exe), if i use the variable directly in virus scaning, say open(Path, O_RDONLY), would it be ok? or i have to add another backslash?

2) Looks like the database directory is now fixed, i.e: cl_load("D:\\AV\\AV\\AV\\AV\\Release\\database\\", engine, &sigs, CL_DB_STDOPT))...is there any way that it would append '\\Release\\database' to the current exe path?

Thanks a ton man! I cannot tell you how grateful I am to you Smile I really appreciate it.
View user's profileSend private message
xqrzd


Joined: 18 Feb 2013
Posts: 0
Reply with quote
The extra backslash is used to escape the backslash. You generally only need to escape backslashes in hardcoded strings.
On Windows, you can use GetCurrentDirectory(), and append to that. I don't know about other OS's.
View user's profileSend private message
Onix Hoque


Joined: 23 Apr 2013
Posts: 0
Location: Bangladesh
Reply with quote
Thanks Buddy Smile
View user's profileSend private message
xqrzd


Joined: 18 Feb 2013
Posts: 0
Reply with quote
You're welcome. Good luck on your project.
View user's profileSend private message
Need Help in Developing an Anti-Virus
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 2 of 2  

  
  
 Reply to topic