Vista

There are 2 entries for the tag Vista

Access Violation in DsBrowseForContainer on Windows Vista. The code

Since my post about DsBrowseForContainer problem in Vista, I have been asked several times to provide the code on solution. So here we go – below is the class that I use to browse for OU container, it is written to .NET 3.5, but can be easily adapted to earlier versions as well: public sealed class OUPickerDialog{ public OUPickerDialog() { Caption = "The container picker"; Title = "Select a container:"; } #region Imports ...

Access Violation in DsBrowseForContainer on Windows Vista

I have used the example from SDK for browsing Active Directory (can be found here) and in Vista the method DsBrowseForContainer throws AccessViolationException in .NET. While testing, I have created a new MFC (C++) project and added a code for calling to DsBrowseForContainerW (similar to above). That worked perfectly, which means the problem is not in Vista, rather in .NET or marshalling in .NET. Checking the structure returned from the function call, I have found that previously NULL "pszRoot" member is now filled in! Means DsBrowseForContainerW has allocated a memory for it and passed back to me. Looks like marshaller...