Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
727b4c33
Commit
727b4c33
authored
Sep 18, 2006
by
Damien Fouilleul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- activex: cleanup, improved VB compatibility and new test.html file for new script APIs
parent
f5bc599e
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
369 additions
and
397 deletions
+369
-397
activex/axvlc.idl
activex/axvlc.idl
+5
-2
activex/axvlc.tlb
activex/axvlc.tlb
+0
-0
activex/axvlc_idl.h
activex/axvlc_idl.h
+21
-26
activex/connectioncontainer.cpp
activex/connectioncontainer.cpp
+2
-2
activex/dataobject.cpp
activex/dataobject.cpp
+1
-1
activex/main.cpp
activex/main.cpp
+48
-82
activex/plugin.cpp
activex/plugin.cpp
+6
-8
activex/test.html
activex/test.html
+228
-219
activex/utils.h
activex/utils.h
+2
-0
activex/vlccontrol2.cpp
activex/vlccontrol2.cpp
+33
-28
activex/vlccontrol2.h
activex/vlccontrol2.h
+23
-29
No files found.
activex/axvlc.idl
View file @
727b4c33
...
@@ -34,8 +34,11 @@ library AXVLC
...
@@ -34,8 +34,11 @@ library AXVLC
{
{
//
Forward
declare
all
types
defined
in
this
typelib
//
Forward
declare
all
types
defined
in
this
typelib
interface
IVLCControl
;
interface
IVLCControl
;
interface
IVLCAudio
;
interface
IVLCInput
;
interface
IVLCPlaylist
;
interface
IVLCPlaylist
;
interface
ILibVLCControl
;
interface
IVLCVideo
;
interface
IVLCControl2
;
dispinterface
DVLCEvents
;
dispinterface
DVLCEvents
;
importlib
(
"stdole2.tlb"
)
;
importlib
(
"stdole2.tlb"
)
;
...
@@ -246,7 +249,7 @@ library AXVLC
...
@@ -246,7 +249,7 @@ library AXVLC
HRESULT
isPlaying
(
[
out
,
retval
]
VARIANT_BOOL
*
playing
)
;
HRESULT
isPlaying
(
[
out
,
retval
]
VARIANT_BOOL
*
playing
)
;
[
helpstring
(
"Add a playlist item."
)
]
[
helpstring
(
"Add a playlist item."
)
]
HRESULT
add
(
[
in
]
BSTR
uri
,
[
in
]
BSTR
name
,
[
in
,
optional
]
VARIANT
options
,
[
out
,
retval
]
int
*
item
)
;
HRESULT
add
(
[
in
]
BSTR
uri
,
[
in
,
optional
]
VARIANT
name
,
[
in
,
optional
]
VARIANT
options
,
[
out
,
retval
]
int
*
item
)
;
[
helpstring
(
"Play/Resume the playlist."
)
]
[
helpstring
(
"Play/Resume the playlist."
)
]
HRESULT
play
()
;
HRESULT
play
()
;
...
...
activex/axvlc.tlb
View file @
727b4c33
No preview for this file type
activex/axvlc_idl.h
View file @
727b4c33
...
@@ -16,14 +16,29 @@ DEFINE_GUID(LIBID_AXVLC, 0xdf2bbe39, 0x40a8, 0x433b, 0xa2,0x79, 0x07,0x3f,0x48,0
...
@@ -16,14 +16,29 @@ DEFINE_GUID(LIBID_AXVLC, 0xdf2bbe39, 0x40a8, 0x433b, 0xa2,0x79, 0x07,0x3f,0x48,0
typedef
interface
IVLCControl
IVLCControl
;
typedef
interface
IVLCControl
IVLCControl
;
#endif
#endif
#ifndef __IVLCAudio_FWD_DEFINED__
#define __IVLCAudio_FWD_DEFINED__
typedef
interface
IVLCAudio
IVLCAudio
;
#endif
#ifndef __IVLCInput_FWD_DEFINED__
#define __IVLCInput_FWD_DEFINED__
typedef
interface
IVLCInput
IVLCInput
;
#endif
#ifndef __IVLCPlaylist_FWD_DEFINED__
#ifndef __IVLCPlaylist_FWD_DEFINED__
#define __IVLCPlaylist_FWD_DEFINED__
#define __IVLCPlaylist_FWD_DEFINED__
typedef
interface
IVLCPlaylist
IVLCPlaylist
;
typedef
interface
IVLCPlaylist
IVLCPlaylist
;
#endif
#endif
#ifndef __ILibVLCControl_FWD_DEFINED__
#ifndef __IVLCVideo_FWD_DEFINED__
#define __ILibVLCControl_FWD_DEFINED__
#define __IVLCVideo_FWD_DEFINED__
typedef
interface
ILibVLCControl
ILibVLCControl
;
typedef
interface
IVLCVideo
IVLCVideo
;
#endif
#ifndef __IVLCControl2_FWD_DEFINED__
#define __IVLCControl2_FWD_DEFINED__
typedef
interface
IVLCControl2
IVLCControl2
;
#endif
#endif
#ifndef __DVLCEvents_FWD_DEFINED__
#ifndef __DVLCEvents_FWD_DEFINED__
...
@@ -751,11 +766,6 @@ interface DVLCEvents {
...
@@ -751,11 +766,6 @@ interface DVLCEvents {
#endif
/* __DVLCEvents_DISPINTERFACE_DEFINED__ */
#endif
/* __DVLCEvents_DISPINTERFACE_DEFINED__ */
#ifndef __IVLCAudio_FWD_DEFINED__
#define __IVLCAudio_FWD_DEFINED__
typedef
interface
IVLCAudio
IVLCAudio
;
#endif
/*****************************************************************************
/*****************************************************************************
* IVLCAudio interface
* IVLCAudio interface
*/
*/
...
@@ -916,11 +926,6 @@ void __RPC_STUB IVLCAudio_toggleMute_Stub(
...
@@ -916,11 +926,6 @@ void __RPC_STUB IVLCAudio_toggleMute_Stub(
#endif
/* __IVLCAudio_INTERFACE_DEFINED__ */
#endif
/* __IVLCAudio_INTERFACE_DEFINED__ */
#ifndef __IVLCInput_FWD_DEFINED__
#define __IVLCInput_FWD_DEFINED__
typedef
interface
IVLCInput
IVLCInput
;
#endif
/*****************************************************************************
/*****************************************************************************
* IVLCInput interface
* IVLCInput interface
*/
*/
...
@@ -1181,7 +1186,7 @@ interface IVLCPlaylist : public IDispatch
...
@@ -1181,7 +1186,7 @@ interface IVLCPlaylist : public IDispatch
virtual
HRESULT
STDMETHODCALLTYPE
add
(
virtual
HRESULT
STDMETHODCALLTYPE
add
(
BSTR
uri
,
BSTR
uri
,
BSTR
name
,
VARIANT
name
,
VARIANT
options
,
VARIANT
options
,
int
*
item
)
=
0
;
int
*
item
)
=
0
;
...
@@ -1268,7 +1273,7 @@ typedef struct IVLCPlaylistVtbl {
...
@@ -1268,7 +1273,7 @@ typedef struct IVLCPlaylistVtbl {
HRESULT
(
STDMETHODCALLTYPE
*
add
)(
HRESULT
(
STDMETHODCALLTYPE
*
add
)(
IVLCPlaylist
*
This
,
IVLCPlaylist
*
This
,
BSTR
uri
,
BSTR
uri
,
BSTR
name
,
VARIANT
name
,
VARIANT
options
,
VARIANT
options
,
int
*
item
);
int
*
item
);
...
@@ -1349,7 +1354,7 @@ void __RPC_STUB IVLCPlaylist_get_isPlaying_Stub(
...
@@ -1349,7 +1354,7 @@ void __RPC_STUB IVLCPlaylist_get_isPlaying_Stub(
HRESULT
CALLBACK
IVLCPlaylist_add_Proxy
(
HRESULT
CALLBACK
IVLCPlaylist_add_Proxy
(
IVLCPlaylist
*
This
,
IVLCPlaylist
*
This
,
BSTR
uri
,
BSTR
uri
,
BSTR
name
,
VARIANT
name
,
VARIANT
options
,
VARIANT
options
,
int
*
item
);
int
*
item
);
void
__RPC_STUB
IVLCPlaylist_add_Stub
(
void
__RPC_STUB
IVLCPlaylist_add_Stub
(
...
@@ -1418,11 +1423,6 @@ void __RPC_STUB IVLCPlaylist_removeItem_Stub(
...
@@ -1418,11 +1423,6 @@ void __RPC_STUB IVLCPlaylist_removeItem_Stub(
#endif
/* __IVLCPlaylist_INTERFACE_DEFINED__ */
#endif
/* __IVLCPlaylist_INTERFACE_DEFINED__ */
#ifndef __IVLCVideo_FWD_DEFINED__
#define __IVLCVideo_FWD_DEFINED__
typedef
interface
IVLCVideo
IVLCVideo
;
#endif
/*****************************************************************************
/*****************************************************************************
* IVLCVideo interface
* IVLCVideo interface
*/
*/
...
@@ -1569,11 +1569,6 @@ void __RPC_STUB IVLCVideo_get_height_Stub(
...
@@ -1569,11 +1569,6 @@ void __RPC_STUB IVLCVideo_get_height_Stub(
#endif
/* __IVLCVideo_INTERFACE_DEFINED__ */
#endif
/* __IVLCVideo_INTERFACE_DEFINED__ */
#ifndef __IVLCControl2_FWD_DEFINED__
#define __IVLCControl2_FWD_DEFINED__
typedef
interface
IVLCControl2
IVLCControl2
;
#endif
/*****************************************************************************
/*****************************************************************************
* IVLCControl2 interface
* IVLCControl2 interface
*/
*/
...
...
activex/connectioncontainer.cpp
View file @
727b4c33
...
@@ -36,7 +36,7 @@ public:
...
@@ -36,7 +36,7 @@ public:
e
(
VLCEnum
<
CONNECTDATA
>
(
IID_IEnumConnections
,
v
))
e
(
VLCEnum
<
CONNECTDATA
>
(
IID_IEnumConnections
,
v
))
{
e
.
setRetainOperation
((
VLCEnum
<
CONNECTDATA
>::
retainer
)
&
retain
);
};
{
e
.
setRetainOperation
((
VLCEnum
<
CONNECTDATA
>::
retainer
)
&
retain
);
};
VLCEnumConnections
(
const
VLCEnumConnections
&
vlcEnum
)
:
e
(
vlcEnum
.
e
)
{};
VLCEnumConnections
(
const
VLCEnumConnections
&
vlcEnum
)
:
IEnumConnections
(),
e
(
vlcEnum
.
e
)
{};
virtual
~
VLCEnumConnections
()
{};
virtual
~
VLCEnumConnections
()
{};
...
@@ -184,7 +184,7 @@ public:
...
@@ -184,7 +184,7 @@ public:
e
(
VLCEnum
<
LPCONNECTIONPOINT
>
(
IID_IEnumConnectionPoints
,
v
))
e
(
VLCEnum
<
LPCONNECTIONPOINT
>
(
IID_IEnumConnectionPoints
,
v
))
{
e
.
setRetainOperation
((
VLCEnum
<
LPCONNECTIONPOINT
>::
retainer
)
&
retain
);
};
{
e
.
setRetainOperation
((
VLCEnum
<
LPCONNECTIONPOINT
>::
retainer
)
&
retain
);
};
VLCEnumConnectionPoints
(
const
VLCEnumConnectionPoints
&
vlcEnum
)
:
e
(
vlcEnum
.
e
)
{};
VLCEnumConnectionPoints
(
const
VLCEnumConnectionPoints
&
vlcEnum
)
:
IEnumConnectionPoints
(),
e
(
vlcEnum
.
e
)
{};
virtual
~
VLCEnumConnectionPoints
()
{};
virtual
~
VLCEnumConnectionPoints
()
{};
...
...
activex/dataobject.cpp
View file @
727b4c33
...
@@ -36,7 +36,7 @@ public:
...
@@ -36,7 +36,7 @@ public:
VLCEnumFORMATETC
(
vector
<
FORMATETC
>
&
v
)
:
VLCEnumFORMATETC
(
vector
<
FORMATETC
>
&
v
)
:
e
(
VLCEnum
<
FORMATETC
>
(
IID_IEnumFORMATETC
,
v
))
{};
e
(
VLCEnum
<
FORMATETC
>
(
IID_IEnumFORMATETC
,
v
))
{};
VLCEnumFORMATETC
(
const
VLCEnumFORMATETC
&
vlcEnum
)
:
e
(
vlcEnum
.
e
)
{};
VLCEnumFORMATETC
(
const
VLCEnumFORMATETC
&
vlcEnum
)
:
IEnumFORMATETC
(),
e
(
vlcEnum
.
e
)
{};
virtual
~
VLCEnumFORMATETC
()
{};
virtual
~
VLCEnumFORMATETC
()
{};
// IUnknown methods
// IUnknown methods
...
...
activex/main.cpp
View file @
727b4c33
...
@@ -57,8 +57,7 @@ STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
...
@@ -57,8 +57,7 @@ STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
*
ppv
=
NULL
;
*
ppv
=
NULL
;
if
(
(
CLSID_VLCPlugin
==
rclsid
)
if
(
CLSID_VLCPlugin2
==
rclsid
)
||
(
CLSID_VLCPlugin2
==
rclsid
)
)
{
{
VLCPluginClass
*
plugin
=
new
VLCPluginClass
(
&
i_class_ref
,
h_instance
,
rclsid
);
VLCPluginClass
*
plugin
=
new
VLCPluginClass
(
&
i_class_ref
,
h_instance
,
rclsid
);
hr
=
plugin
->
QueryInterface
(
riid
,
ppv
);
hr
=
plugin
->
QueryInterface
(
riid
,
ppv
);
...
@@ -158,14 +157,20 @@ STDAPI DllUnregisterServer(VOID)
...
@@ -158,14 +157,20 @@ STDAPI DllUnregisterServer(VOID)
SHDeleteKey
(
HKEY_CLASSES_ROOT
,
TEXT
(
PROGID_STR
));
SHDeleteKey
(
HKEY_CLASSES_ROOT
,
TEXT
(
PROGID_STR
));
UnregisterProgID
(
CLSID_VLCPlugin
,
1
);
UnregisterProgID
(
CLSID_VLCPlugin
,
2
);
UnregisterProgID
(
CLSID_VLCPlugin2
,
1
);
UnregisterProgID
(
CLSID_VLCPlugin2
,
1
);
return
S_OK
;
return
S_OK
;
};
};
static
HRESULT
RegisterClassID
(
HKEY
hParent
,
REFCLSID
rclsid
,
unsigned
int
version
,
const
char
*
path
,
size_t
pathLen
)
static
HRESULT
RegisterClassID
(
HKEY
hParent
,
REFCLSID
rclsid
,
unsigned
int
version
,
BOOL
isDefault
,
const
char
*
path
,
size_t
pathLen
)
{
{
char
progId
[
sizeof
(
PROGID_STR
)
+
16
];
sprintf
(
progId
,
"%s.%u"
,
PROGID_STR
,
version
);
char
description
[
sizeof
(
DESCRIPTION
)
+
16
];
sprintf
(
description
,
"%s v%u"
,
DESCRIPTION
,
version
);
HKEY
hClassKey
;
HKEY
hClassKey
;
{
{
LPCSTR
psz_CLSID
=
CStrFromGUID
(
rclsid
);
LPCSTR
psz_CLSID
=
CStrFromGUID
(
rclsid
);
...
@@ -173,13 +178,43 @@ static HRESULT RegisterClassID(HKEY hParent, REFCLSID rclsid, unsigned int versi
...
@@ -173,13 +178,43 @@ static HRESULT RegisterClassID(HKEY hParent, REFCLSID rclsid, unsigned int versi
if
(
NULL
==
psz_CLSID
)
if
(
NULL
==
psz_CLSID
)
return
E_OUTOFMEMORY
;
return
E_OUTOFMEMORY
;
HKEY
hProgKey
=
keyCreate
(
HKEY_CLASSES_ROOT
,
progId
);
if
(
NULL
!=
hProgKey
)
{
// default key value
keySetDef
(
hProgKey
,
description
);
keyClose
(
keySetDef
(
keyCreate
(
hProgKey
,
"CLSID"
),
psz_CLSID
,
GUID_STRLEN
));
//hSubKey = keyClose(keyCreate(hBaseKey, "Insertable"));
RegCloseKey
(
hProgKey
);
}
if
(
isDefault
)
{
hProgKey
=
keyCreate
(
HKEY_CLASSES_ROOT
,
PROGID_STR
);
if
(
NULL
!=
hProgKey
)
{
// default key value
keySetDef
(
hProgKey
,
description
);
keyClose
(
keySetDef
(
keyCreate
(
hProgKey
,
"CLSID"
),
psz_CLSID
,
GUID_STRLEN
));
keyClose
(
keySetDef
(
keyCreate
(
hProgKey
,
"CurVer"
),
progId
));
}
}
hClassKey
=
keyCreate
(
hParent
,
psz_CLSID
);
hClassKey
=
keyCreate
(
hParent
,
psz_CLSID
);
CoTaskMemFree
((
void
*
)
psz_CLSID
);
CoTaskMemFree
((
void
*
)
psz_CLSID
);
}
}
if
(
NULL
!=
hClassKey
)
if
(
NULL
!=
hClassKey
)
{
{
// default key value
// default key value
keySetDef
(
hClassKey
,
DESCRIPTION
,
sizeof
(
DESCRIPTION
)
);
keySetDef
(
hClassKey
,
description
);
// Control key value
// Control key value
keyClose
(
keyCreate
(
hClassKey
,
"Control"
));
keyClose
(
keyCreate
(
hClassKey
,
"Control"
));
...
@@ -223,13 +258,9 @@ static HRESULT RegisterClassID(HKEY hParent, REFCLSID rclsid, unsigned int versi
...
@@ -223,13 +258,9 @@ static HRESULT RegisterClassID(HKEY hParent, REFCLSID rclsid, unsigned int versi
keyClose
(
keyCreate
(
hClassKey
,
"Programmable"
));
keyClose
(
keyCreate
(
hClassKey
,
"Programmable"
));
// ProgID key value
// ProgID key value
{
keyClose
(
keySetDef
(
keyCreate
(
hClassKey
,
char
progId
[
sizeof
(
PROGID_STR
)
+
16
];
TEXT
(
"ProgID"
)),
sprintf
(
progId
,
"%s.%u"
,
PROGID_STR
,
version
);
progId
));
keyClose
(
keySetDef
(
keyCreate
(
hClassKey
,
TEXT
(
"ProgID"
)),
progId
));
}
// VersionIndependentProgID key value
// VersionIndependentProgID key value
keyClose
(
keySetDef
(
keyCreate
(
hClassKey
,
keyClose
(
keySetDef
(
keyCreate
(
hClassKey
,
...
@@ -237,13 +268,9 @@ static HRESULT RegisterClassID(HKEY hParent, REFCLSID rclsid, unsigned int versi
...
@@ -237,13 +268,9 @@ static HRESULT RegisterClassID(HKEY hParent, REFCLSID rclsid, unsigned int versi
PROGID_STR
,
sizeof
(
PROGID_STR
)));
PROGID_STR
,
sizeof
(
PROGID_STR
)));
// Version key value
// Version key value
{
keyClose
(
keySetDef
(
keyCreate
(
hClassKey
,
char
ver
[
32
];
"Version"
),
sprintf
(
ver
,
"%u.0"
,
version
);
"1.0"
));
keyClose
(
keySetDef
(
keyCreate
(
hClassKey
,
"Version"
),
ver
));
}
// TypeLib key value
// TypeLib key value
LPCSTR
psz_LIBID
=
CStrFromGUID
(
LIBID_AXVLC
);
LPCSTR
psz_LIBID
=
CStrFromGUID
(
LIBID_AXVLC
);
...
@@ -259,61 +286,6 @@ static HRESULT RegisterClassID(HKEY hParent, REFCLSID rclsid, unsigned int versi
...
@@ -259,61 +286,6 @@ static HRESULT RegisterClassID(HKEY hParent, REFCLSID rclsid, unsigned int versi
return
S_OK
;
return
S_OK
;
}
}
static
HRESULT
RegisterProgID
(
REFCLSID
rclsid
,
unsigned
int
version
)
{
LPCSTR
psz_CLSID
=
CStrFromGUID
(
rclsid
);
if
(
NULL
==
psz_CLSID
)
return
E_OUTOFMEMORY
;
char
progId
[
sizeof
(
PROGID_STR
)
+
16
];
sprintf
(
progId
,
"%s.%u"
,
PROGID_STR
,
version
);
HKEY
hBaseKey
=
keyCreate
(
HKEY_CLASSES_ROOT
,
progId
);
if
(
NULL
!=
hBaseKey
)
{
// default key value
keySetDef
(
hBaseKey
,
DESCRIPTION
,
sizeof
(
DESCRIPTION
));
keyClose
(
keySetDef
(
keyCreate
(
hBaseKey
,
"CLSID"
),
psz_CLSID
,
GUID_STRLEN
));
//hSubKey = keyClose(keyCreate(hBaseKey, "Insertable"));
RegCloseKey
(
hBaseKey
);
}
CoTaskMemFree
((
void
*
)
psz_CLSID
);
return
S_OK
;
}
static
HRESULT
RegisterDefaultProgID
(
REFCLSID
rclsid
,
unsigned
int
version
)
{
LPCSTR
psz_CLSID
=
CStrFromGUID
(
rclsid
);
if
(
NULL
==
psz_CLSID
)
return
E_OUTOFMEMORY
;
HKEY
hBaseKey
=
keyCreate
(
HKEY_CLASSES_ROOT
,
PROGID_STR
);
if
(
NULL
!=
hBaseKey
)
{
// default key value
keySetDef
(
hBaseKey
,
DESCRIPTION
,
sizeof
(
DESCRIPTION
));
keyClose
(
keySetDef
(
keyCreate
(
hBaseKey
,
"CLSID"
),
psz_CLSID
,
GUID_STRLEN
));
char
progId
[
sizeof
(
PROGID_STR
)
+
16
];
sprintf
(
progId
,
"%s.%u"
,
PROGID_STR
,
version
);
keyClose
(
keySetDef
(
keyCreate
(
hBaseKey
,
"CurVer"
),
progId
));
}
CoTaskMemFree
((
void
*
)
psz_CLSID
);
}
STDAPI
DllRegisterServer
(
VOID
)
STDAPI
DllRegisterServer
(
VOID
)
{
{
DllUnregisterServer
();
DllUnregisterServer
();
...
@@ -328,17 +300,11 @@ STDAPI DllRegisterServer(VOID)
...
@@ -328,17 +300,11 @@ STDAPI DllRegisterServer(VOID)
if
(
ERROR_SUCCESS
!=
RegOpenKeyExA
(
HKEY_CLASSES_ROOT
,
"CLSID"
,
0
,
KEY_CREATE_SUB_KEY
,
&
hBaseKey
)
)
if
(
ERROR_SUCCESS
!=
RegOpenKeyExA
(
HKEY_CLASSES_ROOT
,
"CLSID"
,
0
,
KEY_CREATE_SUB_KEY
,
&
hBaseKey
)
)
return
SELFREG_E_CLASS
;
return
SELFREG_E_CLASS
;
RegisterClassID
(
hBaseKey
,
CLSID_VLCPlugin
,
1
,
DllPath
,
DllPathLen
);
RegisterClassID
(
hBaseKey
,
CLSID_VLCPlugin
,
1
,
FALSE
,
DllPath
,
DllPathLen
);
RegisterClassID
(
hBaseKey
,
CLSID_VLCPlugin2
,
2
,
DllPath
,
DllPathLen
);
RegisterClassID
(
hBaseKey
,
CLSID_VLCPlugin2
,
2
,
TRUE
,
DllPath
,
DllPathLen
);
RegCloseKey
(
hBaseKey
);
RegCloseKey
(
hBaseKey
);
RegisterProgID
(
CLSID_VLCPlugin
,
1
);
RegisterProgID
(
CLSID_VLCPlugin2
,
2
);
/* default control */
RegisterDefaultProgID
(
CLSID_VLCPlugin2
,
2
);
// indicate which component categories we support
// indicate which component categories we support
ICatRegister
*
pcr
;
ICatRegister
*
pcr
;
if
(
SUCCEEDED
(
CoCreateInstance
(
CLSID_StdComponentCategoriesMgr
,
if
(
SUCCEEDED
(
CoCreateInstance
(
CLSID_StdComponentCategoriesMgr
,
...
...
activex/plugin.cpp
View file @
727b4c33
...
@@ -51,10 +51,6 @@ using namespace std;
...
@@ -51,10 +51,6 @@ using namespace std;
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
//class factory
//class factory
// {E23FE9C6-778E-49d4-B537-38FCDE4887D8}
//const GUID CLSID_VLCPlugin =
// { 0xe23fe9c6, 0x778e, 0x49d4, { 0xb5, 0x37, 0x38, 0xfc, 0xde, 0x48, 0x87, 0xd8 } };
static
LRESULT
CALLBACK
VLCInPlaceClassWndProc
(
HWND
hWnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
static
LRESULT
CALLBACK
VLCInPlaceClassWndProc
(
HWND
hWnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
switch
(
uMsg
)
switch
(
uMsg
)
{
{
...
@@ -340,7 +336,9 @@ STDMETHODIMP VLCPlugin::QueryInterface(REFIID riid, void **ppv)
...
@@ -340,7 +336,9 @@ STDMETHODIMP VLCPlugin::QueryInterface(REFIID riid, void **ppv)
else
if
(
IID_IObjectSafety
==
riid
)
else
if
(
IID_IObjectSafety
==
riid
)
*
ppv
=
reinterpret_cast
<
LPVOID
>
(
vlcObjectSafety
);
*
ppv
=
reinterpret_cast
<
LPVOID
>
(
vlcObjectSafety
);
else
if
(
IID_IDispatch
==
riid
)
else
if
(
IID_IDispatch
==
riid
)
*
ppv
=
reinterpret_cast
<
LPVOID
>
(
vlcControl
);
*
ppv
=
(
CLSID_VLCPlugin2
==
getClassID
())
?
reinterpret_cast
<
LPVOID
>
(
vlcControl2
)
:
reinterpret_cast
<
LPVOID
>
(
vlcControl
);
else
if
(
IID_IVLCControl
==
riid
)
else
if
(
IID_IVLCControl
==
riid
)
*
ppv
=
reinterpret_cast
<
LPVOID
>
(
vlcControl
);
*
ppv
=
reinterpret_cast
<
LPVOID
>
(
vlcControl
);
else
if
(
IID_IVLCControl2
==
riid
)
else
if
(
IID_IVLCControl2
==
riid
)
...
@@ -590,7 +588,7 @@ HRESULT VLCPlugin::getVLC(libvlc_instance_t** pp_libvlc)
...
@@ -590,7 +588,7 @@ HRESULT VLCPlugin::getVLC(libvlc_instance_t** pp_libvlc)
}
}
#if 0
#if 0
ppsz_argv[0] = "C:\\cygwin\\home\\
Damien_Fouilleul\\dev\\videolan
\\vlc-trunk\\vlc";
ppsz_argv[0] = "C:\\cygwin\\home\\
damienf
\\vlc-trunk\\vlc";
#endif
#endif
// make sure plugin isn't affected with VLC single instance mode
// make sure plugin isn't affected with VLC single instance mode
...
@@ -624,11 +622,11 @@ HRESULT VLCPlugin::getVLC(libvlc_instance_t** pp_libvlc)
...
@@ -624,11 +622,11 @@ HRESULT VLCPlugin::getVLC(libvlc_instance_t** pp_libvlc)
{
{
/*
/*
** VLC default threading mechanism is designed to be as compatible
** VLC default threading mechanism is designed to be as compatible
** with POSIX as possible
, h
owever when debugged on win32, threads
** with POSIX as possible
. H
owever when debugged on win32, threads
** lose signals and eventually VLC get stuck during initialization.
** lose signals and eventually VLC get stuck during initialization.
** threading support can be configured to be more debugging friendly
** threading support can be configured to be more debugging friendly
** but it will be less compatible with POSIX.
** but it will be less compatible with POSIX.
** This is done by initializing with the following options
** This is done by initializing with the following options
:
*/
*/
ppsz_argv
[
ppsz_argc
++
]
=
"--fast-mutex"
;
ppsz_argv
[
ppsz_argc
++
]
=
"--fast-mutex"
;
ppsz_argv
[
ppsz_argc
++
]
=
"--win9x-cv-method=1"
;
ppsz_argv
[
ppsz_argc
++
]
=
"--win9x-cv-method=1"
;
...
...
activex/test.html
View file @
727b4c33
This diff is collapsed.
Click to expand it.
activex/utils.h
View file @
727b4c33
...
@@ -41,6 +41,7 @@ extern HDC CreateDevDC(DVTARGETDEVICE *ptd);
...
@@ -41,6 +41,7 @@ extern HDC CreateDevDC(DVTARGETDEVICE *ptd);
extern
void
DPFromHimetric
(
HDC
hdc
,
LPPOINT
pt
,
int
count
);
extern
void
DPFromHimetric
(
HDC
hdc
,
LPPOINT
pt
,
int
count
);
extern
void
HimetricFromDP
(
HDC
hdc
,
LPPOINT
pt
,
int
count
);
extern
void
HimetricFromDP
(
HDC
hdc
,
LPPOINT
pt
,
int
count
);
/**************************************************************************************************/
// enumeration
// enumeration
template
<
class
T
>
class
VLCEnum
:
IUnknown
template
<
class
T
>
class
VLCEnum
:
IUnknown
...
@@ -91,6 +92,7 @@ VLCEnum<T>::VLCEnum(REFIID riid, std::vector<T> &v) :
...
@@ -91,6 +92,7 @@ VLCEnum<T>::VLCEnum(REFIID riid, std::vector<T> &v) :
template
<
class
T
>
template
<
class
T
>
VLCEnum
<
T
>::
VLCEnum
(
const
VLCEnum
<
T
>
&
e
)
:
VLCEnum
<
T
>::
VLCEnum
(
const
VLCEnum
<
T
>
&
e
)
:
IUnknown
(),
_refcount
(
1
),
_refcount
(
1
),
_v
(
e
.
_v
),
_v
(
e
.
_v
),
_riid
(
e
.
_riid
)
_riid
(
e
.
_riid
)
...
...
activex/vlccontrol2.cpp
View file @
727b4c33
...
@@ -34,7 +34,7 @@ VLCAudio::~VLCAudio()
...
@@ -34,7 +34,7 @@ VLCAudio::~VLCAudio()
_p_typeinfo
->
Release
();
_p_typeinfo
->
Release
();
};
};
HRESULT
VLCAudio
::
get
TypeInfo
(
void
)
HRESULT
VLCAudio
::
load
TypeInfo
(
void
)
{
{
HRESULT
hr
=
NOERROR
;
HRESULT
hr
=
NOERROR
;
if
(
NULL
==
_p_typeinfo
)
if
(
NULL
==
_p_typeinfo
)
...
@@ -60,7 +60,7 @@ STDMETHODIMP VLCAudio::GetTypeInfoCount(UINT* pctInfo)
...
@@ -60,7 +60,7 @@ STDMETHODIMP VLCAudio::GetTypeInfoCount(UINT* pctInfo)
if
(
NULL
==
pctInfo
)
if
(
NULL
==
pctInfo
)
return
E_INVALIDARG
;
return
E_INVALIDARG
;
if
(
SUCCEEDED
(
get
TypeInfo
())
)
if
(
SUCCEEDED
(
load
TypeInfo
())
)
*
pctInfo
=
1
;
*
pctInfo
=
1
;
else
else
*
pctInfo
=
0
;
*
pctInfo
=
0
;
...
@@ -73,7 +73,7 @@ STDMETHODIMP VLCAudio::GetTypeInfo(UINT iTInfo, LCID lcid, LPTYPEINFO* ppTInfo)
...
@@ -73,7 +73,7 @@ STDMETHODIMP VLCAudio::GetTypeInfo(UINT iTInfo, LCID lcid, LPTYPEINFO* ppTInfo)
if
(
NULL
==
ppTInfo
)
if
(
NULL
==
ppTInfo
)
return
E_INVALIDARG
;
return
E_INVALIDARG
;
if
(
SUCCEEDED
(
get
TypeInfo
())
)
if
(
SUCCEEDED
(
load
TypeInfo
())
)
{
{
_p_typeinfo
->
AddRef
();
_p_typeinfo
->
AddRef
();
*
ppTInfo
=
_p_typeinfo
;
*
ppTInfo
=
_p_typeinfo
;
...
@@ -86,7 +86,7 @@ STDMETHODIMP VLCAudio::GetTypeInfo(UINT iTInfo, LCID lcid, LPTYPEINFO* ppTInfo)
...
@@ -86,7 +86,7 @@ STDMETHODIMP VLCAudio::GetTypeInfo(UINT iTInfo, LCID lcid, LPTYPEINFO* ppTInfo)
STDMETHODIMP
VLCAudio
::
GetIDsOfNames
(
REFIID
riid
,
LPOLESTR
*
rgszNames
,
STDMETHODIMP
VLCAudio
::
GetIDsOfNames
(
REFIID
riid
,
LPOLESTR
*
rgszNames
,
UINT
cNames
,
LCID
lcid
,
DISPID
*
rgDispID
)
UINT
cNames
,
LCID
lcid
,
DISPID
*
rgDispID
)
{
{
if
(
SUCCEEDED
(
get
TypeInfo
())
)
if
(
SUCCEEDED
(
load
TypeInfo
())
)
{
{
return
DispGetIDsOfNames
(
_p_typeinfo
,
rgszNames
,
cNames
,
rgDispID
);
return
DispGetIDsOfNames
(
_p_typeinfo
,
rgszNames
,
cNames
,
rgDispID
);
}
}
...
@@ -97,7 +97,7 @@ STDMETHODIMP VLCAudio::Invoke(DISPID dispIdMember, REFIID riid,
...
@@ -97,7 +97,7 @@ STDMETHODIMP VLCAudio::Invoke(DISPID dispIdMember, REFIID riid,
LCID
lcid
,
WORD
wFlags
,
DISPPARAMS
*
pDispParams
,
LCID
lcid
,
WORD
wFlags
,
DISPPARAMS
*
pDispParams
,
VARIANT
*
pVarResult
,
EXCEPINFO
*
pExcepInfo
,
UINT
*
puArgErr
)
VARIANT
*
pVarResult
,
EXCEPINFO
*
pExcepInfo
,
UINT
*
puArgErr
)
{
{
if
(
SUCCEEDED
(
get
TypeInfo
())
)
if
(
SUCCEEDED
(
load
TypeInfo
())
)
{
{
return
DispInvoke
(
this
,
_p_typeinfo
,
dispIdMember
,
wFlags
,
pDispParams
,
return
DispInvoke
(
this
,
_p_typeinfo
,
dispIdMember
,
wFlags
,
pDispParams
,
pVarResult
,
pExcepInfo
,
puArgErr
);
pVarResult
,
pExcepInfo
,
puArgErr
);
...
@@ -219,7 +219,7 @@ VLCInput::~VLCInput()
...
@@ -219,7 +219,7 @@ VLCInput::~VLCInput()
_p_typeinfo
->
Release
();
_p_typeinfo
->
Release
();
};
};
HRESULT
VLCInput
::
get
TypeInfo
(
void
)
HRESULT
VLCInput
::
load
TypeInfo
(
void
)
{
{
HRESULT
hr
=
NOERROR
;
HRESULT
hr
=
NOERROR
;
if
(
NULL
==
_p_typeinfo
)
if
(
NULL
==
_p_typeinfo
)
...
@@ -245,7 +245,7 @@ STDMETHODIMP VLCInput::GetTypeInfoCount(UINT* pctInfo)
...
@@ -245,7 +245,7 @@ STDMETHODIMP VLCInput::GetTypeInfoCount(UINT* pctInfo)
if
(
NULL
==
pctInfo
)
if
(
NULL
==
pctInfo
)
return
E_INVALIDARG
;
return
E_INVALIDARG
;
if
(
SUCCEEDED
(
get
TypeInfo
())
)
if
(
SUCCEEDED
(
load
TypeInfo
())
)
*
pctInfo
=
1
;
*
pctInfo
=
1
;
else
else
*
pctInfo
=
0
;
*
pctInfo
=
0
;
...
@@ -258,7 +258,7 @@ STDMETHODIMP VLCInput::GetTypeInfo(UINT iTInfo, LCID lcid, LPTYPEINFO* ppTInfo)
...
@@ -258,7 +258,7 @@ STDMETHODIMP VLCInput::GetTypeInfo(UINT iTInfo, LCID lcid, LPTYPEINFO* ppTInfo)
if
(
NULL
==
ppTInfo
)
if
(
NULL
==
ppTInfo
)
return
E_INVALIDARG
;
return
E_INVALIDARG
;
if
(
SUCCEEDED
(
get
TypeInfo
())
)
if
(
SUCCEEDED
(
load
TypeInfo
())
)
{
{
_p_typeinfo
->
AddRef
();
_p_typeinfo
->
AddRef
();
*
ppTInfo
=
_p_typeinfo
;
*
ppTInfo
=
_p_typeinfo
;
...
@@ -271,7 +271,7 @@ STDMETHODIMP VLCInput::GetTypeInfo(UINT iTInfo, LCID lcid, LPTYPEINFO* ppTInfo)
...
@@ -271,7 +271,7 @@ STDMETHODIMP VLCInput::GetTypeInfo(UINT iTInfo, LCID lcid, LPTYPEINFO* ppTInfo)
STDMETHODIMP
VLCInput
::
GetIDsOfNames
(
REFIID
riid
,
LPOLESTR
*
rgszNames
,
STDMETHODIMP
VLCInput
::
GetIDsOfNames
(
REFIID
riid
,
LPOLESTR
*
rgszNames
,
UINT
cNames
,
LCID
lcid
,
DISPID
*
rgDispID
)
UINT
cNames
,
LCID
lcid
,
DISPID
*
rgDispID
)
{
{
if
(
SUCCEEDED
(
get
TypeInfo
())
)
if
(
SUCCEEDED
(
load
TypeInfo
())
)
{
{
return
DispGetIDsOfNames
(
_p_typeinfo
,
rgszNames
,
cNames
,
rgDispID
);
return
DispGetIDsOfNames
(
_p_typeinfo
,
rgszNames
,
cNames
,
rgDispID
);
}
}
...
@@ -282,7 +282,7 @@ STDMETHODIMP VLCInput::Invoke(DISPID dispIdMember, REFIID riid,
...
@@ -282,7 +282,7 @@ STDMETHODIMP VLCInput::Invoke(DISPID dispIdMember, REFIID riid,
LCID
lcid
,
WORD
wFlags
,
DISPPARAMS
*
pDispParams
,
LCID
lcid
,
WORD
wFlags
,
DISPPARAMS
*
pDispParams
,
VARIANT
*
pVarResult
,
EXCEPINFO
*
pExcepInfo
,
UINT
*
puArgErr
)
VARIANT
*
pVarResult
,
EXCEPINFO
*
pExcepInfo
,
UINT
*
puArgErr
)
{
{
if
(
SUCCEEDED
(
get
TypeInfo
())
)
if
(
SUCCEEDED
(
load
TypeInfo
())
)
{
{
return
DispInvoke
(
this
,
_p_typeinfo
,
dispIdMember
,
wFlags
,
pDispParams
,
return
DispInvoke
(
this
,
_p_typeinfo
,
dispIdMember
,
wFlags
,
pDispParams
,
pVarResult
,
pExcepInfo
,
puArgErr
);
pVarResult
,
pExcepInfo
,
puArgErr
);
...
@@ -571,7 +571,7 @@ VLCPlaylist::~VLCPlaylist()
...
@@ -571,7 +571,7 @@ VLCPlaylist::~VLCPlaylist()
_p_typeinfo
->
Release
();
_p_typeinfo
->
Release
();
};
};
HRESULT
VLCPlaylist
::
get
TypeInfo
(
void
)
HRESULT
VLCPlaylist
::
load
TypeInfo
(
void
)
{
{
HRESULT
hr
=
NOERROR
;
HRESULT
hr
=
NOERROR
;
if
(
NULL
==
_p_typeinfo
)
if
(
NULL
==
_p_typeinfo
)
...
@@ -597,7 +597,7 @@ STDMETHODIMP VLCPlaylist::GetTypeInfoCount(UINT* pctInfo)
...
@@ -597,7 +597,7 @@ STDMETHODIMP VLCPlaylist::GetTypeInfoCount(UINT* pctInfo)
if
(
NULL
==
pctInfo
)
if
(
NULL
==
pctInfo
)
return
E_INVALIDARG
;
return
E_INVALIDARG
;
if
(
SUCCEEDED
(
get
TypeInfo
())
)
if
(
SUCCEEDED
(
load
TypeInfo
())
)
*
pctInfo
=
1
;
*
pctInfo
=
1
;
else
else
*
pctInfo
=
0
;
*
pctInfo
=
0
;
...
@@ -610,7 +610,7 @@ STDMETHODIMP VLCPlaylist::GetTypeInfo(UINT iTInfo, LCID lcid, LPTYPEINFO* ppTInf
...
@@ -610,7 +610,7 @@ STDMETHODIMP VLCPlaylist::GetTypeInfo(UINT iTInfo, LCID lcid, LPTYPEINFO* ppTInf
if
(
NULL
==
ppTInfo
)
if
(
NULL
==
ppTInfo
)
return
E_INVALIDARG
;
return
E_INVALIDARG
;
if
(
SUCCEEDED
(
get
TypeInfo
())
)
if
(
SUCCEEDED
(
load
TypeInfo
())
)
{
{
_p_typeinfo
->
AddRef
();
_p_typeinfo
->
AddRef
();
*
ppTInfo
=
_p_typeinfo
;
*
ppTInfo
=
_p_typeinfo
;
...
@@ -623,7 +623,7 @@ STDMETHODIMP VLCPlaylist::GetTypeInfo(UINT iTInfo, LCID lcid, LPTYPEINFO* ppTInf
...
@@ -623,7 +623,7 @@ STDMETHODIMP VLCPlaylist::GetTypeInfo(UINT iTInfo, LCID lcid, LPTYPEINFO* ppTInf
STDMETHODIMP
VLCPlaylist
::
GetIDsOfNames
(
REFIID
riid
,
LPOLESTR
*
rgszNames
,
STDMETHODIMP
VLCPlaylist
::
GetIDsOfNames
(
REFIID
riid
,
LPOLESTR
*
rgszNames
,
UINT
cNames
,
LCID
lcid
,
DISPID
*
rgDispID
)
UINT
cNames
,
LCID
lcid
,
DISPID
*
rgDispID
)
{
{
if
(
SUCCEEDED
(
get
TypeInfo
())
)
if
(
SUCCEEDED
(
load
TypeInfo
())
)
{
{
return
DispGetIDsOfNames
(
_p_typeinfo
,
rgszNames
,
cNames
,
rgDispID
);
return
DispGetIDsOfNames
(
_p_typeinfo
,
rgszNames
,
cNames
,
rgDispID
);
}
}
...
@@ -634,7 +634,7 @@ STDMETHODIMP VLCPlaylist::Invoke(DISPID dispIdMember, REFIID riid,
...
@@ -634,7 +634,7 @@ STDMETHODIMP VLCPlaylist::Invoke(DISPID dispIdMember, REFIID riid,
LCID
lcid
,
WORD
wFlags
,
DISPPARAMS
*
pDispParams
,
LCID
lcid
,
WORD
wFlags
,
DISPPARAMS
*
pDispParams
,
VARIANT
*
pVarResult
,
EXCEPINFO
*
pExcepInfo
,
UINT
*
puArgErr
)
VARIANT
*
pVarResult
,
EXCEPINFO
*
pExcepInfo
,
UINT
*
puArgErr
)
{
{
if
(
SUCCEEDED
(
get
TypeInfo
())
)
if
(
SUCCEEDED
(
load
TypeInfo
())
)
{
{
return
DispInvoke
(
this
,
_p_typeinfo
,
dispIdMember
,
wFlags
,
pDispParams
,
return
DispInvoke
(
this
,
_p_typeinfo
,
dispIdMember
,
wFlags
,
pDispParams
,
pVarResult
,
pExcepInfo
,
puArgErr
);
pVarResult
,
pExcepInfo
,
puArgErr
);
...
@@ -688,7 +688,7 @@ STDMETHODIMP VLCPlaylist::get_isPlaying(VARIANT_BOOL* isPlaying)
...
@@ -688,7 +688,7 @@ STDMETHODIMP VLCPlaylist::get_isPlaying(VARIANT_BOOL* isPlaying)
return
hr
;
return
hr
;
};
};
STDMETHODIMP
VLCPlaylist
::
add
(
BSTR
uri
,
BSTR
name
,
VARIANT
options
,
int
*
item
)
STDMETHODIMP
VLCPlaylist
::
add
(
BSTR
uri
,
VARIANT
name
,
VARIANT
options
,
int
*
item
)
{
{
if
(
NULL
==
item
)
if
(
NULL
==
item
)
return
E_POINTER
;
return
E_POINTER
;
...
@@ -718,9 +718,14 @@ STDMETHODIMP VLCPlaylist::add(BSTR uri, BSTR name, VARIANT options, int* item)
...
@@ -718,9 +718,14 @@ STDMETHODIMP VLCPlaylist::add(BSTR uri, BSTR name, VARIANT options, int* item)
}
}
char
*
psz_name
=
NULL
;
char
*
psz_name
=
NULL
;
if
(
SysStringLen
(
name
)
>
0
)
VARIANT
v_name
;
VariantInit
(
&
v_name
);
if
(
SUCCEEDED
(
VariantChangeType
(
&
v_name
,
&
name
,
0
,
VT_BSTR
))
)
{
{
psz_name
=
CStrFromBSTR
(
CP_UTF8
,
name
);
if
(
SysStringLen
(
V_BSTR
(
&
v_name
))
>
0
)
psz_name
=
CStrFromBSTR
(
CP_UTF8
,
V_BSTR
(
&
v_name
));
VariantClear
(
&
v_name
);
}
}
*
item
=
libvlc_playlist_add_extended
(
p_libvlc
,
*
item
=
libvlc_playlist_add_extended
(
p_libvlc
,
...
@@ -912,7 +917,7 @@ VLCVideo::~VLCVideo()
...
@@ -912,7 +917,7 @@ VLCVideo::~VLCVideo()
_p_typeinfo
->
Release
();
_p_typeinfo
->
Release
();
};
};
HRESULT
VLCVideo
::
get
TypeInfo
(
void
)
HRESULT
VLCVideo
::
load
TypeInfo
(
void
)
{
{
HRESULT
hr
=
NOERROR
;
HRESULT
hr
=
NOERROR
;
if
(
NULL
==
_p_typeinfo
)
if
(
NULL
==
_p_typeinfo
)
...
@@ -938,7 +943,7 @@ STDMETHODIMP VLCVideo::GetTypeInfoCount(UINT* pctInfo)
...
@@ -938,7 +943,7 @@ STDMETHODIMP VLCVideo::GetTypeInfoCount(UINT* pctInfo)
if
(
NULL
==
pctInfo
)
if
(
NULL
==
pctInfo
)
return
E_INVALIDARG
;
return
E_INVALIDARG
;
if
(
SUCCEEDED
(
get
TypeInfo
())
)
if
(
SUCCEEDED
(
load
TypeInfo
())
)
*
pctInfo
=
1
;
*
pctInfo
=
1
;
else
else
*
pctInfo
=
0
;
*
pctInfo
=
0
;
...
@@ -951,7 +956,7 @@ STDMETHODIMP VLCVideo::GetTypeInfo(UINT iTInfo, LCID lcid, LPTYPEINFO* ppTInfo)
...
@@ -951,7 +956,7 @@ STDMETHODIMP VLCVideo::GetTypeInfo(UINT iTInfo, LCID lcid, LPTYPEINFO* ppTInfo)
if
(
NULL
==
ppTInfo
)
if
(
NULL
==
ppTInfo
)
return
E_INVALIDARG
;
return
E_INVALIDARG
;
if
(
SUCCEEDED
(
get
TypeInfo
())
)
if
(
SUCCEEDED
(
load
TypeInfo
())
)
{
{
_p_typeinfo
->
AddRef
();
_p_typeinfo
->
AddRef
();
*
ppTInfo
=
_p_typeinfo
;
*
ppTInfo
=
_p_typeinfo
;
...
@@ -964,7 +969,7 @@ STDMETHODIMP VLCVideo::GetTypeInfo(UINT iTInfo, LCID lcid, LPTYPEINFO* ppTInfo)
...
@@ -964,7 +969,7 @@ STDMETHODIMP VLCVideo::GetTypeInfo(UINT iTInfo, LCID lcid, LPTYPEINFO* ppTInfo)
STDMETHODIMP
VLCVideo
::
GetIDsOfNames
(
REFIID
riid
,
LPOLESTR
*
rgszNames
,
STDMETHODIMP
VLCVideo
::
GetIDsOfNames
(
REFIID
riid
,
LPOLESTR
*
rgszNames
,
UINT
cNames
,
LCID
lcid
,
DISPID
*
rgDispID
)
UINT
cNames
,
LCID
lcid
,
DISPID
*
rgDispID
)
{
{
if
(
SUCCEEDED
(
get
TypeInfo
())
)
if
(
SUCCEEDED
(
load
TypeInfo
())
)
{
{
return
DispGetIDsOfNames
(
_p_typeinfo
,
rgszNames
,
cNames
,
rgDispID
);
return
DispGetIDsOfNames
(
_p_typeinfo
,
rgszNames
,
cNames
,
rgDispID
);
}
}
...
@@ -975,7 +980,7 @@ STDMETHODIMP VLCVideo::Invoke(DISPID dispIdMember, REFIID riid,
...
@@ -975,7 +980,7 @@ STDMETHODIMP VLCVideo::Invoke(DISPID dispIdMember, REFIID riid,
LCID
lcid
,
WORD
wFlags
,
DISPPARAMS
*
pDispParams
,
LCID
lcid
,
WORD
wFlags
,
DISPPARAMS
*
pDispParams
,
VARIANT
*
pVarResult
,
EXCEPINFO
*
pExcepInfo
,
UINT
*
puArgErr
)
VARIANT
*
pVarResult
,
EXCEPINFO
*
pExcepInfo
,
UINT
*
puArgErr
)
{
{
if
(
SUCCEEDED
(
get
TypeInfo
())
)
if
(
SUCCEEDED
(
load
TypeInfo
())
)
{
{
return
DispInvoke
(
this
,
_p_typeinfo
,
dispIdMember
,
wFlags
,
pDispParams
,
return
DispInvoke
(
this
,
_p_typeinfo
,
dispIdMember
,
wFlags
,
pDispParams
,
pVarResult
,
pExcepInfo
,
puArgErr
);
pVarResult
,
pExcepInfo
,
puArgErr
);
...
@@ -1118,7 +1123,7 @@ VLCControl2::~VLCControl2()
...
@@ -1118,7 +1123,7 @@ VLCControl2::~VLCControl2()
_p_typeinfo
->
Release
();
_p_typeinfo
->
Release
();
};
};
HRESULT
VLCControl2
::
get
TypeInfo
(
void
)
HRESULT
VLCControl2
::
load
TypeInfo
(
void
)
{
{
HRESULT
hr
=
NOERROR
;
HRESULT
hr
=
NOERROR
;
if
(
NULL
==
_p_typeinfo
)
if
(
NULL
==
_p_typeinfo
)
...
@@ -1144,7 +1149,7 @@ STDMETHODIMP VLCControl2::GetTypeInfoCount(UINT* pctInfo)
...
@@ -1144,7 +1149,7 @@ STDMETHODIMP VLCControl2::GetTypeInfoCount(UINT* pctInfo)
if
(
NULL
==
pctInfo
)
if
(
NULL
==
pctInfo
)
return
E_INVALIDARG
;
return
E_INVALIDARG
;
if
(
SUCCEEDED
(
get
TypeInfo
())
)
if
(
SUCCEEDED
(
load
TypeInfo
())
)
*
pctInfo
=
1
;
*
pctInfo
=
1
;
else
else
*
pctInfo
=
0
;
*
pctInfo
=
0
;
...
@@ -1157,7 +1162,7 @@ STDMETHODIMP VLCControl2::GetTypeInfo(UINT iTInfo, LCID lcid, LPTYPEINFO* ppTInf
...
@@ -1157,7 +1162,7 @@ STDMETHODIMP VLCControl2::GetTypeInfo(UINT iTInfo, LCID lcid, LPTYPEINFO* ppTInf
if
(
NULL
==
ppTInfo
)
if
(
NULL
==
ppTInfo
)
return
E_INVALIDARG
;
return
E_INVALIDARG
;
if
(
SUCCEEDED
(
get
TypeInfo
())
)
if
(
SUCCEEDED
(
load
TypeInfo
())
)
{
{
_p_typeinfo
->
AddRef
();
_p_typeinfo
->
AddRef
();
*
ppTInfo
=
_p_typeinfo
;
*
ppTInfo
=
_p_typeinfo
;
...
@@ -1170,7 +1175,7 @@ STDMETHODIMP VLCControl2::GetTypeInfo(UINT iTInfo, LCID lcid, LPTYPEINFO* ppTInf
...
@@ -1170,7 +1175,7 @@ STDMETHODIMP VLCControl2::GetTypeInfo(UINT iTInfo, LCID lcid, LPTYPEINFO* ppTInf
STDMETHODIMP
VLCControl2
::
GetIDsOfNames
(
REFIID
riid
,
LPOLESTR
*
rgszNames
,
STDMETHODIMP
VLCControl2
::
GetIDsOfNames
(
REFIID
riid
,
LPOLESTR
*
rgszNames
,
UINT
cNames
,
LCID
lcid
,
DISPID
*
rgDispID
)
UINT
cNames
,
LCID
lcid
,
DISPID
*
rgDispID
)
{
{
if
(
SUCCEEDED
(
get
TypeInfo
())
)
if
(
SUCCEEDED
(
load
TypeInfo
())
)
{
{
return
DispGetIDsOfNames
(
_p_typeinfo
,
rgszNames
,
cNames
,
rgDispID
);
return
DispGetIDsOfNames
(
_p_typeinfo
,
rgszNames
,
cNames
,
rgDispID
);
}
}
...
@@ -1181,7 +1186,7 @@ STDMETHODIMP VLCControl2::Invoke(DISPID dispIdMember, REFIID riid,
...
@@ -1181,7 +1186,7 @@ STDMETHODIMP VLCControl2::Invoke(DISPID dispIdMember, REFIID riid,
LCID
lcid
,
WORD
wFlags
,
DISPPARAMS
*
pDispParams
,
LCID
lcid
,
WORD
wFlags
,
DISPPARAMS
*
pDispParams
,
VARIANT
*
pVarResult
,
EXCEPINFO
*
pExcepInfo
,
UINT
*
puArgErr
)
VARIANT
*
pVarResult
,
EXCEPINFO
*
pExcepInfo
,
UINT
*
puArgErr
)
{
{
if
(
SUCCEEDED
(
get
TypeInfo
())
)
if
(
SUCCEEDED
(
load
TypeInfo
())
)
{
{
return
DispInvoke
(
this
,
_p_typeinfo
,
dispIdMember
,
wFlags
,
pDispParams
,
return
DispInvoke
(
this
,
_p_typeinfo
,
dispIdMember
,
wFlags
,
pDispParams
,
pVarResult
,
pExcepInfo
,
puArgErr
);
pVarResult
,
pExcepInfo
,
puArgErr
);
...
...
activex/vlccontrol2.h
View file @
727b4c33
/*****************************************************************************
/*****************************************************************************
* vlccontrol.h: ActiveX control for VLC
* vlccontrol.h: ActiveX control for VLC
*****************************************************************************
*****************************************************************************
* Copyright (C) 200
5
the VideoLAN team
* Copyright (C) 200
6
the VideoLAN team
*
*
* Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net>
* Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net>
*
*
...
@@ -27,10 +27,9 @@
...
@@ -27,10 +27,9 @@
class
VLCAudio
:
public
IVLCAudio
class
VLCAudio
:
public
IVLCAudio
{
{
public:
public:
VLCAudio
(
VLCPlugin
*
p_instance
)
:
VLCAudio
(
VLCPlugin
*
p_instance
)
:
_p_instance
(
p_instance
),
_p_typeinfo
(
NULL
)
{};
_p_instance
(
p_instance
),
_p_typeinfo
(
NULL
)
{};
virtual
~
VLCAudio
();
virtual
~
VLCAudio
();
// IUnknown methods
// IUnknown methods
...
@@ -65,23 +64,21 @@ public:
...
@@ -65,23 +64,21 @@ public:
STDMETHODIMP
get_volume
(
int
*
);
STDMETHODIMP
get_volume
(
int
*
);
STDMETHODIMP
put_volume
(
int
);
STDMETHODIMP
put_volume
(
int
);
STDMETHODIMP
toggleMute
();
STDMETHODIMP
toggleMute
();
private:
private:
HRESULT
loadTypeInfo
();
HRESULT
getTypeInfo
();
VLCPlugin
*
_p_instance
;
ITypeInfo
*
_p_typeinfo
;
VLCPlugin
*
_p_instance
;
ITypeInfo
*
_p_typeinfo
;
};
};
class
VLCInput
:
public
IVLCInput
class
VLCInput
:
public
IVLCInput
{
{
public:
public:
VLCInput
(
VLCPlugin
*
p_instance
)
:
_p_instance
(
p_instance
),
_p_typeinfo
(
NULL
)
{};
VLCInput
(
VLCPlugin
*
p_instance
)
:
_p_instance
(
p_instance
),
_p_typeinfo
(
NULL
)
{};
virtual
~
VLCInput
();
virtual
~
VLCInput
();
// IUnknown methods
// IUnknown methods
...
@@ -123,20 +120,18 @@ public:
...
@@ -123,20 +120,18 @@ public:
STDMETHODIMP
get_hasVout
(
VARIANT_BOOL
*
);
STDMETHODIMP
get_hasVout
(
VARIANT_BOOL
*
);
private:
private:
HRESULT
loadTypeInfo
();
HRESULT
getTypeInfo
();
VLCPlugin
*
_p_instance
;
ITypeInfo
*
_p_typeinfo
;
VLCPlugin
*
_p_instance
;
ITypeInfo
*
_p_typeinfo
;
};
};
class
VLCPlaylist
:
public
IVLCPlaylist
class
VLCPlaylist
:
public
IVLCPlaylist
{
{
public:
public:
VLCPlaylist
(
VLCPlugin
*
p_instance
)
:
VLCPlaylist
(
VLCPlugin
*
p_instance
)
:
_p_instance
(
p_instance
),
_p_typeinfo
(
NULL
)
{};
_p_instance
(
p_instance
),
_p_typeinfo
(
NULL
)
{};
virtual
~
VLCPlaylist
();
virtual
~
VLCPlaylist
();
// IUnknown methods
// IUnknown methods
...
@@ -168,7 +163,7 @@ public:
...
@@ -168,7 +163,7 @@ public:
// IVLCPlaylist methods
// IVLCPlaylist methods
STDMETHODIMP
get_itemCount
(
int
*
);
STDMETHODIMP
get_itemCount
(
int
*
);
STDMETHODIMP
get_isPlaying
(
VARIANT_BOOL
*
);
STDMETHODIMP
get_isPlaying
(
VARIANT_BOOL
*
);
STDMETHODIMP
add
(
BSTR
,
BSTR
,
VARIANT
,
int
*
);
STDMETHODIMP
add
(
BSTR
,
VARIANT
,
VARIANT
,
int
*
);
STDMETHODIMP
play
();
STDMETHODIMP
play
();
STDMETHODIMP
playItem
(
int
);
STDMETHODIMP
playItem
(
int
);
STDMETHODIMP
togglePause
();
STDMETHODIMP
togglePause
();
...
@@ -180,19 +175,18 @@ public:
...
@@ -180,19 +175,18 @@ public:
private:
private:
HRESULT
get
TypeInfo
();
HRESULT
load
TypeInfo
();
VLCPlugin
*
_p_instance
;
VLCPlugin
*
_p_instance
;
ITypeInfo
*
_p_typeinfo
;
ITypeInfo
*
_p_typeinfo
;
};
};
class
VLCVideo
:
public
IVLCVideo
class
VLCVideo
:
public
IVLCVideo
{
{
public:
public:
VLCVideo
(
VLCPlugin
*
p_instance
)
:
VLCVideo
(
VLCPlugin
*
p_instance
)
:
_p_instance
(
p_instance
),
_p_typeinfo
(
NULL
)
{};
_p_instance
(
p_instance
),
_p_typeinfo
(
NULL
)
{};
virtual
~
VLCVideo
();
virtual
~
VLCVideo
();
// IUnknown methods
// IUnknown methods
...
@@ -229,10 +223,10 @@ public:
...
@@ -229,10 +223,10 @@ public:
private:
private:
HRESULT
get
TypeInfo
();
HRESULT
load
TypeInfo
();
VLCPlugin
*
_p_instance
;
VLCPlugin
*
_p_instance
;
ITypeInfo
*
_p_typeinfo
;
ITypeInfo
*
_p_typeinfo
;
};
};
...
@@ -277,7 +271,7 @@ public:
...
@@ -277,7 +271,7 @@ public:
private:
private:
HRESULT
get
TypeInfo
();
HRESULT
load
TypeInfo
();
VLCPlugin
*
_p_instance
;
VLCPlugin
*
_p_instance
;
ITypeInfo
*
_p_typeinfo
;
ITypeInfo
*
_p_typeinfo
;
...
...
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