Re: native dll access error - Attempted to read or write protected memory
- From: hiralparikh@xxxxxxxxx
- Date: 27 Jan 2006 10:49:13 -0800
Hi,
Thanks for your messages, but I am still stuck.
I am moved a step further, though. I was getting the last error message
bcoz I was calling the native function incorrectly. It required a 3rd
parameter by reference that gets populated by the pwd.
But I don't get anything back from the native function. It seems that
the data type doesn't seem to be right because the function is not able
to lookup the server and username.
I am 100% sure that the native call works because the provided test EXE
works.
I have tried passing the foll formats:
int status = getPwd(chArrServer, chArrUser, ref chArrPwd);
int status = getPwd(strServer, strUser, ref strPwd);
int status = getPwd(ptrServer, ptrUser, ref ptrPwd);
Following is a c++ code that works. But I need to do this in my asp.net
2.0/c# app
int pwStatus;
char pwd[256];
char user[256];
char server[256];
pwStatus= getPwd(server, user, pwd);
Ideas???
Thanks,
Hiral
.
- Follow-Ups:
- Re: native dll access error - Attempted to read or write protected memory
- From: Willy Denoyette [MVP]
- Re: native dll access error - Attempted to read or write protected memory
- References:
- native dll access error - Attempted to read or write protected memory
- From: hiralparikh
- Re: native dll access error - Attempted to read or write protected memory
- From: Nicholas Paldino [.NET/C# MVP]
- Re: native dll access error - Attempted to read or write protected memory
- From: hiralparikh
- Re: native dll access error - Attempted to read or write protected memory
- From: Willy Denoyette [MVP]
- native dll access error - Attempted to read or write protected memory
- Prev by Date: Re: System.IO.Compression
- Next by Date: Re: What? C++ or C#? Why? Which?
- Previous by thread: Re: native dll access error - Attempted to read or write protected memory
- Next by thread: Re: native dll access error - Attempted to read or write protected memory
- Index(es):
Relevant Pages
|
Loading