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
79bab499
Commit
79bab499
authored
Dec 07, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
infosoft: Convert dll registration to the IRegistrar mechanism.
parent
7092313b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
38 deletions
+42
-38
.gitignore
.gitignore
+1
-0
Makefile.in
dlls/infosoft/Makefile.in
+3
-0
infosoft.idl
dlls/infosoft/infosoft.idl
+26
-0
infosoft_main.c
dlls/infosoft/infosoft_main.c
+12
-38
No files found.
.gitignore
View file @
79bab499
...
...
@@ -50,6 +50,7 @@ dlls/d3dcompiler_43/asmshader.yy.c
dlls/dispex/disp_ex.h
dlls/dispex/disp_ex_p.c
dlls/dxdiagn/fil_data.h
dlls/infosoft/infosoft.h
dlls/jscript/jsglobal.tlb
dlls/jscript/parser.tab.c
dlls/jscript/parser.tab.h
...
...
dlls/infosoft/Makefile.in
View file @
79bab499
...
...
@@ -6,4 +6,7 @@ C_SRCS = \
infosoft_main.c
\
wordbreaker.c
IDL_H_SRCS
=
infosoft.idl
IDL_R_SRCS
=
infosoft.idl
@MAKE_DLL_RULES@
dlls/infosoft/infosoft.idl
0 → 100644
View file @
79bab499
/*
*
COM
Classes
for
infosoft
*
*
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
*/
[
helpstring
(
"Neutral Word Breaker"
),
threading
(
both
),
uuid
(
369647
e0
-
17b0
-
11
ce
-
9950
-
00
aa004bbb1f
)
]
coclass
wb_Neutral
{
interface
IWordBreaker
; }
dlls/infosoft/infosoft_main.c
View file @
79bab499
...
...
@@ -28,16 +28,17 @@
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "winreg.h"
#include "ole2.h"
#include "rpcproxy.h"
#include "indexsrv.h"
#include "initguid.h"
#include "infosoft.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
infosoft
);
DEFINE_GUID
(
CLSID_wb_Neutral
,
0x369647e0
,
0x17b0
,
0x11ce
,
0x99
,
0x50
,
0x00
,
0xaa
,
0x00
,
0x4b
,
0xbb
,
0x1f
)
;
static
HINSTANCE
instance
;
BOOL
WINAPI
DllMain
(
HINSTANCE
hInstDLL
,
DWORD
fdwReason
,
LPVOID
lpv
)
{
...
...
@@ -46,6 +47,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
case
DLL_WINE_PREATTACH
:
return
FALSE
;
/* prefer native version */
case
DLL_PROCESS_ATTACH
:
instance
=
hInstDLL
;
DisableThreadLibraryCalls
(
hInstDLL
);
break
;
case
DLL_PROCESS_DETACH
:
...
...
@@ -155,46 +157,18 @@ HRESULT WINAPI DllCanUnloadNow(void)
return
S_FALSE
;
}
static
HRESULT
add_key_val
(
LPCSTR
key
,
LPCSTR
valname
,
LPCSTR
value
)
{
HKEY
hkey
;
if
(
RegCreateKeyA
(
HKEY_CLASSES_ROOT
,
key
,
&
hkey
)
!=
ERROR_SUCCESS
)
return
E_FAIL
;
RegSetValueA
(
hkey
,
valname
,
REG_SZ
,
value
,
strlen
(
value
)
+
1
);
RegCloseKey
(
hkey
);
return
S_OK
;
}
static
HRESULT
add_wordbreaker_clsid
(
LPCSTR
lang
,
const
CLSID
*
id
)
{
CHAR
key
[
100
],
val
[
50
];
strcpy
(
key
,
"CLSID
\\
"
);
sprintf
(
key
+
6
,
"{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}"
,
id
->
Data1
,
id
->
Data2
,
id
->
Data3
,
id
->
Data4
[
0
],
id
->
Data4
[
1
],
id
->
Data4
[
2
],
id
->
Data4
[
3
],
id
->
Data4
[
4
],
id
->
Data4
[
5
],
id
->
Data4
[
6
],
id
->
Data4
[
7
]);
sprintf
(
val
,
"%s Word Breaker"
,
lang
);
add_key_val
(
key
,
NULL
,
val
);
strcat
(
key
,
"
\\
InProcServer32"
);
add_key_val
(
key
,
NULL
,
"infosoft.dll"
);
add_key_val
(
key
,
"ThreadingModel"
,
"Both"
);
return
S_OK
;
}
#define ADD_BREAKER(name) add_wordbreaker_clsid( #name, &CLSID_wb_##name )
static
HRESULT
add_content_index_keys
(
void
)
/***********************************************************************
* DllRegisterServer (INFOSOFT.@)
*/
HRESULT
WINAPI
DllRegisterServer
(
void
)
{
ADD_BREAKER
(
Neutral
);
/* in query.dll on Windows */
return
S_OK
;
return
__wine_register_resources
(
instance
,
NULL
);
}
/***********************************************************************
*
DllR
egisterServer (INFOSOFT.@)
*
DllUnr
egisterServer (INFOSOFT.@)
*/
HRESULT
WINAPI
Dll
R
egisterServer
(
void
)
HRESULT
WINAPI
Dll
Unr
egisterServer
(
void
)
{
add_content_index_keys
();
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