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
e76db63c
Commit
e76db63c
authored
Aug 02, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winecrt0: No longer register typelibs, they use IRegistrar scripts now.
parent
1380a770
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
43 deletions
+0
-43
register.c
dlls/winecrt0/register.c
+0
-43
No files found.
dlls/winecrt0/register.c
View file @
e76db63c
...
...
@@ -31,11 +31,9 @@
#include "atliface.h"
static
const
WCHAR
ole32W
[]
=
{
'o'
,
'l'
,
'e'
,
'3'
,
'2'
,
'.'
,
'd'
,
'l'
,
'l'
,
0
};
static
const
WCHAR
oleaut32W
[]
=
{
'o'
,
'l'
,
'e'
,
'a'
,
'u'
,
't'
,
'3'
,
'2'
,
'.'
,
'd'
,
'l'
,
'l'
,
0
};
static
const
WCHAR
regtypeW
[]
=
{
'W'
,
'I'
,
'N'
,
'E'
,
'_'
,
'R'
,
'E'
,
'G'
,
'I'
,
'S'
,
'T'
,
'R'
,
'Y'
,
0
};
static
const
WCHAR
moduleW
[]
=
{
'M'
,
'O'
,
'D'
,
'U'
,
'L'
,
'E'
,
0
};
static
const
WCHAR
clsidW
[]
=
{
'C'
,
'L'
,
'S'
,
'I'
,
'D'
,
'_'
,
'P'
,
'S'
,
'F'
,
'a'
,
'c'
,
't'
,
'o'
,
'r'
,
'y'
,
'B'
,
'u'
,
'f'
,
'f'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
typelibW
[]
=
{
'T'
,
'Y'
,
'P'
,
'E'
,
'L'
,
'I'
,
'B'
,
0
};
struct
reg_info
{
...
...
@@ -47,13 +45,10 @@ struct reg_info
};
static
HMODULE
ole32
;
static
HMODULE
oleaut32
;
static
HRESULT
(
WINAPI
*
pCoInitialize
)(
LPVOID
);
static
void
(
WINAPI
*
pCoUninitialize
)(
void
);
static
HRESULT
(
WINAPI
*
pCoCreateInstance
)(
REFCLSID
,
LPUNKNOWN
,
DWORD
,
REFIID
,
LPVOID
*
);
static
INT
(
WINAPI
*
pStringFromGUID2
)(
REFGUID
,
LPOLESTR
,
INT
);
static
HRESULT
(
WINAPI
*
pLoadTypeLibEx
)(
LPCOLESTR
,
REGKIND
,
ITypeLib
**
);
static
HRESULT
(
WINAPI
*
pUnRegisterTypeLib
)(
REFGUID
,
WORD
,
WORD
,
LCID
,
SYSKIND
);
static
IRegistrar
*
create_registrar
(
HMODULE
inst
,
struct
reg_info
*
info
)
{
...
...
@@ -116,40 +111,6 @@ static BOOL CALLBACK register_resource( HMODULE module, LPCWSTR type, LPWSTR nam
return
SUCCEEDED
(
info
->
result
);
}
static
HRESULT
register_typelib
(
HMODULE
module
,
BOOL
do_register
)
{
WCHAR
name
[
MAX_PATH
];
ITypeLib
*
typelib
;
HRESULT
ret
;
if
(
!
pUnRegisterTypeLib
)
{
if
(
!
(
oleaut32
=
LoadLibraryW
(
oleaut32W
))
||
!
(
pLoadTypeLibEx
=
(
void
*
)
GetProcAddress
(
oleaut32
,
"LoadTypeLibEx"
))
||
!
(
pUnRegisterTypeLib
=
(
void
*
)
GetProcAddress
(
oleaut32
,
"UnRegisterTypeLib"
)))
return
E_FAIL
;
}
GetModuleFileNameW
(
module
,
name
,
MAX_PATH
);
if
(
do_register
)
{
ret
=
pLoadTypeLibEx
(
name
,
REGKIND_REGISTER
,
&
typelib
);
}
else
{
ret
=
pLoadTypeLibEx
(
name
,
REGKIND_NONE
,
&
typelib
);
if
(
SUCCEEDED
(
ret
))
{
TLIBATTR
*
attr
;
ITypeLib_GetLibAttr
(
typelib
,
&
attr
);
ret
=
pUnRegisterTypeLib
(
&
attr
->
guid
,
attr
->
wMajorVerNum
,
attr
->
wMinorVerNum
,
attr
->
lcid
,
attr
->
syskind
);
ITypeLib_ReleaseTLibAttr
(
typelib
,
attr
);
}
}
if
(
SUCCEEDED
(
ret
))
ITypeLib_Release
(
typelib
);
return
ret
;
}
HRESULT
__wine_register_resources
(
HMODULE
module
,
const
CLSID
*
clsid
)
{
struct
reg_info
info
;
...
...
@@ -161,8 +122,6 @@ HRESULT __wine_register_resources( HMODULE module, const CLSID *clsid )
info
.
result
=
S_OK
;
EnumResourceNamesW
(
module
,
regtypeW
,
register_resource
,
(
LONG_PTR
)
&
info
);
if
(
info
.
registrar
)
IRegistrar_Release
(
info
.
registrar
);
if
(
SUCCEEDED
(
info
.
result
)
&&
FindResourceW
(
module
,
MAKEINTRESOURCEW
(
1
),
typelibW
))
info
.
result
=
register_typelib
(
module
,
TRUE
);
if
(
info
.
uninit
)
pCoUninitialize
();
return
info
.
result
;
}
...
...
@@ -178,8 +137,6 @@ HRESULT __wine_unregister_resources( HMODULE module, const CLSID *clsid )
info
.
result
=
S_OK
;
EnumResourceNamesW
(
module
,
regtypeW
,
register_resource
,
(
LONG_PTR
)
&
info
);
if
(
info
.
registrar
)
IRegistrar_Release
(
info
.
registrar
);
if
(
SUCCEEDED
(
info
.
result
)
&&
FindResourceW
(
module
,
MAKEINTRESOURCEW
(
1
),
typelibW
))
info
.
result
=
register_typelib
(
module
,
FALSE
);
if
(
info
.
uninit
)
pCoUninitialize
();
return
info
.
result
;
}
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