473,651 Members | 2,994 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Application error using LogonUserA (advapi32.dll)

Can anyone help me with the following problem :
I'm just trying to have the API call LogonUserA run correctly.
Each run ends up with the following message :
"The instruction at 0x77.. referenced memory at 0xcccc. The memory
could not be written.

I'm using VC++ 6.0 on WIN200.

I've tried both way of linking with advapi32.dll, I mean at load time
and dynamically at run time, both crash.
A call to GetUserNameA just before works fine.
GetUserNameA ((LPTSTR)UserNa me, &lzSize);
Just after I have the following :
UserValid = LogonUserA((LPT STR)UserName,
lpszDomain,(LPT STR)UserPasswd, dwLogonType,dwL ogonProvider, phToken
);
Has anyone experienced a similar problem ? Any idea or suggestion
welcome
de******@misys. com
Jul 19 '05 #1
1 3987
Blacksheep wrote:
Can anyone help me with the following problem :
I'm just trying to have the API call LogonUserA run correctly.

[SNIP]

Please read this: http://www.slack.net/~shiva/welcome.txt

--
WW aka Attila
Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
5829
by: Mary | last post by:
Hello, I am having a problem with the cl compiler. I have written a C class (RegConnect.c) which uses Win32 API functions such as RegOpenKey, RegCloseKey etc. Initially when I was trying to create a dll, using the cl compiler I was getting many unresolved external errors, Example 1 below (8 in total, 7 to do with the registry function calls and 1 from wsprintfA call) as I hadn't included the AdvAPI32.lib file. So I created a LINK...
3
11804
by: Gustavo L. Fabro | last post by:
Greetings! I'm testing VS 2005 Beta 2, and I've compiled a program that runs just fine on my computer (where VS is installed). I've tried to run this same program on another computer (after having installed MS .NET Framework 2.0 Beta 2 on it, from http://www.microsoft.com/downloads/details.aspx?FamilyId=7ABD8C8F-287E-4C7E-9A4A-A4ECFF40FC8E&displaylang=en), but got the following message:
6
2390
by: Erez Shor | last post by:
Hi, I need to build and asp page which access a remote windows server's registry and create a registry key. In order for the ASP page to be able to access the registry on the remote server I need it to run using credentials supplied by the user. When using basic authentication this is not an issue since the user has to provide a user name and password. But I don't want to use basic authentication so I created a login form and I am using...
3
2915
by: Lumpierbritches | last post by:
I have an application my partner wrote that would allow an autoresponse to any Mapi compliant email that apparently in .Net won't, can someone assist me with fixing this? Here is the code: Utilities Module: Option Explicit Option Base 1
7
6681
by: Ralf Gedrat | last post by:
Hello! I have some Vb.Net applications, which are terminated at indefinite times without message. If I call in the program regulated system.GC.Collect, then the program is terminated here sporadically without message. It's not possible to debug in visual studio, i get no exceptions (application is terminated unexpectedly without message).
3
5022
by: bwalke | last post by:
I was wondering how the Process.Start() command can be used in a VB.NET Web Application. I have used this command in a Windows Application before successfully. I want the client side to envoke the .exe application by clicking a button and want the .exe to run on the server. I have read in groups that it is not possible and also have heard that it is possible in Web Apps. Here is what I have tried so far in the web app... Dim myProcess...
6
3245
by: Steve4D | last post by:
With an ASP.NET application, I try to run an external program (like EXE, BAT) with a logon of an another user. I use CreateProcessWithLogonW from API "advapi32.dll" . When my ASP.NET application launches my EXE program via CreateProcessWithLogonW, the process starts but an error appears "Application failed to initialze" : why ?
0
2064
by: =?Utf-8?B?c2po?= | last post by:
Writing an app in VB.NET 2005 which needs to load a registry hive. As far as I can determine, there isn't any managed code to do this (sigh), so I need to revert to APIs. Additional privileges need to be added to the current process token before RegLoadKey can be used successfully. This exception is thrown when I call AdjustTokenPrivileges: "The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))". I'm unable...
15
11059
by: eltonchew | last post by:
Hi, We have an inhouse developed VB.NET Windows application which runs successfully only when the user is given a local administrator rights. Without which, it fails to start. There isn't anything reported on the event viewer. Giving the user full access to C:\ drive also doesn't do the trick. Unfortunately, we do not have the code of this application and hence cannot view what the application is trying to access. Note that we have both...
0
8361
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8278
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8807
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8466
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8584
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5615
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4144
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4290
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1912
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.