Solved

IDE Units and Logical Units

Posted on 2002-07-23
3
235 Views
Last Modified: 2010-05-02
How can I discover which letter (logical unit, like C:, D:, etc) is IDE Primary Master, Primary Slave, etc. I already know how to use File System Object but I think it can't show me what I want. In addition, I would say that I have a routine that I can pass a number as a parameter which represents IDE sequence and it returns me all the information about the disk. Of course I know that I can have more than one partition in the same disk. The goal here is to associate the Hard Disk Serial Number with the logical unit from where the application has started. This is necessary because I have developered a mechanism associated with ActiveLock which returns a different System Code for each instalation and then the liberation key can be generated. The problem is, if a smart user knows how to use a tool like the Norton Ghost he can fool this mechanism. So, what I intend to do to avoid this is to save the the hd serial number from where the app has run for the first time (based in the logical drive letter) and then to compare against the hd serial number each time the app runs.  

Thanks in advance for any help
0
Comment
Question by:tomcruisew
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 10

Expert Comment

by:aeklund
ID: 7180758
Private Declare Function GetVolumeInformation Lib "kernel32" Alias "GetVolumeInformationA" _
  (ByVal lpRootPathName As String _
  , ByVal lpVolumeNameBuffer As String _
  , ByVal nVolumeNameSize As Long _
  , lpVolumeSerialNumber As Long _
  , lpMaximumComponentLength As Long _
  , lpFileSystemFlags As Long _
  , ByVal lpFileSystemNameBuffer As String _
  , ByVal nFileSystemNameSize As Long) As Long

Private Sub Main()
  Dim sDriveLetter As String
  sDriveLetter = "C:\"
 
  Dim lError As Long
  Dim sName As String
  Dim lSize As Long
  Dim lSerNum As Long
  Dim lMaxLen As Long
  Dim lSysFlag As Long
  Dim sFileSys As String
  Dim lFileSys As Long
 
  lError = GetVolumeInformation(sDriveLetter, sName, lSize, lSerNum, lMaxLen, lSysFlag, sFileSys, lFileSys)
  MsgBox lSerNum
 
End Sub
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 8040416
Hi tomcruisew,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Save as PAQ -- No Refund.

tomcruisew, Please DO NOT accept this comment as an answer.
EXPERTS: Post a comment if you are certain that an expert deserves credit.  Explain why.
==========
DanRollins -- EE database cleanup volunteer
0
 

Accepted Solution

by:
SpideyMod earned 0 total points
ID: 8095738
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question