Find Jobs
Hire Freelancers

Need hard driver serial number on shared computer with VB6

$30-250 USD

Teljesítve
Kiadva ekkor: körülbelül 3 évvel ezelőtt

$30-250 USD

Teljesítéskor fizetve
We have a VB6 app which uses the computer's C: drive serial number for security. We have the App installed on computer B, and it runs fine on computer B. The app can read the serial number from computer B's C drive. When accessing the app from computer A on shared computer B over the LAN, the app reads the C: driver serial number from computer A, not computer B. I need to know how to read the C: driver serial number from computer B, the computer with the app installed. Here's the code I use: Public Function GetSerialNumber( _ ByVal sDrive As String) As Long If Len(sDrive) Then If InStr(sDrive, "\\") = 1 Then ' Make sure we end in backslash for UNC If Right$(sDrive, 1) <> "\" Then sDrive = sDrive & "\" End If Else ' If not UNC, take first letter as drive sDrive = Left$(sDrive, 1) & ":\" End If Else ' Else just use current drive sDrive = vbNullString End If ' Grab S/N -- Most params can be NULL Call GetVolumeInformation( _ sDrive, vbNullString, 0, GetSerialNumber, _ ByVal 0&, ByVal 0&, vbNullString, 0) End Function
Projektazonosító: 29964538

A projektről

6 ajánlat
Távolról teljesíthető projekt
Aktiválva: 3 évvel ezelőtt

Szeretne pénzt keresni?

A Freelancer oldalán történő árajánlatadás előnyei

Határozzon meg költségvetést és időkeretet
Kapja meg fizetését a munkáért
Vázolja ajánlatát
Ingyen regisztrálhat és adhat árajánlatot munkákra
Neki odaítélve:
Felhasználó avatár
Hello, I assume in this bit of your details - > ' Grab S/N -- Most params can be NULL Call GetVolumeInformation( _ sDrive, vbNullString, 0, GetSerialNumber, _ ByVal 0&, ByVal 0&, vbNullString, 0) End Function the code is actually calling the windows API GetVolumeInformation function in kernel32. If you're not familiar with this, you'll probably see something like the following, in the middle of a line very near the top of the page - GetVolumeInformation Lib "kernel32" If so, you are not actually getting the hard drive serial number but the volume serial number. I.e. it changes if the drive is formatted. Anyhow, I guess this isn't causing you any problems so the distinction doesn't really matter. The (volume) serial number is available from a network drive (a path like \\machineB\share, hence why looking for \\ in sDrive), which is how I assume Machine A is connecting to Machine B. I just gave this a try over here and I found for unc paths, GetVolumeInformation doesn't return anything. It does work fine if I map that same unc path to a drive letter. I guess this is what you are seeing. This shouldn't be that difficult to fix.
$150 USD 7 napon belül
5,0 (2 értékelés)
2,8
2,8
6 szabadúszó adott átlagosan $175 USD összegű árajánlatot erre a munkára
Felhasználó avatár
Hi, There are somethings to do before running drive serial get function. some details required so, i can provide solution. If you need ex: 5 PCs to run with one serial number you must put in connection. I am happy to help. Thanks
$200 USD 1 napon belül
5,0 (22 értékelés)
4,2
4,2
Felhasználó avatár
Hi there, I am a Professional Software Developer with 5+ years experience. I've worked with C/C++, VB, Python, PHP, JavaScript etc. Let's meet in chat so that we can discuss all the details of the project. I'm ready to start immediately. Thanks.
$140 USD 2 napon belül
5,0 (13 értékelés)
3,7
3,7
Felhasználó avatár
Thanks for your sharing your issue. How can i help you? I have rich experiences in VB6 (over 7 years). Let's discuss further more. Thanks
$140 USD 7 napon belül
0,0 (0 értékelés)
0,0
0,0

Az ügyfélről

UNITED STATES zászlója
Livonia, United States
5,0
116
Fizetési mód hitelesítve
Tagság kezdete: jan. 3, 2004

Ügyfél-hitelesítés

Köszönjük! E-mailben elküldtük a linket, melyen átveheti ajándék egyenlegét.
E-mailje elküldése során valami hiba történt. Kérjük, próbálja újra.
Regisztrált Felhasználók Összes Közzétett Munka
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Előnézet betöltése
Hozzáférést adott a helymeghatározáshoz.
Belépési munkamenete lejárt, és kijelentkeztettük. Kérjük, lépjen be újra.