Hi Tomas, it works fine in Win2000/XP, but I need it in Win98/ME too.
'NetShareGetInfo()' in linked to 'netapi32.lib' in NT/XP and 'svrapi.lib' in
98/ME, 'NetApiBufferFree()' is linked to 'netapi32.lib'.
My app compiles fine in Win98, but it searches 'NetShareGetInfo()' in
netapi32.dll and my app does not run.
Please, some advice to solve this.
Thansk in advance.
William GS
"Tomas Restrepo (MVP)" wrote:
William,
Hello. How can I determine if a folder is shared? if it is shared, how can
I
retrieve the resource shared name?
I have:
Folder name ==> C:\WORKS\DOCS
Resoure shared name ==> DOCUMENTS
With 'WNetOpenEnum()' and 'WNetEnumResource()' I can get
'\\MYPC\DOCUMENTS'
but there is not relation with real name folder.
Having the shared name you can get the local folder path using
NetShareGetInfo(), but more useful in your case is WNetGetUniversalName(),
which can do the opposite. Here's an example of NetShareGetInfo(), btw:
http://win32.mvps.org/network/nsgi.cpp
--
Tomas Restrepo
to****@mvps.org
http://www.winterdom.com/