Article View: borland.public.cppbuilder.nativeapi
Article #12767Re: How to : use INetSharingManager
From: Vladimir Afanasyev
Date: Mon, 17 Nov 2003 12:00
Date: Mon, 17 Nov 2003 12:00
26 lines
1799 bytes
1799 bytes
Hi,
"PaoloItaly" <paolo@sirius-es.it> wrote:
>I've Builder 5 that don't include Netcon.idl and HNetCfg.dll
>How i can found these files compatible with Builder ?
>
>Thanks in advance
>
INetSharingManager supports IDispatch interface so you can try
to use it via late binding.
Variant DispIn=Variant::CreateObject("HNetCfg.HNetShare.1");
//HNetCfg.HNetShare.1 - it is ProgId and you can find this string
//in Registry (by RegEdit)
Variant EveryColl=DispIn.Exec(PropertyGet("EnumEveryConnection
"));
//EveryColl - it is Enum interface (IEnumVariant), etc, etc, etc...
I can't continue and even test this code because have no XP
but sure that it possible to do this way. Next refference
is key to this way:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ics/ics/retrieving_the_properties_of_a_connection_vbscript_.asp
Vladimir.
Technical Details
Message-ID:
<3fb8c65a$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3fb4a47d$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,2a797d967fa560fb X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-11-17 05:09:14 PST From: "Vladimir Afanasyev" <avv@systema.kiev.ua> Sender: "Vladimir Afanasyev" <avv@systema.kiev.ua> Reply-To: "Vladimir Afanasyev" <avv@systema.kiev.ua> Subject: Re: How to : use INetSharingManager Newsgroups: borland.public.cppbuilder.nativeapi X-User-Info: 212.82.216.226 X-Forwarded-For: 192.168.0.147 References: <3fb4a47d$1@newsgroups.borland.com> NNTP-Posting-Host: 207.105.83.66 Message-ID: <3fb8c65a$1@newsgroups.borland.com> Date: 17 Nov 2003 05:00:10 -0700 X-Trace: newsgroups.borland.com 1069074010 207.105.83.66 (17 Nov 2003 05:00:10 -0700) Lines: 28 Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail