Hi all,

I'm trying my first hand at writing some C code to extend TAPI onto Perl using inline.pm. I didn't get very far though. Appreciate if anyone can help explain the error (source code is attached).

It seems to complain that _lineInitializeExA (defined in tapi.h I think) is not resolved. I just don't know how to continue from here.

If there is any expert on inline C+TAPI, I don't mind sharing the success of my coding if you can help me along. Thanks.


error msg:
----------------------------------

Microsoft (R) Program Maintenance Utility   Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

C:\Perl\bin\perl.exe C:\Perl\lib\ExtUtils/xsubpp -typemap C:\Perl\lib\E xtUtils\typemap inline_pl_d3ab.xs > inline_pl_d3ab.xsc && C:\Perl\bin\perl.exe
-MExtUtils::Command -e mv inline_pl_d3ab.xsc inline_pl_d3ab.c
cl -c -ID:/ -nologo -Gf -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -D NO_STRICT -DHAVE_DES_FCRYPT -DNO_HASH_SEED -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLIC IT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX -MD -Zi -DNDEBUG -O1 -DVERSION=\"0.
00\"  -DXS_VERSION=\"0.00\"  "-IC:\Perl\lib\CORE"   inline_pl_d3ab.c
inline_pl_d3ab.c
Running Mkbootstrap for inline_pl_d3ab ()
C:\Perl\bin\perl.exe -MExtUtils::Command -e chmod 644 inline_pl_d3ab.bs C:\Perl\bin\perl.exe -MExtUtils::Mksymlists -e "Mksymlists('NAME'=>\"in line_pl_d3ab\", 'DLBASE' => 'inline_pl_d3ab', 'DL_FUNCS' => { }, 'FUNCLIST' =>
[], 'IMPORTS' => {  }, 'DL_VARS' => []);"
link -out:blib\arch\auto\inline_pl_d3ab\inline_pl_d3ab.dll -dll -nologo -nodefaultlib -debug -opt:ref,icf -libpath:"C:\Perl\lib\CORE" -machine:x86 inl ine_pl_d3ab.obj C:\Perl\lib\CORE\perl58.lib oldnames.lib kernel32.lib user32.l ib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleau t32.lib netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.
lib odbccp32.lib msvcrt.lib -def:inline_pl_d3ab.def
Creating library blib\arch\auto\inline_pl_d3ab\inline_pl_d3ab.lib and object
blib\arch\auto\inline_pl_d3ab\inline_pl_d3ab.exp
inline_pl_d3ab.obj : error LNK2001: unresolved external symbol _lineInitializeEx
[EMAIL PROTECTED]
blib\arch\auto\inline_pl_d3ab\inline_pl_d3ab.dll : fatal error LNK1120: 1 unreso
lved externals
NMAKE : fatal error U1077: 'link' : return code '0x460'
Stop.

A problem was encountered while attempting to compile and install your Inline
C code. The command that failed was:
 nmake > out.make 2>&1

The build directory was:
D:\_Inline\build\inline_pl_d3ab

To debug the problem, cd to the build directory, and inspect the output files.

at inline.pl line 0
INIT failed--call queue aborted.
use Inline C;

__END__
__C__

#include <Windows.h>
#include <winuser.h>
#include <winable.h>
#include <tapi.h>
#include <tchar.h>

#define _WIN32_WINNT 0x0400
#define MAX_LOADSTRING 100

#define WMUSER_TASKBARNOTIFY    WM_USER + 1


#define KEY_ISPRESSED 0x8000
#define KEY_UNPRESSED 0

#define PROFILEAPPNAME "My_TAPI"
#define PROFILEININAME "My_TAPI.ini"

#define APP_Name "My_TAPI"

HLINEAPP hla=0;
DWORD numDevices;
DWORD apiVersion;
DWORD extVersion;
LINEINITIALIZEEXPARAMS lip;
HLINE hline=0;
HCALL hcall=0;
LINEEXTENSIONID leid;   
DWORD lineID=0;
LPLINECALLPARAMS lpCallParams = NULL;
LONG reqid=0;
extern unsigned int LBid;
extern int LB_lineID[255];

typedef struct _LINEDEVCAPSEXTRA {
        LINEDEVCAPS LDC;
        char tempstore[4096];
} LINEDEVCAPSEXTRA;

LINEDEVCAPSEXTRA ldc;

void FAR PASCAL tapilineCallbackFunc( DWORD hDevice, DWORD dwMsg, DWORD 
dwCallbackInstance, 
                                 DWORD dwParam1, DWORD dwParam2, DWORD 
dwParam3) {
} //tapilinecallbackFunc

void StartupTapi (HINSTANCE hInstance) {
    //apiVersion = 0x20000;
        apiVersion = 0x30000;
    ZeroMemory (&lip,sizeof (LINEINITIALIZEEXPARAMS));
    lip.dwTotalSize = sizeof (LINEINITIALIZEEXPARAMS);
    lip.dwOptions = LINEINITIALIZEEXOPTION_USEHIDDENWINDOW;
    // orig line:
    // ULONG ret = lineInitializeEx 
(&hla,hInstance,tapilineCallbackFunc,APP_Name,&numDevices,&apiVersion,&lip);
    lineInitializeEx 
(&hla,hInstance,tapilineCallbackFunc,APP_Name,&numDevices,&apiVersion,&lip);
} //StartupTapi
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to