Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
39a930ab
Commit
39a930ab
authored
Mar 23, 2020
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Mar 24, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
activeds: Implement ADsBuildVarArrayStr.
Signed-off-by:
Dmitry Timoshkov
<
dmitry@baikal.ru
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
79179193
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
130 additions
and
3 deletions
+130
-3
configure
configure
+1
-0
configure.ac
configure.ac
+1
-0
activeds_main.c
dlls/activeds/activeds_main.c
+37
-3
Makefile.in
dlls/activeds/tests/Makefile.in
+5
-0
activeds.c
dlls/activeds/tests/activeds.c
+85
-0
adshlp.h
include/adshlp.h
+1
-0
No files found.
configure
View file @
39a930ab
...
@@ -20106,6 +20106,7 @@ wine_fn_config_makefile dlls/acledit enable_acledit
...
@@ -20106,6 +20106,7 @@ wine_fn_config_makefile dlls/acledit enable_acledit
wine_fn_config_makefile dlls/aclui enable_aclui
wine_fn_config_makefile dlls/aclui enable_aclui
wine_fn_config_makefile dlls/activeds.tlb enable_activeds_tlb
wine_fn_config_makefile dlls/activeds.tlb enable_activeds_tlb
wine_fn_config_makefile dlls/activeds enable_activeds
wine_fn_config_makefile dlls/activeds enable_activeds
wine_fn_config_makefile dlls/activeds/tests enable_tests
wine_fn_config_makefile dlls/actxprxy enable_actxprxy
wine_fn_config_makefile dlls/actxprxy enable_actxprxy
wine_fn_config_makefile dlls/adsiid enable_adsiid
wine_fn_config_makefile dlls/adsiid enable_adsiid
wine_fn_config_makefile dlls/adsldp enable_adsldp
wine_fn_config_makefile dlls/adsldp enable_adsldp
...
...
configure.ac
View file @
39a930ab
...
@@ -2806,6 +2806,7 @@ WINE_CONFIG_MAKEFILE(dlls/acledit)
...
@@ -2806,6 +2806,7 @@ WINE_CONFIG_MAKEFILE(dlls/acledit)
WINE_CONFIG_MAKEFILE(dlls/aclui)
WINE_CONFIG_MAKEFILE(dlls/aclui)
WINE_CONFIG_MAKEFILE(dlls/activeds.tlb)
WINE_CONFIG_MAKEFILE(dlls/activeds.tlb)
WINE_CONFIG_MAKEFILE(dlls/activeds)
WINE_CONFIG_MAKEFILE(dlls/activeds)
WINE_CONFIG_MAKEFILE(dlls/activeds/tests)
WINE_CONFIG_MAKEFILE(dlls/actxprxy)
WINE_CONFIG_MAKEFILE(dlls/actxprxy)
WINE_CONFIG_MAKEFILE(dlls/adsiid)
WINE_CONFIG_MAKEFILE(dlls/adsiid)
WINE_CONFIG_MAKEFILE(dlls/adsldp)
WINE_CONFIG_MAKEFILE(dlls/adsldp)
...
...
dlls/activeds/activeds_main.c
View file @
39a930ab
...
@@ -101,10 +101,44 @@ HRESULT WINAPI ADsEnumerateNext(IEnumVARIANT* pEnumVariant, ULONG cElements, VAR
...
@@ -101,10 +101,44 @@ HRESULT WINAPI ADsEnumerateNext(IEnumVARIANT* pEnumVariant, ULONG cElements, VAR
/*****************************************************
/*****************************************************
* ADsBuildVarArrayStr [ACTIVEDS.7]
* ADsBuildVarArrayStr [ACTIVEDS.7]
*/
*/
HRESULT
WINAPI
ADsBuildVarArrayStr
(
LPWSTR
*
lppPathNames
,
DWORD
dwPathNames
,
VARIANT
*
p
var
)
HRESULT
WINAPI
ADsBuildVarArrayStr
(
LPWSTR
*
str
,
DWORD
count
,
VARIANT
*
var
)
{
{
FIXME
(
"(%p, %d, %p)!stub
\n
"
,
*
lppPathNames
,
dwPathNames
,
pvar
);
HRESULT
hr
;
return
E_NOTIMPL
;
SAFEARRAY
*
sa
;
LONG
idx
,
end
=
count
;
TRACE
(
"(%p, %u, %p)
\n
"
,
str
,
count
,
var
);
if
(
!
var
)
return
E_ADS_BAD_PARAMETER
;
sa
=
SafeArrayCreateVector
(
VT_VARIANT
,
0
,
count
);
if
(
!
sa
)
return
E_OUTOFMEMORY
;
VariantInit
(
var
);
for
(
idx
=
0
;
idx
<
end
;
idx
++
)
{
VARIANT
item
;
V_VT
(
&
item
)
=
VT_BSTR
;
V_BSTR
(
&
item
)
=
SysAllocString
(
str
[
idx
]);
if
(
!
V_BSTR
(
&
item
))
{
hr
=
E_OUTOFMEMORY
;
goto
fail
;
}
hr
=
SafeArrayPutElement
(
sa
,
&
idx
,
&
item
);
SysFreeString
(
V_BSTR
(
&
item
));
if
(
hr
!=
S_OK
)
goto
fail
;
}
V_VT
(
var
)
=
VT_ARRAY
|
VT_VARIANT
;
V_ARRAY
(
var
)
=
sa
;
return
S_OK
;
fail:
SafeArrayDestroy
(
sa
);
return
hr
;
}
}
/*****************************************************
/*****************************************************
...
...
dlls/activeds/tests/Makefile.in
0 → 100644
View file @
39a930ab
TESTDLL
=
activeds.dll
IMPORTS
=
ole32 oleaut32 activeds
C_SRCS
=
\
activeds.c
dlls/activeds/tests/activeds.c
0 → 100644
View file @
39a930ab
/*
* Copyright 2020 Dmitry Timoshkov
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
#include <stdio.h>
#include "windef.h"
#include "winbase.h"
#include "objbase.h"
#include "iads.h"
#include "adshlp.h"
#include "adserr.h"
#include "wine/test.h"
static
void
test_ADsBuildVarArrayStr
(
void
)
{
const
WCHAR
*
props
[]
=
{
L"prop1"
,
L"prop2"
};
HRESULT
hr
;
VARIANT
var
,
item
,
*
data
;
LONG
start
,
end
,
idx
;
hr
=
ADsBuildVarArrayStr
(
NULL
,
0
,
NULL
);
ok
(
hr
==
E_ADS_BAD_PARAMETER
||
hr
==
E_FAIL
/* XP */
,
"got %#x
\n
"
,
hr
);
hr
=
ADsBuildVarArrayStr
(
NULL
,
0
,
&
var
);
ok
(
hr
==
S_OK
,
"got %#x
\n
"
,
hr
);
ok
(
V_VT
(
&
var
)
==
(
VT_ARRAY
|
VT_VARIANT
),
"got %d
\n
"
,
V_VT
(
&
var
));
start
=
0xdeadbeef
;
hr
=
SafeArrayGetLBound
(
V_ARRAY
(
&
var
),
1
,
&
start
);
ok
(
hr
==
S_OK
,
"got %#x
\n
"
,
hr
);
ok
(
start
==
0
,
"got %d
\n
"
,
start
);
end
=
0xdeadbeef
;
hr
=
SafeArrayGetUBound
(
V_ARRAY
(
&
var
),
1
,
&
end
);
ok
(
hr
==
S_OK
,
"got %#x
\n
"
,
hr
);
ok
(
end
==
-
1
,
"got %d
\n
"
,
end
);
VariantClear
(
&
var
);
hr
=
ADsBuildVarArrayStr
((
LPWSTR
*
)
props
,
ARRAY_SIZE
(
props
),
&
var
);
ok
(
hr
==
S_OK
,
"got %#x
\n
"
,
hr
);
ok
(
V_VT
(
&
var
)
==
(
VT_ARRAY
|
VT_VARIANT
),
"got %d
\n
"
,
V_VT
(
&
var
));
start
=
0xdeadbeef
;
hr
=
SafeArrayGetLBound
(
V_ARRAY
(
&
var
),
1
,
&
start
);
ok
(
hr
==
S_OK
,
"got %#x
\n
"
,
hr
);
ok
(
start
==
0
,
"got %d
\n
"
,
start
);
end
=
0xdeadbeef
;
hr
=
SafeArrayGetUBound
(
V_ARRAY
(
&
var
),
1
,
&
end
);
ok
(
hr
==
S_OK
,
"got %#x
\n
"
,
hr
);
ok
(
end
==
1
,
"got %d
\n
"
,
end
);
idx
=
0
;
hr
=
SafeArrayGetElement
(
V_ARRAY
(
&
var
),
&
idx
,
&
item
);
ok
(
hr
==
S_OK
,
"got %#x
\n
"
,
hr
);
ok
(
V_VT
(
&
item
)
==
VT_BSTR
,
"got %d
\n
"
,
V_VT
(
&
item
));
ok
(
!
lstrcmpW
(
V_BSTR
(
&
item
),
L"prop1"
),
"got %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
item
)));
VariantClear
(
&
item
);
hr
=
SafeArrayAccessData
(
V_ARRAY
(
&
var
),
(
void
*
)
&
data
);
ok
(
hr
==
S_OK
,
"got %#x
\n
"
,
hr
);
ok
(
V_VT
(
&
data
[
0
])
==
VT_BSTR
,
"got %d
\n
"
,
V_VT
(
&
data
[
0
]));
ok
(
!
lstrcmpW
(
V_BSTR
(
&
data
[
0
]),
L"prop1"
),
"got %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
data
[
0
])));
ok
(
V_VT
(
&
data
[
0
])
==
VT_BSTR
,
"got %d
\n
"
,
V_VT
(
&
data
[
0
]));
ok
(
!
lstrcmpW
(
V_BSTR
(
&
data
[
1
]),
L"prop2"
),
"got %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
data
[
1
])));
hr
=
SafeArrayUnaccessData
(
V_ARRAY
(
&
var
));
ok
(
hr
==
S_OK
,
"got %#x
\n
"
,
hr
);
VariantClear
(
&
var
);
}
START_TEST
(
activeds
)
{
test_ADsBuildVarArrayStr
();
}
include/adshlp.h
View file @
39a930ab
...
@@ -24,6 +24,7 @@ extern "C" {
...
@@ -24,6 +24,7 @@ extern "C" {
#endif
#endif
HRESULT
WINAPI
ADsBuildEnumerator
(
IADsContainer
*
,
IEnumVARIANT
**
);
HRESULT
WINAPI
ADsBuildEnumerator
(
IADsContainer
*
,
IEnumVARIANT
**
);
HRESULT
WINAPI
ADsBuildVarArrayStr
(
LPWSTR
*
,
DWORD
,
VARIANT
*
);
HRESULT
WINAPI
ADsEnumerateNext
(
IEnumVARIANT
*
,
ULONG
,
VARIANT
*
,
ULONG
*
);
HRESULT
WINAPI
ADsEnumerateNext
(
IEnumVARIANT
*
,
ULONG
,
VARIANT
*
,
ULONG
*
);
HRESULT
WINAPI
ADsGetObject
(
LPCWSTR
,
REFIID
,
VOID
**
);
HRESULT
WINAPI
ADsGetObject
(
LPCWSTR
,
REFIID
,
VOID
**
);
HRESULT
WINAPI
ADsOpenObject
(
LPCWSTR
,
LPCWSTR
,
LPCWSTR
,
DWORD
,
REFIID
,
VOID
**
);
HRESULT
WINAPI
ADsOpenObject
(
LPCWSTR
,
LPCWSTR
,
LPCWSTR
,
DWORD
,
REFIID
,
VOID
**
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment