Questions tagged [netapi32]

27 questions
4
votes
1 answer

How do I manage Windows User Accounts in Go?

I need to be able to manage Windows Local User Accounts from a Go application and it appears that without using CGo, there are no native bindings. My initial search led me to people saying it was best to use "exec.Command" to run the "net user"…
iamacarpet
  • 417
  • 5
  • 13
3
votes
1 answer

NetValidatePasswordPolicy issue on XP

My project has a requirement that it needs to check the password complexity before create the new account. My code looks like: NET_API_STATUS status; NET_VALIDATE_PASSWORD_CHANGE_INPUT_ARG inputArg = {0}; NET_VALIDATE_OUTPUT_ARG* pOutputArg =…
user001
  • 444
  • 5
  • 10
3
votes
0 answers

How to get current connections to resources on a server with C# (similar to output from the "net file" command)

In command prompt, if net file is executed, it shows the resources that are open over any shared folders and it also shows the user name that is accessing the resource. Example: The same information can be viewed from Computer Management…
slayernoah
  • 4,382
  • 11
  • 42
  • 73
2
votes
1 answer

Where does NetServerEnum get its list of machines from?

Where does NetServerEnum() get its list of machines from? Does it use the computer browser service or will it use AD as a preference if AD is available? Links: NetServerEnum on MSDN NetServerEnum on PInvoke Decription of the Computer Browser…
Ed Guiness
  • 34,602
  • 16
  • 110
  • 145
2
votes
1 answer

Delete Security Support Package

so im working on a powershell script to manage security Support Providers for specialized controls. currently i have the script working to ADD a SSP, but when i try and change the script to DELETE a ssp, it breaks. Here is the code: $DynAssembly…
m2abrams15
  • 31
  • 5
1
vote
2 answers

Get permissions of a file or folder

Iam trying to get permissions on file/folder for current user. I found nice article about it here. I have tried to run this program but I got few erros and I dont know where I can find solutions to them. I tried to make my own version. Unfortunately…
user1042321
  • 45
  • 1
  • 9
1
vote
2 answers

Call Monitor using C# TAPI

I need to create a program to monitor activity of phone call.And get information about the calls, like number and Name. I'm not strong with TAPI code and C#, so hope that anybody can help me, I'm desperate. I have this code where I try to detect…
Nancy
  • 11
  • 1
  • 4
1
vote
1 answer

NetFileEnum returns ERROR_MORE_DATA

Attempting to retrieve a large list of open files from a file server returns the ERROR_MORE_DATA value (Error number 234), but works fine when dealing with only a small list of files (seems to return around 84 entries). This code is based upon the…
nicad49
  • 23
  • 3
1
vote
2 answers

code to identify the number

I got one problem while doing one TAPI application based project in C#. I'm using ITAPI3.dll My problem is.. i'm not getting incoming call information. To get the incoming call information, i'm using the get_callinfo function, but it is showing…
user301133
  • 117
  • 1
  • 1
  • 3
1
vote
1 answer

Enumerate machine with Windows OS in LAN

I want to enumerate all Windows based machines in the network in workgroup. For that I'm using NetApi32.dll functions. In my network, I've windows, mac and linux OS installed. How can we filter out Windows Machines only. Given below is the code I am…
Abhay
  • 87
  • 1
  • 6
1
vote
1 answer

NetServerEnum block when thread is terminated externaly

(Working in Win32 api , in C environment with VS2010) I have a two thread app. The first thread forks the second and waits for a given interval - 'TIMEOUT', and then calls TerminateThread() on it. Meanwhile, second thread calls NetServerEnum(). It…
1
vote
1 answer

Windows Netapi32

I am currently accessing the Windows Netapi32 using Netapi32.lib, currently I am using c++ to access the api. I am having trouble retrieving the computer name, currently one the NetFileEnum here on FILE_INFO_3 structure here. In the documentation it…
user1786283
1
vote
1 answer

fatalExecutionEngineError when using Windows API

I am trying to use a Windows API .dll called netapi32.dll to manipulate DFS shares. We are using DFS on Windows Server 2008 R2, and I am using .NET 4.0. I've never used something like this before in .NET, but I am having trouble understanding what…
tedski
  • 2,271
  • 3
  • 27
  • 48
1
vote
3 answers

Need a way to change a remote user password - NetUserChangePassword fails with 2245

I am trying to call NetUserChangePassword to change the passwords on a remote computer. I am able to change the password when I log-in to the machine, but I can't do it via code. The return value is 2245 which equates to the Password Being too…
Vaccano
  • 78,325
  • 149
  • 468
  • 850
1
vote
2 answers

Can anyone help me with the Windows API NetApi32?

I am trying to get a list of shares on a specific machine. So I decided to use the Windows API NetApi32.dll. Here is my code snippet: Dim svr As String = Environment.MachineName Dim level As Integer = 2 Dim sharesRead As Integer, totalEntries As…
Dekryptid
  • 1,062
  • 1
  • 9
  • 21
1
2