Usb Security Software

Creating a Usb Security Software

Page 1 of 1

7 Replies - 2902 Views - Last Post: 19 May 2010 - 06:06 PM Rate Topic: -----

#1 Ville_09  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 34
  • Joined: 18-May 10

Usb Security Software

Posted 18 May 2010 - 06:38 PM

im starting to create a usb security software
im searching if how the usb will be detected by the program so once it is detected i can now put the code to scan the drive.. tnx..
Is This A Good Question/Topic? 0
  • +

Replies To: Usb Security Software

#2 no2pencil  Icon User is offline

  • Admiral Fancy Pants
  • member icon

Reputation: 5322
  • View blog
  • Posts: 27,232
  • Joined: 10-May 07

Re: Usb Security Software

Posted 18 May 2010 - 06:42 PM

I wrote this tutorial for C/C++, but it would use the same Windows API commands to gather the drives & drive types on the system.
Was This Post Helpful? 0
  • +
  • -

#3 Ville_09  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 34
  • Joined: 18-May 10

Re: Usb Security Software

Posted 18 May 2010 - 07:23 PM

uhm tnx for the codes.. but im writing it in vb.net..

when i tried to convert that code in vb i got so many errors... uhm the software needs to know that a usb is detected and then it will automaticaly scan that drive i already have the malware and virus signature database..
Was This Post Helpful? 0
  • +
  • -

#4 no2pencil  Icon User is offline

  • Admiral Fancy Pants
  • member icon

Reputation: 5322
  • View blog
  • Posts: 27,232
  • Joined: 10-May 07

Re: Usb Security Software

Posted 18 May 2010 - 07:28 PM

I know you are writting this for VB.NET.

I provided a link to the tutorial for an example of the Windows API functions GetLogicalDriveStrings & GetDriveType.
Was This Post Helpful? 0
  • +
  • -

#5 Ville_09  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 34
  • Joined: 18-May 10

Re: Usb Security Software

Posted 18 May 2010 - 07:41 PM

ooo... i see.. ok im trying it now
but how can i write the windows.h in vb.net style
is it possible sir..?
Was This Post Helpful? 0
  • +
  • -

#6 bocaccio  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 93
  • Joined: 06-May 10

Re: Usb Security Software

Posted 19 May 2010 - 09:17 AM

I am curious of how you would do this too. I'd get you to tell me how once you are successful so i could use it too. But....I think he expects you to know how to convert C++ to VB.NET. He shows you what works in C++ and thinks that you will be able to convert on your own :dangole:
Was This Post Helpful? 0
  • +
  • -

#7 JITHU  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 62
  • View blog
  • Posts: 201
  • Joined: 02-July 07

Re: Usb Security Software

Posted 19 May 2010 - 09:46 AM

View PostVille_09, on 19 May 2010 - 02:41 AM, said:

ooo... i see.. ok im trying it now
but how can i write the windows.h in vb.net style
is it possible sir..?



If you want to know how to use those Win32 functions in your VB.Net application,
check this pages here:

GetDriveType
GetLogicalDriveStrings

There is also some sample code in that site. I think, now you are able to fully translate no2pencil's tutorial code and use it in your VB.net app.
Was This Post Helpful? 1
  • +
  • -

#8 Ville_09  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 34
  • Joined: 18-May 10

Re: Usb Security Software

Posted 19 May 2010 - 06:06 PM

Public Class Form1

Private Sub Form1_Load(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles MyBase.Load
Private Declare Function GetDriveType Lib "kernel32" _ Alias "GetDriveTypeA" (ByVal lpRootPathName As String) As Integer
End Sub


the keyword DECLARE is not a valid identifier
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1