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
ae4f72f5
Commit
ae4f72f5
authored
Feb 12, 2001
by
Andreas Mohr
Committed by
Alexandre Julliard
Feb 12, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Take a stab at implementing OleSetAutoConvert.
parent
33c24891
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
24 deletions
+62
-24
compobj.c
dlls/ole32/compobj.c
+62
-15
ole2stubs.c
dlls/ole32/ole2stubs.c
+0
-9
No files found.
dlls/ole32/compobj.c
View file @
ae4f72f5
...
...
@@ -1976,21 +1976,68 @@ BOOL WINAPI COMPOBJ_DllEntryPoint(DWORD Reason, HINSTANCE16 hInst, WORD ds, WORD
*/
HRESULT
WINAPI
OleGetAutoConvert
(
REFCLSID
clsidOld
,
LPCLSID
pClsidNew
)
{
HKEY
hkey
;
char
buf
[
200
];
WCHAR
wbuf
[
200
];
DWORD
len
;
sprintf
(
buf
,
"CLSID
\\
"
);
WINE_StringFromCLSID
(
clsidOld
,
&
buf
[
6
]);
if
(
RegOpenKeyA
(
HKEY_CLASSES_ROOT
,
buf
,
&
hkey
))
return
REGDB_E_CLASSNOTREG
;
len
=
200
;
if
(
RegQueryValueA
(
hkey
,
"AutoConvertTo"
,
buf
,
&
len
))
return
REGDB_E_KEYMISSING
;
RegCloseKey
(
hkey
);
MultiByteToWideChar
(
CP_ACP
,
0
,
buf
,
-
1
,
wbuf
,
sizeof
(
wbuf
)
/
sizeof
(
WCHAR
)
);
CLSIDFromString
(
wbuf
,
pClsidNew
);
return
S_OK
;
HKEY
hkey
=
0
;
char
buf
[
200
];
WCHAR
wbuf
[
200
];
DWORD
len
;
HRESULT
res
=
S_OK
;
sprintf
(
buf
,
"CLSID
\\
"
);
WINE_StringFromCLSID
(
clsidOld
,
&
buf
[
6
]);
if
(
RegOpenKeyA
(
HKEY_CLASSES_ROOT
,
buf
,
&
hkey
))
{
res
=
REGDB_E_CLASSNOTREG
;
goto
done
;
}
len
=
200
;
/* we can just query for the default value of AutoConvertTo key like that,
without opening the AutoConvertTo key and querying for NULL (default) */
if
(
RegQueryValueA
(
hkey
,
"AutoConvertTo"
,
buf
,
&
len
))
{
res
=
REGDB_E_KEYMISSING
;
goto
done
;
}
MultiByteToWideChar
(
CP_ACP
,
0
,
buf
,
-
1
,
wbuf
,
sizeof
(
wbuf
)
/
sizeof
(
WCHAR
)
);
CLSIDFromString
(
wbuf
,
pClsidNew
);
done:
if
(
hkey
)
RegCloseKey
(
hkey
);
return
res
;
}
/******************************************************************************
* OleSetAutoConvert [OLE32.126]
*/
HRESULT
WINAPI
OleSetAutoConvert
(
REFCLSID
clsidOld
,
REFCLSID
clsidNew
)
{
HKEY
hkey
=
0
,
hkeyConvert
=
0
;
char
buf
[
200
],
szClsidNew
[
200
];
HRESULT
res
=
S_OK
;
TRACE
(
"(%p,%p);
\n
"
,
clsidOld
,
clsidNew
);
sprintf
(
buf
,
"CLSID
\\
"
);
WINE_StringFromCLSID
(
clsidOld
,
&
buf
[
6
]);
WINE_StringFromCLSID
(
clsidNew
,
szClsidNew
);
if
(
RegOpenKeyA
(
HKEY_CLASSES_ROOT
,
buf
,
&
hkey
))
{
res
=
REGDB_E_CLASSNOTREG
;
goto
done
;
}
if
(
RegCreateKeyA
(
hkey
,
"AutoConvertTo"
,
&
hkeyConvert
))
{
res
=
REGDB_E_WRITEREGDB
;
goto
done
;
}
if
(
RegSetValueExA
(
hkeyConvert
,
NULL
,
0
,
REG_SZ
,
(
LPBYTE
)
szClsidNew
,
strlen
(
szClsidNew
)
+
1
))
{
res
=
REGDB_E_WRITEREGDB
;
goto
done
;
}
done:
if
(
hkeyConvert
)
RegCloseKey
(
hkeyConvert
);
if
(
hkey
)
RegCloseKey
(
hkey
);
return
res
;
}
/***********************************************************************
...
...
dlls/ole32/ole2stubs.c
View file @
ae4f72f5
...
...
@@ -67,15 +67,6 @@ HRESULT WINAPI CoTreatAsClass(REFCLSID clsidOld, REFCLSID clsidNew)
}
/******************************************************************************
* OleSetAutoConvert [OLE32.@]
*/
HRESULT
WINAPI
OleSetAutoConvert
(
REFCLSID
clsidOld
,
REFCLSID
clsidNew
)
{
FIXME
(
"(%p,%p), stub!
\n
"
,
clsidOld
,
clsidNew
);
return
S_OK
;
}
/******************************************************************************
* IsAccelerator [OLE32.75]
*/
BOOL
WINAPI
IsAccelerator
(
HACCEL
hAccel
,
int
cAccelEntries
,
LPMSG
lpMsg
,
WORD
*
lpwCmd
)
...
...
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