Hello,

I think this is the compiler. If I use
void StartupTapi (HINSTANCE hInstance) {
  //apiVersion = 0x20000;
  ULONG ret;
....
}
than it compiles without an error.
The same problem I had sometimes ago wit an modul of me. I have to define first all variables befor I use them. I use the "Microsoft Visual C++ Toolkit 2003" with the "Platform SDK for Windows Server 2003 SP1".
I think you too?

Reinhard

Foo Ji-Haw wrote:

Hello guys,

Loading the library helped. I think I've hit the problem you foresaw. ULONG returns an error during compilation:
error C2275: 'ULONG' : illegal use of this type as an expression

Is it to do with typemaps? I tried to find some good documentation, but the only example I got was:
http://apache.osuosl.org/perl/mod_perl-2.0.1/xs/typemap

Which wasn't much help.

Appreciate your advice on this matter. Below is my updated code:

Alternatively, if you know of 'anybody' whom I might be able to engage to complete the (probably 'good enough') TAPI port, do let me know. ;)

use Inline C => DATA =>
   LIBS => '-luser32 -kernel32 -lTapi32 ';

__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;
// 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
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to