Article View: borland.public.cppbuilder.nativeapi
Article #3346Create a shared network folder. part 2?
From: nivekski
Date: Wed, 28 Jun 2006 21:04
Date: Wed, 28 Jun 2006 21:04
31 lines
1549 bytes
1549 bytes
Hi
The code below now compiles fine but on running I get error 53 yet c:\DTT
does exist, any thoughts please folks?
void __fastcall TmainForm::create_share_drive(void)
{
NET_API_STATUS res;
SHARE_INFO_2 p;
DWORD parm_err = 0;
wchar_t *pFolder = L"C:\\DTT";
wchar_t *pShare = L"DTTServer";
p.shi2_netname = pShare;
p.shi2_type = STYPE_DISKTREE; // disk drive
p.shi2_remark = pShare;
p.shi2_permissions = ACCESS_ALL;
p.shi2_max_uses = -1;
p.shi2_current_uses = 0;
p.shi2_path = pFolder;
p.shi2_passwd = NULL; // no password
res=NetShareAdd(pShare, 2, (LPBYTE) &p, &parm_err);
}
--
Nevikski
www.kevsbox.com
Technical Details
Message-ID:
<44a2eeda@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.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-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,8d849c55404187ad,start X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "nivekski" <nevikski@tisconi.com> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Create a shared network folder. part 2? Date: Wed, 28 Jun 2006 22:04:28 +0100 Lines: 33 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: <44a2eeda@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1151528666 212.159.46.118 (28 Jun 2006 14:04:26 -0700) Path: arc1-ca.pugleaf.net!g2news2.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