Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
8fc00076
Commit
8fc00076
authored
Jul 23, 2000
by
Mike McCormack
Committed by
Alexandre Julliard
Jul 23, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented lineGetCountry. (works with HyperTrm.exe)
parent
cf80f0ab
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
138 additions
and
2 deletions
+138
-2
line.c
dlls/tapi32/line.c
+116
-1
tapi.h
include/tapi.h
+22
-1
No files found.
dlls/tapi32/line.c
View file @
8fc00076
...
...
@@ -257,12 +257,127 @@ DWORD WINAPI lineGetConfRelatedCalls(HCALL hCall, LPLINECALLLIST lpCallList)
return
0
;
}
typedef
struct
tagTAPI_CountryInfo
{
DWORD
dwCountryID
;
DWORD
dwCountryCode
;
LPSTR
lpCountryName
;
LPSTR
lpSameAreaRule
;
LPSTR
lpLongDistanceRule
;
LPSTR
lpInternationalRule
;
}
TAPI_CountryInfo
;
/* FIXME: this should be stored in an ini file... perhaps TAPI.INI */
static
TAPI_CountryInfo
TAPI_LCList
[]
=
{
{
1
,
61
,
"Australia"
,
""
,
"0"
,
"0011"
},
{
2
,
86
,
"China"
,
""
,
"0"
,
"00"
},
{
3
,
82
,
"Korea"
,
""
,
"0"
,
"00"
},
{
4
,
1
,
"USA"
,
""
,
"0"
,
"001"
},
};
#define NUMCOUNTRIES (sizeof TAPI_LCList/sizeof (TAPI_CountryInfo))
/***********************************************************************
* lineGetCountry (TAPI32.@)
*/
DWORD
WINAPI
lineGetCountry
(
DWORD
dwCountryID
,
DWORD
dwAPIVersion
,
LPLINECOUNTRYLIST
lpLineCountryList
)
{
FIXME
(
"(%08lx, %08lx, %p): stub.
\n
"
,
dwCountryID
,
dwAPIVersion
,
lpLineCountryList
);
DWORD
dwAvailSize
,
dwOffset
,
i
;
LPLINECOUNTRYENTRY
lpLCE
;
TRACE
(
"(%08lx, %08lx, %p): stub.
\n
"
,
dwCountryID
,
dwAPIVersion
,
lpLineCountryList
);
dwAvailSize
=
lpLineCountryList
->
dwTotalSize
;
dwOffset
=
sizeof
(
LINECOUNTRYLIST
);
if
(
dwAvailSize
<
dwOffset
)
return
LINEERR_STRUCTURETOOSMALL
;
if
(
!
lpLineCountryList
)
return
LINEERR_INVALPOINTER
;
memset
(
lpLineCountryList
,
0
,
dwAvailSize
);
lpLineCountryList
->
dwUsedSize
=
dwOffset
;
lpLineCountryList
->
dwNumCountries
=
0
;
lpLineCountryList
->
dwCountryListSize
=
0
;
lpLineCountryList
->
dwCountryListOffset
=
dwOffset
;
lpLCE
=
(
LPLINECOUNTRYENTRY
)(
&
lpLineCountryList
[
1
]);
dwOffset
+=
NUMCOUNTRIES
*
sizeof
(
LINECOUNTRYENTRY
);
for
(
i
=
0
;
i
<
NUMCOUNTRIES
;
i
++
)
{
LPSTR
lpstr
;
DWORD
len
;
if
(
dwCountryID
&&
(
TAPI_LCList
[
i
].
dwCountryID
!=
dwCountryID
))
continue
;
len
=
lstrlenA
(
TAPI_LCList
[
i
].
lpCountryName
)
+
1
;
len
+=
lstrlenA
(
TAPI_LCList
[
i
].
lpSameAreaRule
)
+
1
;
len
+=
lstrlenA
(
TAPI_LCList
[
i
].
lpLongDistanceRule
)
+
1
;
len
+=
lstrlenA
(
TAPI_LCList
[
i
].
lpInternationalRule
)
+
1
;
if
(
dwAvailSize
<
(
dwOffset
+
len
))
{
dwOffset
+=
len
;
continue
;
}
lpLineCountryList
->
dwNumCountries
++
;
lpLineCountryList
->
dwCountryListSize
+=
len
;
lpLineCountryList
->
dwUsedSize
+=
sizeof
(
LINECOUNTRYENTRY
);
/* maybe wrong */
TRACE
(
"Adding country %s at %p
\n
"
,
TAPI_LCList
[
i
].
lpCountryName
,
lpLCE
);
lpLCE
[
i
].
dwCountryID
=
TAPI_LCList
[
i
].
dwCountryID
;
lpLCE
[
i
].
dwCountryCode
=
TAPI_LCList
[
i
].
dwCountryCode
;
/* deal with troublesome dwNextCountryID */
if
(
(
i
+
1
)
==
NUMCOUNTRIES
)
lpLCE
[
i
].
dwNextCountryID
=
0
;
else
lpLCE
[
i
].
dwNextCountryID
=
TAPI_LCList
[
i
+
1
].
dwCountryID
;
/* add country name */
len
=
lstrlenA
(
TAPI_LCList
[
i
].
lpCountryName
)
+
1
;
lpLCE
[
i
].
dwCountryNameSize
=
len
;
lpLCE
[
i
].
dwCountryNameOffset
=
dwOffset
;
lpstr
=
((
LPSTR
)
lpLineCountryList
)
+
dwOffset
;
lstrcpyA
(
lpstr
,
TAPI_LCList
[
i
].
lpCountryName
);
dwOffset
+=
len
;
/* add Same Area Rule */
len
=
lstrlenA
(
TAPI_LCList
[
i
].
lpSameAreaRule
)
+
1
;
lpLCE
[
i
].
dwSameAreaRuleSize
=
len
;
lpLCE
[
i
].
dwSameAreaRuleOffset
=
dwOffset
;
lpstr
=
((
LPSTR
)
lpLineCountryList
)
+
dwOffset
;
lstrcpyA
(
lpstr
,
TAPI_LCList
[
i
].
lpSameAreaRule
);
dwOffset
+=
len
;
/* add Long Distance Rule */
len
=
lstrlenA
(
TAPI_LCList
[
i
].
lpLongDistanceRule
)
+
1
;
lpLCE
[
i
].
dwLongDistanceRuleSize
=
len
;
lpLCE
[
i
].
dwLongDistanceRuleOffset
=
dwOffset
;
lpstr
=
((
LPSTR
)
lpLineCountryList
)
+
dwOffset
;
lstrcpyA
(
lpstr
,
TAPI_LCList
[
i
].
lpLongDistanceRule
);
dwOffset
+=
len
;
/* add Long Distance Rule */
len
=
lstrlenA
(
TAPI_LCList
[
i
].
lpInternationalRule
)
+
1
;
lpLCE
[
i
].
dwInternationalRuleSize
=
len
;
lpLCE
[
i
].
dwInternationalRuleOffset
=
dwOffset
;
lpstr
=
((
LPSTR
)
lpLineCountryList
)
+
dwOffset
;
lstrcpyA
(
lpstr
,
TAPI_LCList
[
i
].
lpInternationalRule
);
dwOffset
+=
len
;
}
lpLineCountryList
->
dwNeededSize
=
dwOffset
;
TRACE
(
"%ld available %ld required
\n
"
,
dwAvailSize
,
dwOffset
);
return
0
;
}
...
...
include/tapi.h
View file @
8fc00076
...
...
@@ -20,7 +20,14 @@ typedef HANDLE HPHONE, *LPHPHONE;
typedef
HANDLE
HPHONEAPP
,
*
LPHPHONEAPP
;
/* FIXME: bogus codes !! */
#define TAPIERR_REQUESTFAILED 20
#define TAPIERR_REQUESTFAILED 20
#define LINEERR_INCOMPATIBLEAPIVERSION 1
#define LINEERR_NOMEM 1
#define LINEERR_INIFILECORRUPT 1
#define LINEERR_OPERATIONFAILED 1
#define LINEERR_INVALCOUNTRYCODE 1
#define LINEERR_STRUCTURETOOSMALL 1
#define LINEERR_INVALPOINTER 1
typedef
struct
lineaddresscaps_tag
{
DWORD
dwTotalSize
;
...
...
@@ -228,6 +235,20 @@ typedef struct linecountrylist_tag {
DWORD
dwCountryListOffset
;
}
LINECOUNTRYLIST
,
*
LPLINECOUNTRYLIST
;
typedef
struct
linecountryentry_tag
{
DWORD
dwCountryID
;
DWORD
dwCountryCode
;
DWORD
dwNextCountryID
;
DWORD
dwCountryNameSize
;
DWORD
dwCountryNameOffset
;
DWORD
dwSameAreaRuleSize
;
DWORD
dwSameAreaRuleOffset
;
DWORD
dwLongDistanceRuleSize
;
DWORD
dwLongDistanceRuleOffset
;
DWORD
dwInternationalRuleSize
;
DWORD
dwInternationalRuleOffset
;
}
LINECOUNTRYENTRY
,
*
LPLINECOUNTRYENTRY
;
typedef
struct
linedevcaps_tag
{
DWORD
dwTotalSize
;
DWORD
dwNeededSize
;
...
...
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