🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Create a shared network folder. part 2?

#3353
From: nivekski
Date: Thu, 29 Jun 2006 07:22
43 lines
2259 bytes
Ah, thanks

-- 
Nevikski
www.kevsbox.com
"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message 
news:44a2fe9f$1@newsgroups.borland.com...
>
> "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: <44a37fa4@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news.glorb.com!newsgate.cistron.nl!xs4all!feeder.news-service.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <44a2eeda@newsgroups.borland.com> <44a2fe9f$1@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: "nivekski" <nevikski@tisconi.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <44a2eeda@newsgroups.borland.com> <44a2fe9f$1@newsgroups.borland.com>
Subject: Re: Create a shared network folder. part 2?
Date: Thu, 29 Jun 2006 08:22:10 +0100
Lines: 45
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 212.159.46.118
Message-ID: <44a37fa4@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1151565732 212.159.46.118 (29 Jun 2006 00:22:12 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news.glorb.com!newsgate.cistron.nl!xs4all!feeder.news-service.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail