🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #3349

Re: Create a shared network folder. part 2?

#3349
From: Remy Lebeau (TeamB)
Date: Wed, 28 Jun 2006 22:09
33 lines
1970 bytes
"nivekski" <nevikski@tisconi.com> wrote in message
news:44a2eeda@newsgroups.borland.com...

> The code below now compiles fine but on running I get
> error 53 yet c:\DTT does exist, any thoughts please folks?

53 is ERROR_BAD_NETPATH.  You are specifying the remote machine's name as
the share where you should be specifying the name of the actual share that
the remote computer has defined.  You are also not including backslashes in
the server name

Try this instead (untested):

    void __fastcall TmainForm::create_share_drive(void)
    {
        SHARE_INFO_2 p = {0};
        DWORD parm_err = 0;

        p.shi2_netname = TEXT("TheShareName");
        p.shi2_type = STYPE_DISKTREE; // disk drive
        p.shi2_remark = TEXT("TheShareName test");
        p.shi2_permissions = ACCESS_ALL;
        p.shi2_max_uses = -1;
        p.shi2_current_uses = 0;
        p.shi2_path = TEXT("C:\\DTT");
        p.shi2_passwd = NULL; // no password

        NetShareAdd(TEXT("\\\\DTTServer"), 2, (LPBYTE) &p, &parm_err);
    }


Gambit
Technical Details
Message-ID: <44a2fe9f$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <44a2eeda@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,8d849c55404187ad
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <44a2eeda@newsgroups.borland.com>
Subject: Re: Create a shared network folder. part 2?
Date: Wed, 28 Jun 2006 15:09:28 -0700
Lines: 35
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: 68.69.17.41
Message-ID: <44a2fe9f$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1151532703 68.69.17.41 (28 Jun 2006 15:11:43 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail