Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
d8f9b79e
Commit
d8f9b79e
authored
Apr 06, 2007
by
damienf
Browse files
- activex: misc. cleanups
parent
2dad498f
Changes
3
Hide whitespace changes
Inline
Side-by-side
activex/main.cpp
View file @
d8f9b79e
...
...
@@ -121,7 +121,7 @@ static inline HKEY keyClose(HKEY hKey)
return
NULL
;
};
static
HRESULT
UnregisterProgID
(
REFCLSID
rclsid
,
unsigned
int
version
)
static
void
UnregisterProgID
(
REFCLSID
rclsid
,
unsigned
int
version
)
{
OLECHAR
szCLSID
[
GUID_STRLEN
];
...
...
activex/plugin.cpp
View file @
d8f9b79e
...
...
@@ -429,55 +429,55 @@ HRESULT VLCPlugin::getVLC(libvlc_instance_t** pp_libvlc)
char
*
ppsz_argv
[
32
]
=
{
"vlc"
};
int
ppsz_argc
=
1
;
char
p_progpath
[
MAX_PATH
];
{
TCHAR
w_progpath
[
MAX_PATH
];
DWORD
len
=
GetModuleFileName
(
DllGetModule
(),
w_progpath
,
MAX_PATH
);
if
(
len
>
0
)
{
len
=
WideCharToMultiByte
(
CP_UTF8
,
0
,
w_progpath
,
len
,
p_progpath
,
sizeof
(
p_progpath
)
-
1
,
NULL
,
NULL
);
if
(
len
>
0
)
{
p_progpath
[
len
]
=
'\0'
;
ppsz_argv
[
0
]
=
p_progpath
;
}
}
}
ppsz_argv
[
ppsz_argc
++
]
=
"-vv"
;
HKEY
h_key
;
char
p_
d
at
a
[
MAX_PATH
];
char
p_
pluginp
at
h
[
MAX_PATH
];
if
(
RegOpenKeyEx
(
HKEY_LOCAL_MACHINE
,
TEXT
(
"Software
\\
VideoLAN
\\
VLC"
),
0
,
KEY_READ
,
&
h_key
)
==
ERROR_SUCCESS
)
{
DWORD
i_type
,
i_data
=
MAX_PATH
;
TCHAR
w_
d
at
a
[
MAX_PATH
];
TCHAR
w_
pluginp
at
h
[
MAX_PATH
];
if
(
RegQueryValueEx
(
h_key
,
TEXT
(
"InstallDir"
),
0
,
&
i_type
,
(
LPBYTE
)
w_
d
at
a
,
&
i_data
)
==
ERROR_SUCCESS
)
(
LPBYTE
)
w_
pluginp
at
h
,
&
i_data
)
==
ERROR_SUCCESS
)
{
if
(
i_type
==
REG_SZ
)
{
if
(
WideCharToMultiByte
(
CP_UTF8
,
0
,
w_
d
at
a
,
-
1
,
p_
d
at
a
,
sizeof
(
p_
d
at
a
)
-
sizeof
(
"
\\
plugins"
)
+
1
,
NULL
,
NULL
)
)
if
(
WideCharToMultiByte
(
CP_UTF8
,
0
,
w_
pluginp
at
h
,
-
1
,
p_
pluginp
at
h
,
sizeof
(
p_
pluginp
at
h
)
-
sizeof
(
"
\\
plugins"
)
+
1
,
NULL
,
NULL
)
)
{
strcat
(
p_
d
at
a
,
"
\\
plugins"
);
strcat
(
p_
pluginp
at
h
,
"
\\
plugins"
);
ppsz_argv
[
ppsz_argc
++
]
=
"--plugin-path"
;
ppsz_argv
[
ppsz_argc
++
]
=
p_
d
at
a
;
ppsz_argv
[
ppsz_argc
++
]
=
p_
pluginp
at
h
;
}
}
}
RegCloseKey
(
h_key
);
}
char
p_path
[
MAX_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
ppsz_argv
[
ppsz_argc
++
]
=
"--no-one-instance"
;
/* common settings */
ppsz_argv
[
ppsz_argc
++
]
=
"-vv"
;
ppsz_argv
[
ppsz_argc
++
]
=
"--no-stats"
;
ppsz_argv
[
ppsz_argc
++
]
=
"--no-media-library"
;
ppsz_argv
[
ppsz_argc
++
]
=
"--intf"
;
ppsz_argv
[
ppsz_argc
++
]
=
"dummy"
;
ppsz_argv
[
ppsz_argc
++
]
=
"--intf=dummy"
;
// loop mode is a configuration option only
if
(
_b_autoloop
)
...
...
@@ -497,6 +497,8 @@ HRESULT VLCPlugin::getVLC(libvlc_instance_t** pp_libvlc)
ppsz_argv
[
ppsz_argc
++
]
=
"--win9x-cv-method=1"
;
}
DebugBreak
();
_p_libvlc
=
libvlc_new
(
ppsz_argc
,
ppsz_argv
,
NULL
);
if
(
NULL
==
_p_libvlc
)
{
...
...
activex/vlccontrol2.cpp
View file @
d8f9b79e
...
...
@@ -628,6 +628,7 @@ STDMETHODIMP VLCInput::get_fps(double* fps)
if
(
NULL
==
fps
)
return
E_POINTER
;
*
fps
=
0.0
;
libvlc_instance_t
*
p_libvlc
;
HRESULT
hr
=
_p_instance
->
getVLC
(
&
p_libvlc
);
if
(
SUCCEEDED
(
hr
)
)
...
...
@@ -2606,12 +2607,13 @@ STDMETHODIMP VLCControl2::get_VersionInfo(BSTR *version)
if
(
NULL
!=
versionStr
)
{
*
version
=
BSTRFromCStr
(
CP_UTF8
,
versionStr
);
return
NULL
==
*
version
?
E_OUTOFMEMORY
:
NOERROR
;
}
*
version
=
NULL
;
return
E_FAIL
;
};
STDMETHODIMP
VLCControl2
::
get_Visible
(
VARIANT_BOOL
*
isVisible
)
{
if
(
NULL
==
isVisible
)
...
...
Write
Preview
Supports
Markdown
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