Questions tagged [advapi32]

Anything related to MS Windows Advanced Services API for 32bit systems (part of Windows API), residing in the `advapi32.dll` library. This library provides functions to access Windows registry, to restart the system, to create Windows services and to manage user accounts.

Anything related to MS Windows Advanced Services API for 32bit systems (part of Windows API), residing in the advapi32.dll library. This library provides functions to access Windows registry, to restart the system, to create Windows services and to manage user accounts.

75 questions
0
votes
1 answer

Access Violation in LogonUserW in Python 3

I am writing a Python3 script for someone, that utilizes the advapi dll and its LogonUserW function via ctypes. When running the code in the __init__ function dll_location = find_library("advapi32"); if (dll_location == None): raise…
needoriginalname
  • 703
  • 3
  • 9
  • 27
0
votes
0 answers

How to impersonate logged on user?

I need to impersonate logged on user. It's required because of ps security context. Let me explain. I have one win service. And one dll library with whole logic. And two different clients(.exe and ps) which use this service via dll. When I start…
isxaker
  • 8,446
  • 12
  • 60
  • 87
0
votes
0 answers

How to memorize the ipaddress using CredentialManager?

I have to memorize the username and password and Ipaddress in a wpf applicdation and i try to do it using Credential Manager in the way given at this link: Encrypting credentials in a WPF application It memorizes well the Username and password but…
0
votes
0 answers

VB6 - CreateProcessWithLogonW does not work on Windows 10 - Error Code 740

I have an old VB6 application that I need to maintain. Within the app functionality is a call to CreateProcessWithLogonW which does not work when run on Windows 10 (but runs fine on Windows 7). The error code I'm receiving via a call to…
P_Fitz
  • 819
  • 9
  • 16
0
votes
1 answer

OpenSCManager returns invalid handle when called from .NET V4

I have a .NET VB winforms program that open the service database, after convert from .NET v2 to v4 this stopped working. Function openscmanager from advapi32.dll returns invalid handle when called from VB .NET v4 and above. All works OK compiled…
0
votes
1 answer

Calling EnumServicesStatusEx in Go, memory allocation?

I'm writing an app that interacts with the Windows API from a Windows Service. After loads of help from @chowey here, I sort of got the hang of things and started a basic library which I've put on GitHub here. I've now moved on to "Services", with…
iamacarpet
  • 417
  • 5
  • 13
0
votes
1 answer

Check if user can start service

I just searched a lot in the web but I could not found any help. I have a own windows service and now it should be possible to configure it from my main software. I have no problems with installing, starting, stopping, changing and uninstalling it.…
Florian Berger
  • 329
  • 3
  • 18
0
votes
3 answers

Windows api using jna: The specified procedure could not be found

I need to use RegLoadKey function in my java code by using jna, but I'm getting the following error message: Exception in thread "main" java.lang.UnsatisfiedLinkError: Error looking up function 'RegLoadKey': The specified procedure could not be…
Anthony J.
  • 375
  • 1
  • 5
  • 14
0
votes
1 answer

Run a Program on a Window Service with Logindata c# WinServices

Im writing a App and a service that acts as a Client<->Server system. The Client is Submitting data to the Server and the server is invoking a 3th party App. that works fine until the 3th party App needs to access our Network drives. As long as the…
Venson
  • 1,772
  • 17
  • 37
0
votes
1 answer

Getting security information for remote registry keys?

According to the documentation for API function GetNamedSecurityInfo, it can get information from the following objects: Local or remote files or directories on an NTFS file system Local or remote printers Local or remote Windows services Network…
JCCyC
  • 16,140
  • 11
  • 48
  • 75
0
votes
2 answers

LsaAddAccountRights Custom Action Returning Error Code in Windows Server 2012

I have a custom action which is used to elevate users to be able to log on as a service. This gets run during the installer. It works fine for years on every Windows operating system up until Windows Server 2012. When the below code is run on this…
ED-209
  • 222
  • 1
  • 11
0
votes
1 answer

"The specified network name is no longer available" error using LogonUser() in advapi32.dll DLL Import

I have a C# MVC3 .Net web app using .Net framework 4.0. Within our code we DLLImport advapi32.dll and use the LogonUser() method to Impersonate() a user in order to do FileIO on a shared drive on our network. This has been working just fine until…
MikeTWebb
  • 9,149
  • 25
  • 93
  • 132
0
votes
0 answers

ConvertStringSecurityDescriptorToSecurityDescriptor() returns ERROR_INVALID_SID on Windows 2000 only

I've run into a problem where our code calls ConvertStringSecurityDescriptorToSecurityDescriptor() http://msdn.microsoft.com/en-us/library/windows/desktop/aa376401%28v=vs.85%29.aspx, (strangely MSDN says it's only availble from Windows XP onward,…
JosephA
  • 1,187
  • 3
  • 13
  • 27
0
votes
1 answer

FASM - Adding to Start Up HKCU

I am trying to make my FASM application add itself to the system start up by adding an entry in "SOFTWARE\Microsoft\Windows\CurrentVersion\Run" I am using the following API's: RegOpenKeyExA RegSetValueExA RegCloseKey In advapi32.dll When my code is…
Josh Line
  • 625
  • 3
  • 13
  • 27
-1
votes
1 answer

Invoke process in windows by another user using primary token using JNA

I need to invoke windows process by another user with primary token, using jna (java). I am able to peform: Login with username, domain & password Duplicate token, to generate primary token with dwDesiredAccess set to 33554432 . I'm not sure on the…
Ravi Soni
  • 953
  • 1
  • 7
  • 17
1 2 3 4
5