HighTechTalks DotNet Forums  

Re: few problems while calling NetShareAdd from C#?

Dotnet Framework (Interop) microsoft.public.dotnet.framework.interop


Discuss Re: few problems while calling NetShareAdd from C#? in the Dotnet Framework (Interop) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
SvenC
 
Posts: n/a

Default Re: few problems while calling NetShareAdd from C#? - 06-11-2007 , 06:04 AM






Hi giddy,

Quote:
hi,

This is the first time i'm calling win32 functions from C#(i did call
MessageBox! though =P) and i think i've done my homework with the
memory management , the call however does not succeed , it fails with
an error.

It fails with error code : 127 (which i cant find in LMErr.h)

I probably doing something wrong with mem allocs. Heres the code:

http://gidsfiles.googlepages.com/network_snipped.cs.txt
Checkout www.pinvoke.net

http://www.pinvoke.net/default.aspx/...32.NetShareAdd

--
SvenC


Reply With Quote
  #2  
Old   
SvenC
 
Posts: n/a

Default Re: few problems while calling NetShareAdd from C#? - 06-12-2007 , 04:23 PM






Hi,

Quote:
But somehow , i sucessfully make a share. But i cant open it on the
network. Says i dont have privileges. I set to privleges to ALL.
Please show the exact source you use and the error code.

Quote:
I am using using level 2 with SHARE_INFO_2. Should i use 502?(i'm on
WinXP)
I don't think so.

What OS is the server which hosts the share? Do you really have full access?
Can you connect manually with explorer or net use?

--
SvenC



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.