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
510fc118
Commit
510fc118
authored
Aug 10, 2006
by
Mike McCormack
Committed by
Alexandre Julliard
Aug 11, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
infosoft: Implement and register the language neutral wordbreaker, not the English_US one.
parent
26985e6b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
8 deletions
+51
-8
infosoft_main.c
dlls/infosoft/infosoft_main.c
+42
-7
wordbreaker.c
dlls/infosoft/wordbreaker.c
+1
-1
wine.inf
tools/wine.inf
+8
-0
No files found.
dlls/infosoft/infosoft_main.c
View file @
510fc118
...
...
@@ -23,6 +23,7 @@
#include "config.h"
#include <stdarg.h>
#include <stdio.h>
#include "windef.h"
#include "winbase.h"
...
...
@@ -36,8 +37,7 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
infosoft
);
DEFINE_GUID
(
CLSID_wb_en_us
,
0x59e09780
,
0x8099
,
0x101b
,
0x8d
,
0xf3
,
0x00
,
0x00
,
0x0b
,
0x65
,
0xc3
,
0xb5
);
DEFINE_GUID
(
CLSID_wb_Neutral
,
0x369647e0
,
0x17b0
,
0x11ce
,
0x99
,
0x50
,
0x00
,
0xaa
,
0x00
,
0x4b
,
0xbb
,
0x1f
);
BOOL
WINAPI
DllMain
(
HINSTANCE
hInstDLL
,
DWORD
fdwReason
,
LPVOID
lpv
)
{
...
...
@@ -54,7 +54,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
return
TRUE
;
}
extern
HRESULT
WINAPI
wb_
en_us_
Constructor
(
IUnknown
*
,
REFIID
,
LPVOID
*
);
extern
HRESULT
WINAPI
wb_Constructor
(
IUnknown
*
,
REFIID
,
LPVOID
*
);
typedef
HRESULT
(
CALLBACK
*
LPFNCREATEINSTANCE
)(
IUnknown
*
,
REFIID
,
LPVOID
*
);
...
...
@@ -121,7 +121,7 @@ static const IClassFactoryVtbl infosoft_cfvt =
infosoftcf_fnLockServer
};
static
CFImpl
wb_
en_us_cf
=
{
&
infosoft_cfvt
,
&
wb_en_us
_Constructor
};
static
CFImpl
wb_
cf
=
{
&
infosoft_cfvt
,
&
wb
_Constructor
};
HRESULT
WINAPI
DllGetClassObject
(
REFCLSID
rclsid
,
REFIID
iid
,
LPVOID
*
ppv
)
{
...
...
@@ -133,8 +133,8 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv)
return
E_INVALIDARG
;
*
ppv
=
NULL
;
if
(
IsEqualIID
(
rclsid
,
&
CLSID_wb_
en_us
))
pcf
=
(
IClassFactory
*
)
&
wb_
en_us_
cf
;
if
(
IsEqualIID
(
rclsid
,
&
CLSID_wb_
Neutral
))
pcf
=
(
IClassFactory
*
)
&
wb_cf
;
else
return
CLASS_E_CLASSNOTAVAILABLE
;
...
...
@@ -148,8 +148,43 @@ 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
,
"{%08lX-%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
)
{
ADD_BREAKER
(
Neutral
);
/* in query.dll on Windows */
return
S_OK
;
}
HRESULT
WINAPI
DllRegisterServer
(
void
)
{
FIXME
(
"
\n
"
);
add_content_index_keys
(
);
return
S_OK
;
}
dlls/infosoft/wordbreaker.c
View file @
510fc118
...
...
@@ -147,7 +147,7 @@ static const IWordBreakerVtbl wordbreaker_vtbl =
wb_GetLicenseToUse
,
};
HRESULT
WINAPI
wb_
en_us_
Constructor
(
IUnknown
*
pUnkOuter
,
REFIID
riid
,
LPVOID
*
ppvObject
)
HRESULT
WINAPI
wb_Constructor
(
IUnknown
*
pUnkOuter
,
REFIID
riid
,
LPVOID
*
ppvObject
)
{
wordbreaker_impl
*
This
;
IWordBreaker
*
wb
;
...
...
tools/wine.inf
View file @
510fc118
...
...
@@ -31,6 +31,7 @@ WineFakeDlls=FakeDllsSection
UpdateInis=SystemIni
AddReg=\
Classes,\
ContentIndex,\
ControlClass,\
CurrentVersion,\
Debugger,\
...
...
@@ -53,6 +54,7 @@ WineFakeDlls=FakeDllsSection
UpdateInis=SystemIni
AddReg=\
Classes,\
ContentIndex,\
ControlClass,\
CurrentVersion,\
Debugger,\
...
...
@@ -141,6 +143,11 @@ HKCR,TypeLib\{00020430-0000-0000-C000-000000000046}\2.0,,,"OLE Automation"
HKCR,TypeLib\{00020430-0000-0000-C000-000000000046}\2.0\0\win32,,,"stdole2.tlb"
HKCR,TypeLib\{00020430-0000-0000-C000-000000000046}\2.0\FLAGS,,,"0"
[ContentIndex]
HKLM,System\CurrentControlSet\Control\ContentIndex\Language\Neutral,"WBreakerClass",,"{369647e0-17b0-11ce-9950-00aa004bbb1f}"
HKLM,System\CurrentControlSet\Control\ContentIndex\Language\Neutral,"StemmerClass",,""
HKLM,System\CurrentControlSet\Control\ContentIndex\Language\Neutral,"Locale",0x10003,0
[ControlClass]
HKLM,System\CurrentControlSet\Control\Class\{4d36e978-e325-11ce-bfc1-08002be10318},,,"Ports (COM & LPT)"
HKLM,System\CurrentControlSet\Control\Class\{4d36e978-e325-11ce-bfc1-08002be10318},"Class",,"Ports"
...
...
@@ -2099,6 +2106,7 @@ HKLM,%CurrentVersion%\Telephony\Country List\998,"SameAreaRule",,"G"
11,,dxdiagn.dll,1
11,,hhctrl.ocx,1
11,,hlink.dll,1
11,,infosoft.dll,1
11,,inseng.dll,1
11,,itss.dll,1
11,,mlang.dll,1
...
...
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