Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
c3a635c2
Commit
c3a635c2
authored
Sep 28, 2017
by
Huw Davies
Committed by
Alexandre Julliard
Sep 28, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sapi: Add a stub SpObjectTokenCategory object implementation.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c522fedf
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
229 additions
and
0 deletions
+229
-0
main.c
dlls/sapi/main.c
+3
-0
sapi_private.h
dlls/sapi/sapi_private.h
+1
-0
token.c
dlls/sapi/token.c
+225
-0
No files found.
dlls/sapi/main.c
View file @
c3a635c2
...
...
@@ -107,6 +107,7 @@ static const struct IClassFactoryVtbl class_factory_vtbl =
};
static
struct
class_factory
data_key_cf
=
{
{
&
class_factory_vtbl
},
data_key_create
};
static
struct
class_factory
token_category_cf
=
{
{
&
class_factory_vtbl
},
token_category_create
};
static
struct
class_factory
token_enum_cf
=
{
{
&
class_factory_vtbl
},
token_enum_create
};
/******************************************************************
...
...
@@ -120,6 +121,8 @@ HRESULT WINAPI DllGetClassObject( REFCLSID clsid, REFIID iid, void **obj )
if
(
IsEqualCLSID
(
clsid
,
&
CLSID_SpDataKey
))
cf
=
&
data_key_cf
.
IClassFactory_iface
;
else
if
(
IsEqualCLSID
(
clsid
,
&
CLSID_SpObjectTokenCategory
))
cf
=
&
token_category_cf
.
IClassFactory_iface
;
else
if
(
IsEqualCLSID
(
clsid
,
&
CLSID_SpObjectTokenEnum
))
cf
=
&
token_enum_cf
.
IClassFactory_iface
;
...
...
dlls/sapi/sapi_private.h
View file @
c3a635c2
...
...
@@ -21,6 +21,7 @@
#include "wine/unicode.h"
HRESULT
data_key_create
(
IUnknown
*
outer
,
REFIID
iid
,
void
**
obj
)
DECLSPEC_HIDDEN
;
HRESULT
token_category_create
(
IUnknown
*
outer
,
REFIID
iid
,
void
**
obj
)
DECLSPEC_HIDDEN
;
HRESULT
token_enum_create
(
IUnknown
*
outer
,
REFIID
iid
,
void
**
obj
)
DECLSPEC_HIDDEN
;
static
inline
void
*
__WINE_ALLOC_SIZE
(
1
)
heap_alloc
(
size_t
len
)
...
...
dlls/sapi/token.c
View file @
c3a635c2
...
...
@@ -227,6 +227,231 @@ HRESULT data_key_create( IUnknown *outer, REFIID iid, void **obj )
return
hr
;
}
struct
token_category
{
ISpObjectTokenCategory
ISpObjectTokenCategory_iface
;
LONG
ref
;
};
struct
token_category
*
impl_from_ISpObjectTokenCategory
(
ISpObjectTokenCategory
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
token_category
,
ISpObjectTokenCategory_iface
);
}
static
HRESULT
WINAPI
token_category_QueryInterface
(
ISpObjectTokenCategory
*
iface
,
REFIID
iid
,
void
**
obj
)
{
struct
token_category
*
This
=
impl_from_ISpObjectTokenCategory
(
iface
);
TRACE
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_guid
(
iid
),
obj
);
if
(
IsEqualIID
(
iid
,
&
IID_IUnknown
)
||
IsEqualIID
(
iid
,
&
IID_ISpDataKey
)
||
IsEqualIID
(
iid
,
&
IID_ISpObjectTokenCategory
))
{
ISpObjectTokenCategory_AddRef
(
iface
);
*
obj
=
iface
;
return
S_OK
;
}
FIXME
(
"interface %s not implemented
\n
"
,
debugstr_guid
(
iid
)
);
*
obj
=
NULL
;
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
token_category_AddRef
(
ISpObjectTokenCategory
*
iface
)
{
struct
token_category
*
This
=
impl_from_ISpObjectTokenCategory
(
iface
);
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref = %u
\n
"
,
This
,
ref
);
return
ref
;
}
static
ULONG
WINAPI
token_category_Release
(
ISpObjectTokenCategory
*
iface
)
{
struct
token_category
*
This
=
impl_from_ISpObjectTokenCategory
(
iface
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref = %u
\n
"
,
This
,
ref
);
if
(
!
ref
)
{
heap_free
(
This
);
}
return
ref
;
}
static
HRESULT
WINAPI
token_category_SetData
(
ISpObjectTokenCategory
*
iface
,
LPCWSTR
name
,
ULONG
size
,
const
BYTE
*
data
)
{
FIXME
(
"stub
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
token_category_GetData
(
ISpObjectTokenCategory
*
iface
,
LPCWSTR
name
,
ULONG
*
size
,
BYTE
*
data
)
{
FIXME
(
"stub
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
token_category_SetStringValue
(
ISpObjectTokenCategory
*
iface
,
LPCWSTR
name
,
LPCWSTR
value
)
{
FIXME
(
"stub
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
token_category_GetStringValue
(
ISpObjectTokenCategory
*
iface
,
LPCWSTR
name
,
LPWSTR
*
value
)
{
FIXME
(
"stub
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
token_category_SetDWORD
(
ISpObjectTokenCategory
*
iface
,
LPCWSTR
name
,
DWORD
value
)
{
FIXME
(
"stub
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
token_category_GetDWORD
(
ISpObjectTokenCategory
*
iface
,
LPCWSTR
name
,
DWORD
*
pdwValue
)
{
FIXME
(
"stub
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
token_category_OpenKey
(
ISpObjectTokenCategory
*
iface
,
LPCWSTR
name
,
ISpDataKey
**
sub_key
)
{
FIXME
(
"stub
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
token_category_CreateKey
(
ISpObjectTokenCategory
*
iface
,
LPCWSTR
name
,
ISpDataKey
**
sub_key
)
{
FIXME
(
"stub
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
token_category_DeleteKey
(
ISpObjectTokenCategory
*
iface
,
LPCWSTR
name
)
{
FIXME
(
"stub
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
token_category_DeleteValue
(
ISpObjectTokenCategory
*
iface
,
LPCWSTR
name
)
{
FIXME
(
"stub
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
token_category_EnumKeys
(
ISpObjectTokenCategory
*
iface
,
ULONG
index
,
LPWSTR
*
sub_key
)
{
FIXME
(
"stub
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
token_category_EnumValues
(
ISpObjectTokenCategory
*
iface
,
ULONG
index
,
LPWSTR
*
value
)
{
FIXME
(
"stub
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
token_category_SetId
(
ISpObjectTokenCategory
*
iface
,
LPCWSTR
id
,
BOOL
create
)
{
FIXME
(
"stub
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
token_category_GetId
(
ISpObjectTokenCategory
*
iface
,
LPWSTR
*
id
)
{
FIXME
(
"stub
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
token_category_GetDataKey
(
ISpObjectTokenCategory
*
iface
,
SPDATAKEYLOCATION
location
,
ISpDataKey
**
data_key
)
{
FIXME
(
"stub
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
token_category_EnumTokens
(
ISpObjectTokenCategory
*
iface
,
LPCWSTR
req
,
LPCWSTR
opt
,
IEnumSpObjectTokens
**
enum_tokens
)
{
FIXME
(
"stub
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
token_category_SetDefaultTokenId
(
ISpObjectTokenCategory
*
iface
,
LPCWSTR
id
)
{
FIXME
(
"stub
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
token_category_GetDefaultTokenId
(
ISpObjectTokenCategory
*
iface
,
LPWSTR
*
id
)
{
FIXME
(
"stub
\n
"
);
return
E_NOTIMPL
;
}
const
struct
ISpObjectTokenCategoryVtbl
token_category_vtbl
=
{
token_category_QueryInterface
,
token_category_AddRef
,
token_category_Release
,
token_category_SetData
,
token_category_GetData
,
token_category_SetStringValue
,
token_category_GetStringValue
,
token_category_SetDWORD
,
token_category_GetDWORD
,
token_category_OpenKey
,
token_category_CreateKey
,
token_category_DeleteKey
,
token_category_DeleteValue
,
token_category_EnumKeys
,
token_category_EnumValues
,
token_category_SetId
,
token_category_GetId
,
token_category_GetDataKey
,
token_category_EnumTokens
,
token_category_SetDefaultTokenId
,
token_category_GetDefaultTokenId
,
};
HRESULT
token_category_create
(
IUnknown
*
outer
,
REFIID
iid
,
void
**
obj
)
{
struct
token_category
*
This
=
heap_alloc
(
sizeof
(
*
This
)
);
HRESULT
hr
;
if
(
!
This
)
return
E_OUTOFMEMORY
;
This
->
ISpObjectTokenCategory_iface
.
lpVtbl
=
&
token_category_vtbl
;
This
->
ref
=
1
;
hr
=
ISpObjectTokenCategory_QueryInterface
(
&
This
->
ISpObjectTokenCategory_iface
,
iid
,
obj
);
ISpObjectTokenCategory_Release
(
&
This
->
ISpObjectTokenCategory_iface
);
return
hr
;
}
struct
token_enum
{
ISpObjectTokenEnumBuilder
ISpObjectTokenEnumBuilder_iface
;
...
...
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