🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.deployment
Article #265

Re: software protection

#265
From: zhan wei ming
Date: Fri, 01 Oct 2004 16:03
49 lines
2230 bytes
sorry, I didn't express my question clearly. I will try to make things more
clear.
parts of the codes are as below,

         if ( DeviceIoControl (hPhysicalDriveIOCTL,
IOCTL_STORAGE_QUERY_PROPERTY,
                   & query,
                   sizeof (query),& buffer,sizeof (buffer),
                   & cbBytesReturned, NULL) )
         {
            //get HD serial number here
         }
         else
        {
            DWORD err = GetLastError ();
        }

my problem is: when the program executes function DeviceIoControl(...), it
always return false, so the codes that get HD serial number are jumped.

any hints?

best regards,
zhan wei ming

"Vladimir Stefanovic" <spam@not.needed> wrote in message
news:415d4091@newsgroups.borland.com...
> >           else
> >          {
> >                 // my problem always enter here!!!
> >                 DWORD err = GetLastError ();
> >           }
> >
>
>
> You can completely delete this section ...
>
>           else
>          {
>                 // my problem always enter here!!!
>                 // DWORD err = GetLastError ();
>           }
>
>
>  Best regards,
>  Vladimir Stefanovic
>
>
>
Technical Details
Message-ID: <415d7fd9@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <4156396e@newsgroups.borland.com> <41565a41@newsgroups.borland.com> <41598a43@newsgroups.borland.com> <415afa73@newsgroups.borland.com> <415c36a7@newsgroups.borland.com> <415d4091@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: f8e54,49c3dd80669ecd88
X-Google-Attributes: gidf8e54,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "zhan wei ming" <zhanweiming@hotmail.com>
Newsgroups: borland.public.cppbuilder.deployment
References: <4156396e@newsgroups.borland.com> <41565a41@newsgroups.borland.com> <41598a43@newsgroups.borland.com> <415afa73@newsgroups.borland.com> <415c36a7@newsgroups.borland.com> <415d4091@newsgroups.borland.com>
Subject: Re: software protection
Date: Sat, 2 Oct 2004 00:03:19 +0800
Lines: 51
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 211.136.158.51
Message-ID: <415d7fd9@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1096646617 211.136.158.51 (1 Oct 2004 09:03:37 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail