A
alessandra_cabrini
Hi, I have a problem with a DLL I'm not able to solve.
I need to use this DLL to receive a file from a barcode (a little
terminal) reader.
The DLL only has 2 functions, one for receive and the other to transnit
a file.
The prototype function one the readme file are:
INT __stdcall B30XferRx(LPTSTR CommandStr)
INT __stdcall B30XferTx(LPTSTR CommandStr);
where CommandStr is a string of the kind "p=4,F=filename"
I tried in this way:
void main() {
HINSTANCE hLib=LoadLibrary("B31win32.DLL");
if(hLib==NULL) {
cout << "Unable to load library!" << endl;
getch();
return;
}
INT __stdcall B30XferRx(LPTSTR "p=4,F=mydata.txt");
}
I receive this error massage (my file is pDll.cpp):
C:\Borland\BCC55\Bin>bcc32 pDll.cpp
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
pDll.cpp:
Error E2108 pDll.cpp 21: Improper use of typedef 'LPTSTR' in function
main()
Error E2293 pDll.cpp 21: ) expected in function main()
Warning W8004 pDll.cpp 22: 'B30XferRx' is assigned a value that is
never used in
function main()
*** 2 errors in Compile ***
any idea?
Thank you very much
Sandra
I need to use this DLL to receive a file from a barcode (a little
terminal) reader.
The DLL only has 2 functions, one for receive and the other to transnit
a file.
The prototype function one the readme file are:
INT __stdcall B30XferRx(LPTSTR CommandStr)
INT __stdcall B30XferTx(LPTSTR CommandStr);
where CommandStr is a string of the kind "p=4,F=filename"
I tried in this way:
void main() {
HINSTANCE hLib=LoadLibrary("B31win32.DLL");
if(hLib==NULL) {
cout << "Unable to load library!" << endl;
getch();
return;
}
INT __stdcall B30XferRx(LPTSTR "p=4,F=mydata.txt");
}
I receive this error massage (my file is pDll.cpp):
C:\Borland\BCC55\Bin>bcc32 pDll.cpp
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
pDll.cpp:
Error E2108 pDll.cpp 21: Improper use of typedef 'LPTSTR' in function
main()
Error E2293 pDll.cpp 21: ) expected in function main()
Warning W8004 pDll.cpp 22: 'B30XferRx' is assigned a value that is
never used in
function main()
*** 2 errors in Compile ***
any idea?
Thank you very much
Sandra