Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
23ab9d7e
Commit
23ab9d7e
authored
Aug 18, 2006
by
Damien Fouilleul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- minor fixes
parent
ba98f2bd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
21 deletions
+24
-21
activex/utils.cpp
activex/utils.cpp
+24
-21
No files found.
activex/utils.cpp
View file @
23ab9d7e
...
...
@@ -62,7 +62,7 @@ BSTR BSTRFromCStr(UINT codePage, LPCSTR s)
ZeroMemory
(
wideStr
,
wideLen
*
sizeof
(
WCHAR
));
MultiByteToWideChar
(
codePage
,
0
,
s
,
-
1
,
wideStr
,
wideLen
);
bstr
=
SysAllocStringLen
(
wideStr
,
wideLen
);
f
ree
(
wideStr
);
CoTaskMemF
ree
(
wideStr
);
return
bstr
;
}
...
...
@@ -105,32 +105,35 @@ HRESULT GetObjectProperty(LPUNKNOWN object, DISPID dispID, VARIANT& v)
HDC
CreateDevDC
(
DVTARGETDEVICE
*
ptd
)
{
HDC
hdc
=
NULL
;
LPDEVNAMES
lpDevNames
;
LPDEVMODE
lpDevMode
;
LPTSTR
lpszDriverName
;
LPTSTR
lpszDeviceName
;
LPTSTR
lpszPortName
;
if
(
ptd
==
NULL
)
{
if
(
NULL
==
ptd
)
{
hdc
=
CreateDC
(
TEXT
(
"DISPLAY"
),
NULL
,
NULL
,
NULL
);
goto
errReturn
;
}
else
{
LPDEVNAMES
lpDevNames
;
LPDEVMODE
lpDevMode
;
LPTSTR
lpszDriverName
;
LPTSTR
lpszDeviceName
;
LPTSTR
lpszPortName
;
lpDevNames
=
(
LPDEVNAMES
)
ptd
;
// offset for size field
if
(
ptd
->
tdExtDevmodeOffset
==
0
)
{
lpDevMode
=
NULL
;
}
else
{
lpDevMode
=
(
LPDEVMODE
)
((
LPTSTR
)
ptd
+
ptd
->
tdExtDevmodeOffset
);
}
lpDevNames
=
(
LPDEVNAMES
)
ptd
;
// offset for size field
lpszDriverName
=
(
LPTSTR
)
lpDevNames
+
ptd
->
tdDriverNameOffset
;
lpszDeviceName
=
(
LPTSTR
)
lpDevNames
+
ptd
->
tdDeviceNameOffset
;
lpszPortName
=
(
LPTSTR
)
lpDevNames
+
ptd
->
tdPortNameOffset
;
if
(
ptd
->
tdExtDevmodeOffset
==
0
)
{
lpDevMode
=
NULL
;
}
else
{
lpDevMode
=
(
LPDEVMODE
)
((
LPTSTR
)
ptd
+
ptd
->
tdExtDevmodeOffset
);
}
hdc
=
CreateDC
(
lpszDriverName
,
lpszDeviceName
,
lpszPortName
,
lpDevMode
);
lpszDriverName
=
(
LPTSTR
)
lpDevNames
+
ptd
->
tdDriverNameOffset
;
lpszDeviceName
=
(
LPTSTR
)
lpDevNames
+
ptd
->
tdDeviceNameOffset
;
lpszPortName
=
(
LPTSTR
)
lpDevNames
+
ptd
->
tdPortNameOffset
;
errReturn:
hdc
=
CreateDC
(
lpszDriverName
,
lpszDeviceName
,
lpszPortName
,
lpDevMode
);
}
return
hdc
;
};
...
...
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