It doesn't take a program to do that. The registry value
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\
Services\UsbStor
stores that function. Another approach is to prevent rights to \Inf\Usbstor.pnf and \Inf\Usbstor.inf files.
It doesn't take a program to do that. The registry value
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\
Services\UsbStor
stores that function. Another approach is to prevent rights to \Inf\Usbstor.pnf and \Inf\Usbstor.inf files.
'Save Dim ms As New MemoryStream PictureBox1.Image.Save(ms, PictureBox1.Image.RawFormat) Dim strType As String = ToolStripStatusLabel1.Text.Substring(ToolStripStatusLabel1.Text.LastIndexOf("."), 4) Dim arrImage() As Byte = ms.GetBuffer ms.Close() Dim strFileName As String = IO.Path.GetFileName(ToolStripStatusLabel1.Text) Dim connectionString As String = "Data Source=MIKEY-HP\jtsql;Initial Catalog=Images;Integrated Security=True" Dim cnn As New SqlConnection(connectionString) Dim DateFiled As Date = FormatDateTime(Now(), DateFormat.ShortDate) Dim strSQL As String = _ "INSERT INTO ImageTab (ImageData,Type,ImgFileName,DateFiled)" & _ "VALUES (@ImageData,@Type,@Filename,'" & DateFiled & "')" Dim cmd As New SqlCommand(strSQL, cnn) With cmd .Parameters.Add(New SqlParameter("@Filename", SqlDbType.VarChar, 50)).Value = strFileName .Parameters.Add(New SqlParameter("@Type", SqlDbType.VarChar, 10)).Value = strType .Parameters.Add(New SqlParameter("@ImageData", SqlDbType.Image)).Value = arrImage End With Try cnn.Open() cmd.ExecuteNonQuery() cnn.Close() Catch ex As Exception MsgBox(ex.ToString) End Try 'Load Try Me.ImageTabTableAdapter.FillBy(Me.ImagesDataSet.ImageTab) Catch ex As System.Exception System.Windows.Forms.MessageBox.Show(ex.Message) End Try
An OMR application will require a collection of image zones which you compare with supplied images to determine if an acceptable amount of pixels have been provided in any zone to create a 'hit'. There is usually a user interface to address values in a questionable range. Values that make no sense, such as two marks in a row requiring only one mark, must also be resolved by a user, or predefined rule.