Another TAPI issue (Microkey Millennium)
-
- Level 2
- Posts: 18
- Joined: Thu Jun 18, 2009 6:44 pm
Another TAPI issue (Microkey Millennium)
Everything appears to install properly under wine when I'm setting up Millennium, but when I try to launch it, I get the following error:
"The procedure entry point phoneInitializeExA could not be located in the dynamic link library tapi32.dll"
I know tapi support in wine is woefully underdeveloped, but does anyone know if there's some kind of work-around for this kind of error?
"The procedure entry point phoneInitializeExA could not be located in the dynamic link library tapi32.dll"
I know tapi support in wine is woefully underdeveloped, but does anyone know if there's some kind of work-around for this kind of error?
-
- Level 2
- Posts: 18
- Joined: Thu Jun 18, 2009 6:44 pm
If you know how to patch and compile wine , you could try the
attached patch
attached patch
Code: Select all
diff --git a/dlls/tapi32/phone.c b/dlls/tapi32/phone.c
index 994d787..662d8e8 100644
--- a/dlls/tapi32/phone.c
+++ b/dlls/tapi32/phone.c
@@ -205,6 +205,27 @@ DWORD WINAPI phoneInitialize(LPHPHONEAPP lphPhoneApp, HINSTANCE hInstance, PHONE
}
/***********************************************************************
+ * phoneInitializeiExA (TAPI32.@)
+ */
+DWORD WINAPI phoneInitializeExA(LPHPHONEAPP lphPhoneApp, HINSTANCE hInstance, PHONECALLBACK lpfnCallback, LPCSTR lpszAppName, LPDWORD lpdwNumDevs, LPDWORD lpdwAPIVersion, LPPHONEINITIALIZEEXPARAMS lpPhoneInitializeExParams)
+{
+ FIXME("(%p, %p, %p, %s, %p, %p, %p): stub.\n", lphPhoneApp, hInstance, lpfnCallback, lpszAppName, lpdwNumDevs, lpdwAPIVersion, lpPhoneInitializeExParams);
+ *lpdwNumDevs = 0;
+ return 0;
+}
+
+/***********************************************************************
+ * phoneInitializeiExW (TAPI32.@)
+ */
+DWORD WINAPI phoneInitializeExW(LPHPHONEAPP lphPhoneApp, HINSTANCE hInstance, PHONECALLBACK lpfnCallback, LPCWSTR lpszAppName, LPDWORD lpdwNumDevs, LPDWORD lpdwAPIVersion, LPPHONEINITIALIZEEXPARAMS lpPhoneInitializeExParams)
+{
+ FIXME("(%p, %p, %p, %s, %p, %p, %p): stub.\n", lphPhoneApp, hInstance, lpfnCallback, debugstr_w(lpszAppName), lpdwNumDevs, lpdwAPIVersion, lpPhoneInitializeExParams);
+ *lpdwNumDevs = 0;
+ return 0;
+}
+
+
+/***********************************************************************
* phoneNegotiateAPIVersion (TAPI32.@)
*/
DWORD WINAPI phoneNegotiateAPIVersion(HPHONEAPP hPhoneApp, DWORD dwDeviceID, DWORD dwAPILowVersion, DWORD dwAPIHighVersion, LPDWORD lpdwAPIVersion, LPPHONEEXTENSIONID lpExtensionID)
diff --git a/dlls/tapi32/tapi32.spec b/dlls/tapi32/tapi32.spec
index ce7a04d..47f30ba 100644
--- a/dlls/tapi32/tapi32.spec
+++ b/dlls/tapi32/tapi32.spec
@@ -144,6 +144,8 @@
@ stdcall phoneGetStatusMessages(long ptr ptr ptr)
@ stdcall phoneGetVolume(long long ptr)
@ stdcall phoneInitialize(ptr long ptr str ptr)
+@ stdcall phoneInitializeExA(ptr long ptr str ptr ptr ptr)
+@ stdcall phoneInitializeExW(ptr long ptr str ptr ptr ptr)
@ stdcall phoneNegotiateAPIVersion(long long long long ptr ptr)
@ stdcall phoneNegotiateExtVersion(long long long long long ptr)
@ stdcall phoneOpen(long long ptr long long long long)
diff --git a/include/tapi.h b/include/tapi.h
index ca2c4c8..73b699e 100644
--- a/include/tapi.h
+++ b/include/tapi.h
@@ -846,6 +846,18 @@ typedef struct phonestatus_tag {
DWORD dwDevSpecificOffset;
} PHONESTATUS, *LPPHONESTATUS;
+typedef struct phoneinitializeexparams_tag {
+ DWORD dwTotalSize;
+ DWORD dwNeededSize;
+ DWORD dwUsedSize;
+ DWORD dwOptions;
+ union {
+ HANDLE hEvent;
+ HANDLE hCompletionPort;
+ } Handles;
+ DWORD dwCompletionKey;
+} PHONEINITIALIZEEXPARAMS, *LPPHONEINITIALIZEEXPARAMS;
+
typedef void (CALLBACK *PHONECALLBACK)(HANDLE, DWORD, DWORD, DWORD, DWORD, DWORD);
typedef struct varstring_tag {
-
- Level 2
- Posts: 18
- Joined: Thu Jun 18, 2009 6:44 pm
-
- Level 2
- Posts: 18
- Joined: Thu Jun 18, 2009 6:44 pm
So I downloaded and extracted the source for 1.1.27 into ~/wine, saved what you posted as ~/wine/tapi32.diff and ran "patch -p1 < tapi32.diff" and was given the following output:
Did I miss a step somewhere?
Code: Select all
patching file dlls/tapi32/phone.c
Hunk #1 FAILED at 205.
1 out of 1 hunk FAILED -- saving rejects to file dlls/tapi32/phone.c.rej
patching file dlls/tapi32/tapi32.spec
Hunk #1 FAILED at 144.
1 out of 1 hunk FAILED -- saving rejects to file dlls/tapi32/tapi32.spec.rej
patching file include/tapi.h
Hunk #1 succeeded at 846 with fuzz 1.
i think the text got mangled because i copy and pasted it...
i put up the patch here:
http://ompldr.org/vYTVyeQ/q.txt
and than you could apply it by patch -p1 <q.txt
i put up the patch here:
http://ompldr.org/vYTVyeQ/q.txt
and than you could apply it by patch -p1 <q.txt
-
- Level 2
- Posts: 18
- Joined: Thu Jun 18, 2009 6:44 pm
well , that's strange, it should be present really. i've put up the patched tapi32.spec (and phone.c) source fiile here http://ompldr.org/vYTVzdg/tapi32.tar . If you untar this file in directory dlls/tapi32 it should work i thinkThat file doesn't exist, by the way... At least not in the source I downloaded...
-
- Level 2
- Posts: 18
- Joined: Thu Jun 18, 2009 6:44 pm
Ha! Oh, wow... I was foolish enough to assume that the folder at the top of this listing was the most current without scrolling down...dimesio wrote:Is that a typo, or did you really download a two year old version of Wine?
I'll try this again using the proper source, but I have a feeling I'm still going to have problems, because NOW I'm getting:
"The procedure entry point phoneGetMessage could not be located in the dynamic link library tapi32.dll"
-
- Level 2
- Posts: 18
- Joined: Thu Jun 18, 2009 6:44 pm
Well, see msdn http://msdn.microsoft.com/en-us/library ... 85%29.aspxhow did you find what you needed to add to the DLL source?
So to get rid of the new error message add the function to tapi32.spec file and tapi.c, in a similar way like i did with the other function. good luck!
-
- Level 2
- Posts: 18
- Joined: Thu Jun 18, 2009 6:44 pm
-
- Level 2
- Posts: 18
- Joined: Thu Jun 18, 2009 6:44 pm
While I wait for this to compile (again), could I get you to look at the modifications I made to the patch file? I tried to follow along the same format that you used as well as what already existed in the phone.c and tapi32.spec...
Code: Select all
diff --git a/dlls/tapi32/phone.c b/dlls/tapi32/phone.c
index 994d787..662d8e8 100644
--- a/dlls/tapi32/phone.c
+++ b/dlls/tapi32/phone.c
@@ -205,6 +205,27 @@ DWORD WINAPI phoneInitialize(LPHPHONEAPP lphPhoneApp, HINSTANCE hInstance, PHONE
}
/***********************************************************************
+ * phoneInitializeiExA (TAPI32.@)
+ */
+DWORD WINAPI phoneInitializeExA(LPHPHONEAPP lphPhoneApp, HINSTANCE hInstance, PHONECALLBACK lpfnCallback, LPCSTR lpszAppName, LPDWORD lpdwNumDevs, LPDWORD lpdwAPIVersion, LPPHONEINITIALIZEEXPARAMS lpPhoneInitializeExParams)
+{
+ FIXME("(%p, %p, %p, %s, %p, %p, %p): stub.\n", lphPhoneApp, hInstance, lpfnCallback, lpszAppName, lpdwNumDevs, lpdwAPIVersion, lpPhoneInitializeExParams);
+ *lpdwNumDevs = 0;
+ return 0;
+}
+
+/***********************************************************************
+ * phoneInitializeiExW (TAPI32.@)
+ */
+DWORD WINAPI phoneInitializeExW(LPHPHONEAPP lphPhoneApp, HINSTANCE hInstance, PHONECALLBACK lpfnCallback, LPCWSTR lpszAppName, LPDWORD lpdwNumDevs, LPDWORD lpdwAPIVersion, LPPHONEINITIALIZEEXPARAMS lpPhoneInitializeExParams)
+{
+ FIXME("(%p, %p, %p, %s, %p, %p, %p): stub.\n", lphPhoneApp, hInstance, lpfnCallback, debugstr_w(lpszAppName), lpdwNumDevs, lpdwAPIVersion, lpPhoneInitializeExParams);
+ *lpdwNumDevs = 0;
+ return 0;
+}
+
+
+/***********************************************************************
+ * phoneGetMessage (TAPI32.@)
+ */
+DWORD WINAPI phoneGetMessage(HPHONEAPP hPhoneApp, LPPHONEMESSAGE lpMessage, DWORD dwTimeout)
+{
+ FIXME("(%p, %p, %08x): stub.\n", hPhoneApp, lpMessage, dwTimeout);
+ *lpdwNumDevs = 0;
+ return 0;
+}
+
+
+/***********************************************************************
* phoneNegotiateAPIVersion (TAPI32.@)
*/
DWORD WINAPI phoneNegotiateAPIVersion(HPHONEAPP hPhoneApp, DWORD dwDeviceID, DWORD dwAPILowVersion, DWORD dwAPIHighVersion, LPDWORD lpdwAPIVersion, LPPHONEEXTENSIONID lpExtensionID)
diff --git a/dlls/tapi32/tapi32.spec b/dlls/tapi32/tapi32.spec
index ce7a04d..47f30ba 100644
--- a/dlls/tapi32/tapi32.spec
+++ b/dlls/tapi32/tapi32.spec
@@ -144,6 +144,8 @@
@ stdcall phoneGetStatusMessages(long ptr ptr ptr)
@ stdcall phoneGetVolume(long long ptr)
@ stdcall phoneInitialize(ptr long ptr str ptr)
+@ stdcall phoneInitializeExA(ptr long ptr str ptr ptr ptr)
+@ stdcall phoneInitializeExW(ptr long ptr str ptr ptr ptr)
+@ stdcall phoneGetMessage(long long ptr)
@ stdcall phoneNegotiateAPIVersion(long long long long ptr ptr)
@ stdcall phoneNegotiateExtVersion(long long long long long ptr)
@ stdcall phoneOpen(long long ptr long long long long)
diff --git a/include/tapi.h b/include/tapi.h
index ca2c4c8..73b699e 100644
--- a/include/tapi.h
+++ b/include/tapi.h
@@ -846,6 +846,18 @@ typedef struct phonestatus_tag {
DWORD dwDevSpecificOffset;
} PHONESTATUS, *LPPHONESTATUS;
+typedef struct phoneinitializeexparams_tag {
+ DWORD dwTotalSize;
+ DWORD dwNeededSize;
+ DWORD dwUsedSize;
+ DWORD dwOptions;
+ union {
+ HANDLE hEvent;
+ HANDLE hCompletionPort;
+ } Handles;
+ DWORD dwCompletionKey;
+} PHONEINITIALIZEEXPARAMS, *LPPHONEINITIALIZEEXPARAMS;
+
typedef void (CALLBACK *PHONECALLBACK)(HANDLE, DWORD, DWORD, DWORD, DWORD, DWORD);
typedef struct varstring_tag {
Hi
That isn't going to work
The lpdwNumDevs argument doesn't exist in that function. I'm also not sure about what to do with the remaining arguments, but I guess a simple stub such as that one *might* be enough for your program to run if you don't use this functionality.
So, remove "*lpdwNumDevs = 0; ".
Also, I', not familiar with wine's spec files, so I can't assure you that this is right:
However, from basic thinking, I'd say it's wrong and, instead of "long long ptr", it should read "long ptr long". Once again, someone should confirm this. This assumes that HPHONEAPP is long, lpMessage is a pointer and dwTimeout, a dword, is long.
Cheers,
Jorl17
That isn't going to work
Code: Select all
+DWORD WINAPI phoneGetMessage(HPHONEAPP hPhoneApp, LPPHONEMESSAGE lpMessage, DWORD dwTimeout)
+{
+ FIXME("(%p, %p, %08x): stub.\n", hPhoneApp, lpMessage, dwTimeout);
+ *lpdwNumDevs = 0;
+ return 0;
+}
So, remove "*lpdwNumDevs = 0; ".
Also, I', not familiar with wine's spec files, so I can't assure you that this is right:
Code: Select all
+@ stdcall phoneGetMessage(long long ptr)
Cheers,
Jorl17
-
- Level 2
- Posts: 18
- Joined: Thu Jun 18, 2009 6:44 pm
Thanks for the help, guys. I didn't mess with this at all over the long weekend, but I'm back in the office and attempting to compile it with the suggested corrections.
...
Well, it just threw an error and aborted the install.
Here's the modified patch.dff file I used:
...
Well, it just threw an error and aborted the install.
Code: Select all
gcc -c -I. -I. -I../../include -I../../include -D__WINESRC__ -D_REENTRANT -fPIC -Wall -pipe -fno-strict-aliasing -Wdeclaration-after-statement -Wempty-body -Wstrict-prototypes -Wtype-limits -Wwrite-strings -Wpointer-arith -Wlogical-op -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 -o phone.o phone.c
phone.c:231:51: error: expected declaration specifiers or ‘...’ before ‘LPPHONEMESSAGE’
phone.c: In function ‘phoneGetMessage’:
phone.c:233:1: error: ‘lpMessage’ undeclared (first use in this function)
phone.c:233:1: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [phone.o] Error 1
make[1]: Leaving directory `/home/pspicer/temp/wine-1.3.27/dlls/tapi32'
make: *** [dlls/tapi32] Error 2
Compilation failed, aborting install.
Code: Select all
diff --git a/dlls/tapi32/phone.c b/dlls/tapi32/phone.c
index 994d787..662d8e8 100644
--- a/dlls/tapi32/phone.c
+++ b/dlls/tapi32/phone.c
@@ -205,6 +205,37 @@ DWORD WINAPI phoneInitialize(LPHPHONEAPP lphPhoneApp, HINSTANCE hInstance, PHONE
}
/***********************************************************************
+ * phoneInitializeiExA (TAPI32.@)
+ */
+DWORD WINAPI phoneInitializeExA(LPHPHONEAPP lphPhoneApp, HINSTANCE hInstance, PHONECALLBACK lpfnCallback, LPCSTR lpszAppName, LPDWORD lpdwNumDevs, LPDWORD lpdwAPIVersion, LPPHONEINITIALIZEEXPARAMS lpPhoneInitializeExParams)
+{
+ FIXME("(%p, %p, %p, %s, %p, %p, %p): stub.\n", lphPhoneApp, hInstance, lpfnCallback, lpszAppName, lpdwNumDevs, lpdwAPIVersion, lpPhoneInitializeExParams);
+ *lpdwNumDevs = 0;
+ return 0;
+}
+
+/***********************************************************************
+ * phoneInitializeiExW (TAPI32.@)
+ */
+DWORD WINAPI phoneInitializeExW(LPHPHONEAPP lphPhoneApp, HINSTANCE hInstance, PHONECALLBACK lpfnCallback, LPCWSTR lpszAppName, LPDWORD lpdwNumDevs, LPDWORD lpdwAPIVersion, LPPHONEINITIALIZEEXPARAMS lpPhoneInitializeExParams)
+{
+ FIXME("(%p, %p, %p, %s, %p, %p, %p): stub.\n", lphPhoneApp, hInstance, lpfnCallback, debugstr_w(lpszAppName), lpdwNumDevs, lpdwAPIVersion, lpPhoneInitializeExParams);
+ *lpdwNumDevs = 0;
+ return 0;
+}
+
+
+/***********************************************************************
+ * phoneGetMessage (TAPI32.@)
+ */
+DWORD WINAPI phoneGetMessage(HPHONEAPP hPhoneApp, LPPHONEMESSAGE lpMessage, DWORD dwTimeout)
+{
+ FIXME("(%p, %p, %08x): stub.\n", hPhoneApp, lpMessage, dwTimeout);
+ return 0;
+}
+
+
+/***********************************************************************
* phoneNegotiateAPIVersion (TAPI32.@)
*/
DWORD WINAPI phoneNegotiateAPIVersion(HPHONEAPP hPhoneApp, DWORD dwDeviceID, DWORD dwAPILowVersion, DWORD dwAPIHighVersion, LPDWORD lpdwAPIVersion, LPPHONEEXTENSIONID lpExtensionID)
diff --git a/dlls/tapi32/tapi32.spec b/dlls/tapi32/tapi32.spec
index ce7a04d..47f30ba 100644
--- a/dlls/tapi32/tapi32.spec
+++ b/dlls/tapi32/tapi32.spec
@@ -144,6 +144,9 @@
@ stdcall phoneGetStatusMessages(long ptr ptr ptr)
@ stdcall phoneGetVolume(long long ptr)
@ stdcall phoneInitialize(ptr long ptr str ptr)
+@ stdcall phoneInitializeExA(ptr long ptr str ptr ptr ptr)
+@ stdcall phoneInitializeExW(ptr long ptr str ptr ptr ptr)
+@ stdcall phoneGetMessage(long ptr long)
@ stdcall phoneNegotiateAPIVersion(long long long long ptr ptr)
@ stdcall phoneNegotiateExtVersion(long long long long long ptr)
@ stdcall phoneOpen(long long ptr long long long long)
diff --git a/include/tapi.h b/include/tapi.h
index ca2c4c8..73b699e 100644
--- a/include/tapi.h
+++ b/include/tapi.h
@@ -846,6 +846,18 @@ typedef struct phonestatus_tag {
DWORD dwDevSpecificOffset;
} PHONESTATUS, *LPPHONESTATUS;
+typedef struct phoneinitializeexparams_tag {
+ DWORD dwTotalSize;
+ DWORD dwNeededSize;
+ DWORD dwUsedSize;
+ DWORD dwOptions;
+ union {
+ HANDLE hEvent;
+ HANDLE hCompletionPort;
+ } Handles;
+ DWORD dwCompletionKey;
+} PHONEINITIALIZEEXPARAMS, *LPPHONEINITIALIZEEXPARAMS;
+
typedef void (CALLBACK *PHONECALLBACK)(HANDLE, DWORD, DWORD, DWORD, DWORD, DWORD);
typedef struct varstring_tag {
Ah, it may be the case that the LPPHONEMESSAGE structure isn't defined!
Add the following:
Right below the line that reads
That's copied right out of MSDN.
Cheers,
Jorl17
Add the following:
Code: Select all
typedef struct phonemessage_tag {
DWORD hDevice;
DWORD dwMessageID;
DWORD_PTR dwCallbackInstance;
DWORD_PTR dwParam1;
DWORD_PTR dwParam2;
DWORD_PTR dwParam3;
} PHONEMESSAGE, *LPPHONEMESSAGE;
Code: Select all
} PHONEINITIALIZEEXPARAMS, *LPPHONEINITIALIZEEXPARAMS;
Cheers,
Jorl17
-
- Level 2
- Posts: 18
- Joined: Thu Jun 18, 2009 6:44 pm
Two things.tomatogoatee wrote:Thank you, Jori. I'll let you know in another half hour if it compiles successfully. :p
I really need to learn more about programming so I can help myself more than rely on you guys. But don't get me wrong, I truly appreciate all of your help!
First, it's Jorl, with an 'L' It's been a while since people last failed to get my silly nickname!
Second, since you're learning, might I add that I was wrong when I said "it may be the case that the LPPHONEMESSAGE structure isn't defined!". I should've said that it may be the case that the LPPHONEMESSAGE type isn't defined. The type itself is a pointer to a PHONEMESSAGE structure.
Just to clear things up, since you're not into programming and I wouldn't like to be giving you false terms.
Also. Are you compiling for the specific number of cores you have with the -j option? It really helps speeding up things. For instance, in this PC, I found that -j32 is the best option speed-wise.
-
- Level 2
- Posts: 18
- Joined: Thu Jun 18, 2009 6:44 pm
Sorry, jorl. ;)
O.K... Compiling finished and I reinstalled Millennium and am NOW greeted with a 'lineGetMessage could not be located.' I really wish the folks at Microkey would let me know all the procedures this stupid program requires so I can just get them all in one lump instead of this compile-uninstall-patch-recompile-new error process...
Also, I'm doing the compiling using the ./tools/wineinstall script. Is there a way to specify the -j option? (The machine doing all the work has a dual-core processor.)
O.K... Compiling finished and I reinstalled Millennium and am NOW greeted with a 'lineGetMessage could not be located.' I really wish the folks at Microkey would let me know all the procedures this stupid program requires so I can just get them all in one lump instead of this compile-uninstall-patch-recompile-new error process...
Also, I'm doing the compiling using the ./tools/wineinstall script. Is there a way to specify the -j option? (The machine doing all the work has a dual-core processor.)
-
- Level 2
- Posts: 18
- Joined: Thu Jun 18, 2009 6:44 pm
O.K... Using what I've "learned" so far, I've added the following to the patch.diff from the MSDN site:
for line.c,
for tapi32.spec and
for tapi.h. (I based this on the information I gleamed from the phoneGetMessage additions.) Does this look good? (I'm attempting to compile now, so it'll be busy for a bit...)
Code: Select all
+ * lineGetMessage (TAPI32.@)
+ */
+DWORD WINAPI lineGetMessage(HLINEAPP hLineApp, LPLINEMESSAGE lpMessage, DWORD dwTimeout)
+{
+ FIXME("(%p, %p, %08x): stub.\n", hLineApp, lpMessage, dwTimeout);
+ return 0;
+}
Code: Select all
+@ stdcall lineGetMessage(long ptr long)
Code: Select all
+typedef struct linemessage_tag {
+ DWORD hDevice;
+ DWORD dwMessageID;
+ DWORD_PTR dwCallbackInstance;
+ DWORD_PTR dwParam1;
+ DWORD_PTR dwParam2;
+ DWORD_PTR dwParam3;
+} LINEMESSAGE, *LPLINEMESSAGE;
-
- Level 2
- Posts: 18
- Joined: Thu Jun 18, 2009 6:44 pm
Glad that worked out for you!tomatogoatee wrote:Ho-ly crap! Thanks to you guy, I'm finally able to get it working! This is AMAZING! After I tweaked the patch the last time, I stopped getting tapi32.dll errors. I started getting other errors, but those were resolved with some registry tweaks.
You guys are the greatest! Thank you SO much!