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
8a43775e
Commit
8a43775e
authored
Aug 08, 2005
by
Mike McCormack
Committed by
Alexandre Julliard
Aug 08, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use xmlParseMemory instead of xmlReadIO.
parent
3c312f46
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
23 deletions
+23
-23
domdoc.c
dlls/msxml3/domdoc.c
+23
-23
No files found.
dlls/msxml3/domdoc.c
View file @
8a43775e
...
@@ -627,38 +627,38 @@ static HRESULT WINAPI domdoc_nodeFromID(
...
@@ -627,38 +627,38 @@ static HRESULT WINAPI domdoc_nodeFromID(
return
E_NOTIMPL
;
return
E_NOTIMPL
;
}
}
static
int
read_input_callback
(
void
*
context
,
char
*
buffer
,
int
len
)
{
HANDLE
handle
=
context
;
DWORD
count
=
0
;
BOOL
r
;
r
=
ReadFile
(
handle
,
buffer
,
len
,
&
count
,
NULL
);
if
(
!
r
)
return
-
1
;
return
count
;
}
static
int
input_close_callback
(
void
*
context
)
{
HANDLE
handle
=
context
;
return
CloseHandle
(
handle
)
?
0
:
-
1
;
}
static
xmlDocPtr
doread
(
LPWSTR
filename
)
static
xmlDocPtr
doread
(
LPWSTR
filename
)
{
{
HANDLE
handle
;
HANDLE
handle
,
mapping
;
DWORD
len
;
xmlDocPtr
xmldoc
=
NULL
;
char
*
ptr
;
TRACE
(
"%s
\n
"
,
debugstr_w
(
filename
));
TRACE
(
"%s
\n
"
,
debugstr_w
(
filename
));
handle
=
CreateFileW
(
filename
,
GENERIC_READ
,
FILE_SHARE_READ
,
handle
=
CreateFileW
(
filename
,
GENERIC_READ
,
FILE_SHARE_READ
,
NULL
,
OPEN_EXISTING
,
0
,
NULL
);
NULL
,
OPEN_EXISTING
,
0
,
NULL
);
if
(
handle
==
INVALID_HANDLE_VALUE
)
if
(
handle
==
INVALID_HANDLE_VALUE
)
return
NULL
;
return
xmldoc
;
len
=
GetFileSize
(
handle
,
NULL
);
if
(
len
!=
INVALID_FILE_SIZE
||
GetLastError
()
==
NO_ERROR
)
{
mapping
=
CreateFileMappingW
(
handle
,
NULL
,
PAGE_READONLY
,
0
,
0
,
NULL
);
if
(
mapping
)
{
ptr
=
MapViewOfFile
(
mapping
,
FILE_MAP_READ
,
0
,
0
,
len
);
if
(
ptr
)
{
xmldoc
=
xmlParseMemory
(
ptr
,
len
);
UnmapViewOfFile
(
ptr
);
}
CloseHandle
(
mapping
);
}
}
CloseHandle
(
handle
);
return
xmlReadIO
(
read_input_callback
,
input_close_callback
,
return
xmldoc
;
handle
,
NULL
,
NULL
,
0
);
}
}
...
...
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