Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AdvApi32 CredEnumerate marshals error #54

Closed
Herve-M opened this issue Jun 3, 2019 · 5 comments
Closed

AdvApi32 CredEnumerate marshals error #54

Herve-M opened this issue Jun 3, 2019 · 5 comments

Comments

@Herve-M
Copy link

Herve-M commented Jun 3, 2019

Describe the bug
AdvApi32.CredEnumerate call is not functionning, throwing an System.ExecutionEngineException: 'Exception of type 'System.ExecutionEngineException' was thrown.'

What code is involved
AdvApi32.CredEnumerate and after some fast research underlying handle.ToArray

Expected behavior
Returning a array of Credential object.

Other
Some CredAPI could be impr. and a PR is on this way too.

@dahall
Copy link
Owner

dahall commented Jun 3, 2019

Thank you for doing the work on the PR! Would you like me to fix CredEnumerate or will you do that as part of your PR?

@dahall
Copy link
Owner

dahall commented Jun 4, 2019

If you're looking at Vanara.PInvoke.Crypt32, please note that it has been superceded by Vanara.PInvoke.Cryptography.

@dahall
Copy link
Owner

dahall commented Jun 4, 2019

Before working too much on a PR, please look at the fixes I just posted. CREDENTIAL now marshals correctly. My implementation of the CredEnum didn't cast to a pointer before getting the structure. It now does. Those two changes should make the other functions work better.

@Herve-M
Copy link
Author

Herve-M commented Jun 5, 2019

Okay I see that you have fixed/impr. some part as struct CREDENTIAL and CredEnumerate flag param.
Thanks you was faster than me! Will test this fix.

@dahall
Copy link
Owner

dahall commented Jun 9, 2019

Fixed and released in 2.3.11 today

@dahall dahall closed this as completed Jun 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants