I've just started playing around with Win32::API, and I'm trying to import the
"DSBrowseForContainerW" function from dsuiext.dll (
http://msdn.microsoft.com/library/en-us/ad/ad/dsbrowseforcontainer.asp ), but I
can't seem to get it working. Can someone tell me what's wrong with the
following code segment? $! is always being set to "Unknown error". Thanks!
---------
use Win32::API;
typedef Win32::API::Struct DSBROWSEINFOW => qw{
DWORD cbStruct;
HWND hwndOwner;
LPCTSTR pszCaption;
LPCTSTR pszTitle;
LPCWSTR pszRoot;
LPWSTR pszPath;
ULONG cchPath;
DWORD dwFlags;
BFFCALLBACK pfnCallback;
LPARAM lParam;
DWORD dwReturnFormat;
LPCWSTR pUserName;
LPCWSTR pPassword;
LPWSTR pszObjectClass;
ULONG cchObjectClass;
};
Win32::API->Import('dsuiext', 'int DSBrowseForContainerW(LPDSBROWSEINFOW
pInfo)');
print $! . "\n";
my $bInfo = Win32::API::Struct->new( 'DSBROWSEINFOW' );
$bInfo->{cbStruct} = $bInfo->sizeof;
$bInfo->{pszCaption} = "Browse for a Container";
$bInfo->{pszTitle} = "Select an Active Directory container.";
$bInfo->{lParam} = 0;
DSBrowseForContainerW($bInfo);
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs