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
61eb9833
Commit
61eb9833
authored
Dec 02, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hlink: Convert dll registration to the IRegistrar mechanism.
parent
26c71721
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
37 deletions
+51
-37
Makefile.in
dlls/hlink/Makefile.in
+2
-0
hlink.spec
dlls/hlink/hlink.spec
+1
-1
hlink_classes.idl
dlls/hlink/hlink_classes.idl
+36
-0
hlink_main.c
dlls/hlink/hlink_main.c
+12
-36
No files found.
dlls/hlink/Makefile.in
View file @
61eb9833
...
...
@@ -9,4 +9,6 @@ C_SRCS = \
hlink_main.c
\
link.c
IDL_R_SRCS
=
hlink_classes.idl
@MAKE_DLL_RULES@
dlls/hlink/hlink.spec
View file @
61eb9833
...
...
@@ -30,4 +30,4 @@
@ stdcall -private DllCanUnloadNow()
@ stdcall -private DllGetClassObject(ptr ptr ptr)
@ stdcall -private DllRegisterServer()
# @ stub -private DllUnregisterServer
@ stdcall -private DllUnregisterServer()
dlls/hlink/hlink_classes.idl
0 → 100644
View file @
61eb9833
/*
*
COM
Classes
for
hlink
*
*
Copyright
2010
Alexandre
Julliard
*
*
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
*/
[
threading
(
apartment
),
uuid
(
79
eac9d0
-
baf9
-
11
ce
-
8
c82
-
00
aa004ba90b
)
]
coclass
StdHlink
{
interface
IHlink
;
interface
IPersistStream
;
interface
IDataObject
;
}
[
threading
(
apartment
),
uuid
(
79
eac9d1
-
baf9
-
11
ce
-
8
c82
-
00
aa004ba90b
)
]
coclass
StdHlinkBrowseContext
{
interface
IHlinkBrowseContext
; }
dlls/hlink/hlink_main.c
View file @
61eb9833
...
...
@@ -21,12 +21,15 @@
#include "hlink_private.h"
#include "winreg.h"
#include "rpcproxy.h"
#include "hlguids.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
hlink
);
static
HINSTANCE
instance
;
typedef
HRESULT
(
CALLBACK
*
LPFNCREATEINSTANCE
)(
IUnknown
*
,
REFIID
,
LPVOID
*
);
typedef
struct
...
...
@@ -42,6 +45,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
switch
(
fdwReason
)
{
case
DLL_PROCESS_ATTACH
:
instance
=
hinstDLL
;
DisableThreadLibraryCalls
(
hinstDLL
);
break
;
case
DLL_PROCESS_DETACH
:
...
...
@@ -576,46 +580,18 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv)
return
IClassFactory_QueryInterface
(
pcf
,
iid
,
ppv
);
}
static
HRESULT
register_clsid
(
LPCGUID
guid
)
/***********************************************************************
* DllRegisterServer (HLINK.@)
*/
HRESULT
WINAPI
DllRegisterServer
(
void
)
{
static
const
WCHAR
clsid
[]
=
{
'C'
,
'L'
,
'S'
,
'I'
,
'D'
,
'\\'
,
0
};
static
const
WCHAR
ips
[]
=
{
'\\'
,
'I'
,
'n'
,
'p'
,
'r'
,
'o'
,
'c'
,
'S'
,
'e'
,
'r'
,
'v'
,
'e'
,
'r'
,
'3'
,
'2'
,
0
};
static
const
WCHAR
hlink
[]
=
{
'h'
,
'l'
,
'i'
,
'n'
,
'k'
,
'.'
,
'd'
,
'l'
,
'l'
,
0
};
static
const
WCHAR
threading_model
[]
=
{
'T'
,
'h'
,
'r'
,
'e'
,
'a'
,
'd'
,
'i'
,
'n'
,
'g'
,
'M'
,
'o'
,
'd'
,
'e'
,
'l'
,
0
};
static
const
WCHAR
apartment
[]
=
{
'A'
,
'p'
,
'a'
,
'r'
,
't'
,
'm'
,
'e'
,
'n'
,
't'
,
0
};
WCHAR
path
[
80
];
HKEY
key
=
NULL
;
LONG
r
;
lstrcpyW
(
path
,
clsid
);
StringFromGUID2
(
guid
,
&
path
[
6
],
80
);
lstrcatW
(
path
,
ips
);
r
=
RegCreateKeyW
(
HKEY_CLASSES_ROOT
,
path
,
&
key
);
if
(
r
!=
ERROR_SUCCESS
)
return
E_FAIL
;
RegSetValueExW
(
key
,
NULL
,
0
,
REG_SZ
,
(
const
BYTE
*
)
hlink
,
sizeof
hlink
);
RegSetValueExW
(
key
,
threading_model
,
0
,
REG_SZ
,
(
const
BYTE
*
)
apartment
,
sizeof
apartment
);
RegCloseKey
(
key
);
return
S_OK
;
return
__wine_register_resources
(
instance
,
NULL
);
}
/***********************************************************************
*
DllR
egisterServer (HLINK.@)
*
DllUnr
egisterServer (HLINK.@)
*/
HRESULT
WINAPI
Dll
R
egisterServer
(
void
)
HRESULT
WINAPI
Dll
Unr
egisterServer
(
void
)
{
HRESULT
r
;
r
=
register_clsid
(
&
CLSID_StdHlink
);
if
(
SUCCEEDED
(
r
))
r
=
register_clsid
(
&
CLSID_StdHlinkBrowseContext
);
return
S_OK
;
return
__wine_unregister_resources
(
instance
,
NULL
);
}
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