Click here to Skip to main content
16,022,418 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Below vb6.0 Code:-
Private Declare Function NetShareAdd Lib "netapi32" _
(ByVal servername As Long, _
ByVal level As Long, _
buf As Any, _
parmerr As Long) As Long

But i can't transfer to vb.net
How do will possible???
Please supply to proper coding..
Posted

1 solution

Sorry this is what it should be according to http://pinvoke.net/default.aspx/netapi32.NetShareAdd[^]

C#
[DllImport("Netapi32.dll")]
    private static extern uint NetShareAdd(
        [MarshalAs(UnmanagedType.LPWStr)] string strServer,
        Int32 dwLevel,
        ref SHARE_INFO_502 buf,
        out uint parm_err
    );
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900