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
ab14429b
Commit
ab14429b
authored
Apr 12, 2004
by
Rein Klazes
Committed by
Alexandre Julliard
Apr 12, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement tapiGetLocationInfo.
parent
9ce6ff26
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
9 deletions
+48
-9
assisted.c
dlls/tapi32/assisted.c
+48
-9
No files found.
dlls/tapi32/assisted.c
View file @
ab14429b
...
...
@@ -19,9 +19,10 @@
*/
#include <stdarg.h>
#include <stdio.h>
#include "windef.h"
#include "winbase.h"
#include "winreg.h"
#include "tapi.h"
#include "wine/debug.h"
...
...
@@ -32,14 +33,52 @@ WINE_DEFAULT_DEBUG_CHANNEL(tapi);
*/
DWORD
WINAPI
tapiGetLocationInfo
(
LPSTR
lpszCountryCode
,
LPSTR
lpszCityCode
)
{
char
temp
[
30
];
FIXME
(
"(%p, %p): file sections ???
\n
"
,
lpszCountryCode
,
lpszCityCode
);
if
(
!
(
GetPrivateProfileStringA
(
"Locations"
,
"CurrentLocation"
,
""
,
temp
,
30
,
"telephon.ini"
)))
return
TAPIERR_REQUESTFAILED
;
if
(
!
(
GetPrivateProfileStringA
(
"Locations"
,
"FIXME_ENTRY"
,
""
,
lpszCityCode
,
8
,
"telephon.ini"
)))
return
TAPIERR_REQUESTFAILED
;
return
0
;
HKEY
hkey
,
hsubkey
;
DWORD
currid
;
DWORD
valsize
;
DWORD
type
;
DWORD
bufsize
;
BYTE
buf
[
100
];
char
szlockey
[
20
];
if
(
!
RegOpenKeyA
(
HKEY_LOCAL_MACHINE
,
"Software
\\
Microsoft
\\
Windows
\\
CurrentVersion
\\
Telephony
\\
Locations"
,
&
hkey
)
!=
ERROR_SUCCESS
)
{
valsize
=
sizeof
(
DWORD
);
if
(
!
RegQueryValueExA
(
hkey
,
"CurrentID"
,
0
,
&
type
,
(
LPBYTE
)
&
currid
,
&
valsize
)
&&
type
==
REG_DWORD
)
{
/* find a subkey called Location1, Location2... */
sprintf
(
szlockey
,
"Location%lu"
,
currid
);
if
(
!
RegOpenKeyA
(
hkey
,
szlockey
,
&
hsubkey
))
{
if
(
lpszCityCode
)
{
bufsize
=
sizeof
(
buf
);
if
(
!
RegQueryValueExA
(
hsubkey
,
"AreaCode"
,
0
,
&
type
,
buf
,
&
bufsize
)
&&
type
==
REG_SZ
)
{
strncpy
(
lpszCityCode
,
(
char
*
)
buf
,
8
);
if
(
bufsize
>
8
)
lpszCityCode
[
7
]
=
'\0'
;
}
else
lpszCityCode
[
0
]
=
'\0'
;
}
if
(
lpszCountryCode
)
{
bufsize
=
sizeof
(
buf
);
if
(
!
RegQueryValueExA
(
hsubkey
,
"Country"
,
0
,
&
type
,
buf
,
&
bufsize
)
&&
type
==
REG_DWORD
)
snprintf
(
lpszCountryCode
,
8
,
"%lu"
,
*
(
LPDWORD
)
buf
);
else
lpszCountryCode
[
0
]
=
'\0'
;
}
TRACE
(
"(%p
\"
%s
\"
, %p
\"
%s
\"
): success.
\n
"
,
lpszCountryCode
,
debugstr_a
(
lpszCountryCode
),
lpszCityCode
,
debugstr_a
(
lpszCityCode
));
RegCloseKey
(
hkey
);
RegCloseKey
(
hsubkey
);
return
0
;
/* SUCCESS */
}
}
RegCloseKey
(
hkey
);
}
WARN
(
"(%p, %p): failed (no telephony registry entries?).
\n
"
,
lpszCountryCode
,
lpszCityCode
);
return
TAPIERR_REQUESTFAILED
;
}
/***********************************************************************
...
...
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