Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
0a7b9949
Commit
0a7b9949
authored
Apr 05, 2011
by
Aric Stewart
Committed by
Alexandre Julliard
Apr 06, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineqtdecoder: Add 64-bit functions to datahandler.
parent
800dbb49
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
84 additions
and
3 deletions
+84
-3
qtdatahandler.c
dlls/wineqtdecoder/qtdatahandler.c
+84
-3
No files found.
dlls/wineqtdecoder/qtdatahandler.c
View file @
0a7b9949
...
...
@@ -377,6 +377,70 @@ static pascal ComponentResult myDataHPlaybackHints(DataHandler dh, long flags,
return
noErr
;
}
static
pascal
ComponentResult
myDataHGetFileSize64
(
DataHandler
dh
,
wide
*
fileSize
)
{
Handle
storage
=
GetComponentInstanceStorage
(
dh
);
DHData
*
data
=
(
DHData
*
)
*
storage
;
LONGLONG
total
;
LONGLONG
avaliable
;
SInt64
total64
;
TRACE
(
"%p
\n
"
,
dh
);
IAsyncReader_Length
(
data
->
dataRef
.
pReader
,
&
total
,
&
avaliable
);
total64
=
total
;
*
fileSize
=
SInt64ToWide
(
total64
);
return
noErr
;
}
static
pascal
ComponentResult
myDataHGetAvailableFileSize64
(
DataHandler
dh
,
wide
*
fileSize
)
{
Handle
storage
=
GetComponentInstanceStorage
(
dh
);
DHData
*
data
=
(
DHData
*
)
*
storage
;
LONGLONG
total
;
LONGLONG
avaliable
;
SInt64
total64
;
TRACE
(
"%p
\n
"
,
dh
);
IAsyncReader_Length
(
data
->
dataRef
.
pReader
,
&
total
,
&
avaliable
);
total64
=
avaliable
;
*
fileSize
=
SInt64ToWide
(
total64
);
return
noErr
;
}
static
pascal
ComponentResult
myDataHScheduleData64
(
DataHandler
dh
,
Ptr
PlaceToPutDataPtr
,
const
wide
*
FileOffset
,
long
DataSize
,
long
RefCon
,
DataHSchedulePtr
scheduleRec
,
DataHCompletionUPP
CompletionRtn
)
{
Handle
storage
=
GetComponentInstanceStorage
(
dh
);
DHData
*
data
=
(
DHData
*
)
*
storage
;
HRESULT
hr
;
SInt64
fileOffset64
=
WideToSInt64
(
*
FileOffset
);
LONGLONG
offset
=
fileOffset64
;
BYTE
*
buffer
=
(
BYTE
*
)
PlaceToPutDataPtr
;
TRACE
(
"%p %p %lli %li %li %p %p
\n
"
,
dh
,
PlaceToPutDataPtr
,
offset
,
DataSize
,
RefCon
,
scheduleRec
,
CompletionRtn
);
hr
=
IAsyncReader_SyncRead
(
data
->
dataRef
.
pReader
,
offset
,
DataSize
,
buffer
);
TRACE
(
"result %x
\n
"
,
hr
);
if
(
CompletionRtn
)
{
if
(
data
->
AsyncCompletionRtn
)
InvokeDataHCompletionUPP
(
data
->
AsyncPtr
,
data
->
AsyncRefCon
,
noErr
,
data
->
AsyncCompletionRtn
);
data
->
AsyncPtr
=
PlaceToPutDataPtr
;
data
->
AsyncRefCon
=
RefCon
;
data
->
AsyncCompletionRtn
=
CompletionRtn
;
}
return
noErr
;
}
static
const
struct
{
LPVOID
proc
;
ProcInfoType
type
;}
componentFunctions
[]
=
{
{
NULL
,
0
},
/* 0 */
...
...
@@ -492,9 +556,22 @@ static const struct { LPVOID proc; ProcInfoType type;} componentFunctions[] =
|
STACK_ROUTINE_PARAMETER
(
1
,
SIZE_CODE
(
sizeof
(
DataHandler
)))
|
STACK_ROUTINE_PARAMETER
(
2
,
SIZE_CODE
(
sizeof
(
UInt32
*
)))
},
/* kDataHGetInfoFlagsSelect */
{
NULL
,
0
},
/* kDataHScheduleData64Select */
{
myDataHScheduleData64
,
kPascalStackBased
|
RESULT_SIZE
(
SIZE_CODE
(
sizeof
(
ComponentResult
)))
|
STACK_ROUTINE_PARAMETER
(
1
,
SIZE_CODE
(
sizeof
(
DataHandler
)))
|
STACK_ROUTINE_PARAMETER
(
2
,
SIZE_CODE
(
sizeof
(
Ptr
)))
|
STACK_ROUTINE_PARAMETER
(
3
,
SIZE_CODE
(
sizeof
(
wide
*
)))
|
STACK_ROUTINE_PARAMETER
(
4
,
SIZE_CODE
(
sizeof
(
long
)))
|
STACK_ROUTINE_PARAMETER
(
5
,
SIZE_CODE
(
sizeof
(
long
)))
|
STACK_ROUTINE_PARAMETER
(
6
,
SIZE_CODE
(
sizeof
(
DataHSchedulePtr
)))
|
STACK_ROUTINE_PARAMETER
(
7
,
SIZE_CODE
(
sizeof
(
DataHCompletionUPP
)))
},
/* kDataHScheduleData64Select */
{
NULL
,
0
},
/* kDataHWrite64Select */
{
NULL
,
0
},
/* kDataHGetFileSize64Select 0x30 */
{
myDataHGetFileSize64
,
kPascalStackBased
|
RESULT_SIZE
(
SIZE_CODE
(
sizeof
(
ComponentResult
)))
|
STACK_ROUTINE_PARAMETER
(
1
,
SIZE_CODE
(
sizeof
(
DataHandler
)))
|
STACK_ROUTINE_PARAMETER
(
2
,
SIZE_CODE
(
sizeof
(
wide
*
)))
},
/* kDataHGetFileSize64Select 0x30 */
{
NULL
,
0
},
/* kDataHPreextend64Select */
{
NULL
,
0
},
/* kDataHSetFileSize64Select */
{
NULL
,
0
},
/* kDataHGetFreeSpace64Select */
...
...
@@ -528,7 +605,11 @@ static const struct { LPVOID proc; ProcInfoType type;} componentFunctions[] =
{
NULL
,
0
},
/* 0x4B */
{
NULL
,
0
},
/* 0x4C */
{
NULL
,
0
},
/* 0x4D */
{
NULL
,
0
},
/* kDataHGetAvailableFileSize64Select */
{
myDataHGetAvailableFileSize64
,
kPascalStackBased
|
RESULT_SIZE
(
SIZE_CODE
(
sizeof
(
ComponentResult
)))
|
STACK_ROUTINE_PARAMETER
(
1
,
SIZE_CODE
(
sizeof
(
DataHandler
)))
|
STACK_ROUTINE_PARAMETER
(
2
,
SIZE_CODE
(
sizeof
(
wide
*
)))
},
/* kDataHGetAvailableFileSize64Select */
{
NULL
,
0
},
/* kDataHGetDataAvailability64Select */
};
...
...
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