OVH Cloud OVH Cloud

Urgent help required - API's

2 réponses
Avatar
Kathy
Hi All

I have a problem - I have an visual basic application that I am currently
converting to .Net - I have a very necessary function that disconnects users
from files on a specific network drive
I was using the following API's

NetFileEnum (enumerates through the files so that I can find the session of
the specific file I want to disconnect)
NetApiBufferFree
CopyMemory
NetFileClose (disconnects the file session)

However the problem is they have changed the server and the new server has
Windows Server 2003 installed - these api's don't seem to be supported
because it generates no error and connects to the server but cannot seem to
see any files connected - am I wrong or could it be something to do with the
security - is there a way to do this in .Net rather???

This is very urgent please - any help would be appreciated

Regards
K

2 réponses

Avatar
Zoury
Hi Kathy ! :O)

I was using the following API's


<snip>

The APIs you're using are supported by Windows Server 2003.

because it generates no error and connects to the server but cannot seem


to
see any files connected - am I wrong or could it be something to do with


the
security - is there a way to do this in .Net rather???



It could.. but it may also be caused by improper APIs declarations.
Would you show us some code ?

is there a way to do this in .Net rather???



I doubt there is a more efficient .NET-way to accomplish this... maybe
someone around here could tell us more about that.


--
Best Regards
Yanick
Visual Basic MVP
Avatar
Zoury
oh ! and please don't multipost... place all groups you're targeting on the
destination (Newsgroups) line of your newsreader so answers to your question
will show up in all groups posted to..

--
Best Regards
Yanick
Visual Basic MVP