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
164fe047
Commit
164fe047
authored
Feb 12, 2016
by
Nikolay Sivov
Committed by
Alexandre Julliard
Feb 15, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpr: Query for NPAddConnection and NPAddConnection3 when loading a provider.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e7f725ec
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
18 deletions
+22
-18
wnet.c
dlls/mpr/wnet.c
+22
-18
No files found.
dlls/mpr/wnet.c
View file @
164fe047
...
...
@@ -56,6 +56,8 @@ typedef struct _WNetProvider
PF_NPEnumResource
enumResource
;
PF_NPCloseEnum
closeEnum
;
PF_NPGetResourceInformation
getResourceInformation
;
PF_NPAddConnection
addConnection
;
PF_NPAddConnection3
addConnection3
;
}
WNetProvider
,
*
PWNetProvider
;
typedef
struct
_WNetProviderTable
...
...
@@ -162,8 +164,9 @@ static void _tryLoadProvider(PCWSTR provider)
if
(
hLib
)
{
PF_NPGetCaps
getCaps
=
(
PF_NPGetCaps
)
GetProcAddress
(
hLib
,
"NPGetCaps"
);
#define MPR_GETPROC(proc) ((PF_##proc)GetProcAddress(hLib, #proc))
PF_NPGetCaps
getCaps
=
MPR_GETPROC
(
NPGetCaps
);
TRACE
(
"loaded lib %p
\n
"
,
hLib
);
if
(
getCaps
)
...
...
@@ -182,22 +185,17 @@ static void _tryLoadProvider(PCWSTR provider)
if
(
provider
->
dwEnumScopes
)
{
TRACE
(
"supports enumeration
\n
"
);
provider
->
openEnum
=
(
PF_NPOpenEnum
)
GetProcAddress
(
hLib
,
"NPOpenEnum"
);
TRACE
(
"openEnum is %p
\n
"
,
provider
->
openEnum
);
provider
->
enumResource
=
(
PF_NPEnumResource
)
GetProcAddress
(
hLib
,
"NPEnumResource"
);
TRACE
(
"enumResource is %p
\n
"
,
provider
->
enumResource
);
provider
->
closeEnum
=
(
PF_NPCloseEnum
)
GetProcAddress
(
hLib
,
"NPCloseEnum"
);
TRACE
(
"closeEnum is %p
\n
"
,
provider
->
closeEnum
);
provider
->
getResourceInformation
=
(
PF_NPGetResourceInformation
)
GetProcAddress
(
hLib
,
"NPGetResourceInformation"
);
TRACE
(
"getResourceInformation is %p
\n
"
,
provider
->
getResourceInformation
);
if
(
!
provider
->
openEnum
||
!
provider
->
enumResource
||
!
provider
->
closeEnum
)
provider
->
openEnum
=
MPR_GETPROC
(
NPOpenEnum
);
TRACE
(
"NPOpenEnum %p
\n
"
,
provider
->
openEnum
);
provider
->
enumResource
=
MPR_GETPROC
(
NPEnumResource
);
TRACE
(
"NPEnumResource %p
\n
"
,
provider
->
enumResource
);
provider
->
closeEnum
=
MPR_GETPROC
(
NPCloseEnum
);
TRACE
(
"NPCloseEnum %p
\n
"
,
provider
->
closeEnum
);
provider
->
getResourceInformation
=
MPR_GETPROC
(
NPGetResourceInformation
);
TRACE
(
"NPGetResourceInformation %p
\n
"
,
provider
->
getResourceInformation
);
if
(
!
provider
->
openEnum
||
!
provider
->
enumResource
||
!
provider
->
closeEnum
)
{
provider
->
openEnum
=
NULL
;
provider
->
enumResource
=
NULL
;
...
...
@@ -206,6 +204,10 @@ static void _tryLoadProvider(PCWSTR provider)
WARN
(
"Couldn't load enumeration functions
\n
"
);
}
}
provider
->
addConnection
=
MPR_GETPROC
(
NPAddConnection
);
provider
->
addConnection3
=
MPR_GETPROC
(
NPAddConnection3
);
TRACE
(
"NPAddConnection %p
\n
"
,
provider
->
addConnection
);
TRACE
(
"NPAddConnection3 %p
\n
"
,
provider
->
addConnection3
);
providerTable
->
numProviders
++
;
}
else
...
...
@@ -215,6 +217,8 @@ static void _tryLoadProvider(PCWSTR provider)
HeapFree
(
GetProcessHeap
(),
0
,
name
);
FreeLibrary
(
hLib
);
}
#undef MPR_GETPROC
}
else
{
...
...
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