Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
ebf11a99
Commit
ebf11a99
authored
Jan 31, 2007
by
Damien Fouilleul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- activex: globally use win32 unicode APIs, hopefully this will fix reported registration problems
parent
560b07b4
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
97 additions
and
126 deletions
+97
-126
activex/main.cpp
activex/main.cpp
+68
-86
activex/plugin.cpp
activex/plugin.cpp
+27
-14
activex/plugin.h
activex/plugin.h
+1
-1
activex/utils.cpp
activex/utils.cpp
+0
-22
activex/utils.h
activex/utils.h
+0
-2
configure.ac
configure.ac
+1
-1
No files found.
activex/main.cpp
View file @
ebf11a99
This diff is collapsed.
Click to expand it.
activex/plugin.cpp
View file @
ebf11a99
...
...
@@ -430,30 +430,43 @@ HRESULT VLCPlugin::getVLC(libvlc_instance_t** pp_libvlc)
int
ppsz_argc
=
1
;
HKEY
h_key
;
DWORD
i_type
,
i_data
=
MAX_PATH
+
1
;
char
p_data
[
MAX_PATH
+
1
];
if
(
RegOpenKeyEx
(
HKEY_LOCAL_MACHINE
,
"Software
\\
VideoLAN
\\
VLC"
,
char
p_data
[
MAX_PATH
];
if
(
RegOpenKeyEx
(
HKEY_LOCAL_MACHINE
,
TEXT
(
"Software
\\
VideoLAN
\\
VLC"
),
0
,
KEY_READ
,
&
h_key
)
==
ERROR_SUCCESS
)
{
if
(
RegQueryValueEx
(
h_key
,
"InstallDir"
,
0
,
&
i_type
,
(
LPBYTE
)
p_data
,
&
i_data
)
==
ERROR_SUCCESS
)
DWORD
i_type
,
i_data
=
MAX_PATH
;
TCHAR
w_data
[
MAX_PATH
];
if
(
RegQueryValueEx
(
h_key
,
TEXT
(
"InstallDir"
),
0
,
&
i_type
,
(
LPBYTE
)
w_data
,
&
i_data
)
==
ERROR_SUCCESS
)
{
if
(
i_type
==
REG_SZ
)
{
strcat
(
p_data
,
"
\\
plugins"
);
ppsz_argv
[
ppsz_argc
++
]
=
"--plugin-path"
;
ppsz_argv
[
ppsz_argc
++
]
=
p_data
;
if
(
WideCharToMultiByte
(
CP_UTF8
,
0
,
w_data
,
-
1
,
p_data
,
sizeof
(
p_data
)
-
sizeof
(
"
\\
plugins"
)
+
1
,
NULL
,
NULL
)
)
{
strcat
(
p_data
,
"
\\
plugins"
);
ppsz_argv
[
ppsz_argc
++
]
=
"--plugin-path"
;
ppsz_argv
[
ppsz_argc
++
]
=
p_data
;
}
}
}
RegCloseKey
(
h_key
);
}
char
p_path
[
MAX_PATH
+
1
];
DWORD
len
=
GetModuleFileNameA
(
DllGetModule
(),
p_path
,
sizeof
(
p_path
));
if
(
len
>
0
)
char
p_path
[
MAX_PATH
];
{
p_path
[
len
]
=
'\0'
;
ppsz_argv
[
0
]
=
p_path
;
TCHAR
w_path
[
MAX_PATH
];
DWORD
len
=
GetModuleFileName
(
DllGetModule
(),
w_path
,
MAX_PATH
);
if
(
len
>
0
)
{
len
=
WideCharToMultiByte
(
CP_UTF8
,
0
,
w_path
,
len
,
p_path
,
sizeof
(
p_path
)
-
1
,
NULL
,
NULL
);
if
(
len
>
0
)
{
p_path
[
len
]
=
'\0'
;
ppsz_argv
[
0
]
=
p_path
;
}
}
}
// make sure plugin isn't affected with VLC single instance mode
...
...
@@ -681,7 +694,7 @@ HRESULT VLCPlugin::onActivateInPlace(LPMSG lpMesg, HWND hwndParent, LPCRECT lprc
** properly displayed.
*/
_inplacewnd
=
CreateWindow
(
_p_class
->
getInPlaceWndClassName
(),
"VLC Plugin In-Place Window"
,
TEXT
(
"VLC Plugin In-Place Window"
)
,
WS_CHILD
|
WS_CLIPCHILDREN
|
WS_CLIPSIBLINGS
,
lprcPosRect
->
left
,
lprcPosRect
->
top
,
...
...
activex/plugin.h
View file @
ebf11a99
...
...
@@ -51,7 +51,7 @@ public:
REFCLSID
getClassID
(
void
)
{
return
(
REFCLSID
)
_classid
;
};
LPCSTR
getInPlaceWndClassName
(
void
)
const
{
return
TEXT
(
"VLC Plugin In-Place"
);
};
LPC
T
STR
getInPlaceWndClassName
(
void
)
const
{
return
TEXT
(
"VLC Plugin In-Place"
);
};
HINSTANCE
getHInstance
(
void
)
const
{
return
_hinstance
;
};
LPPICTURE
getInPlacePict
(
void
)
const
{
if
(
NULL
!=
_inplace_picture
)
_inplace_picture
->
AddRef
();
return
_inplace_picture
;
};
...
...
activex/utils.cpp
View file @
ebf11a99
...
...
@@ -77,28 +77,6 @@ BSTR BSTRFromCStr(UINT codePage, LPCSTR s)
return
NULL
;
};
char
*
CStrFromGUID
(
REFGUID
clsid
)
{
LPOLESTR
oleStr
;
if
(
FAILED
(
StringFromIID
(
clsid
,
&
oleStr
))
)
return
NULL
;
#ifdef OLE2ANSI
return
(
LPCSTR
)
oleStr
;
#else
char
*
pct_CLSID
=
NULL
;
size_t
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
oleStr
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
if
(
len
>
0
)
{
pct_CLSID
=
(
char
*
)
CoTaskMemAlloc
(
len
);
WideCharToMultiByte
(
CP_ACP
,
0
,
oleStr
,
-
1
,
pct_CLSID
,
len
,
NULL
,
NULL
);
}
CoTaskMemFree
(
oleStr
);
return
pct_CLSID
;
#endif
};
/*
** properties
*/
...
...
activex/utils.h
View file @
ebf11a99
...
...
@@ -32,8 +32,6 @@ extern char *CStrFromWSTR(UINT codePage, LPCWSTR wstr, UINT len);
extern
char
*
CStrFromBSTR
(
UINT
codePage
,
BSTR
bstr
);
extern
BSTR
BSTRFromCStr
(
UINT
codePage
,
LPCSTR
s
);
extern
char
*
CStrFromGUID
(
REFGUID
clsid
);
// properties
extern
HRESULT
GetObjectProperty
(
LPUNKNOWN
object
,
DISPID
dispID
,
VARIANT
&
v
);
...
...
configure.ac
View file @
ebf11a99
...
...
@@ -5268,7 +5268,7 @@ then
AC_LANG_PUSH(C++)
AC_CHECK_HEADERS(ole2.h,
[AC_CHECK_HEADERS(olectl.h,
[ VLC_ADD_CPPFLAGS([activex],[-D_MIDL_USE_GUIDDEF_])
[ VLC_ADD_CPPFLAGS([activex],[-D
UNICODE -D_UNICODE -D
_MIDL_USE_GUIDDEF_])
VLC_ADD_CXXFLAGS([activex],[-fno-exceptions])
VLC_ADD_LDFLAGS([activex],[-lole32 -loleaut32 -luuid -lshlwapi])
AC_CHECK_HEADERS(objsafe.h,
...
...
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