Discussion:
capi adk link library
(too old to reply)
rs232
2006-11-08 21:12:03 UTC
Permalink
Hello,
I'm developing my first application with capi adk, I'm using Microsoft
VC++.
I have specified lib directories (where there is capi2032.lib file) in
tools/options/projects/vc++ directories/library files and I have
inserted in in project/my_app properties/linker/command line
capi2032.lib

When I try to compile my program, I receive the following error:

error C3861: 'CAPI_INSTALLED': identifier not found, even with
argument-dependent lookup

I have seen inside file: cwin32.c: extern DWORD APIENTRY
CAPI_INSTALLED (void);
So I don't figured It out, this problem!

I also tried with cap2032.lib and cap2032d.lib but the i have the same
error.
I have installed capi drivers and C:\WINNT\system32 directory I have
capi2032.dll file


please help me.
Teo
mm
2006-11-09 22:00:55 UTC
Permalink
Hi Teo;

Forget about linking to any lib files. You want dynamic linking, as
stated in an earlier response. Do something like the following:

typedef DWORD (APIENTRY *pCAPI_REGISTER)(DWORD MessageBufferSize, DWORD
maxLogicalConnection, DWORD maxBDataBlocks, DWORD maxBDataLen, DWORD
*pApplID);
typedef DWORD (APIENTRY *pCAPI_RELEASE)(DWORD ApplID);
typedef DWORD (APIENTRY *pCAPI_PUT_MESSAGE)(DWORD ApplID, PVOID
pCAPIMessage);
typedef DWORD (APIENTRY *pCAPI_GET_MESSAGE)(DWORD ApplID, PVOID
*ppCAPIMessage);
typedef DWORD (APIENTRY *pCAPI_WAIT_FOR_SIGNAL)(DWORD ApplID);
typedef VOID (APIENTRY *pCAPI_GET_MANUFACTURER)(PVOID SzBuffer);
typedef DWORD (APIENTRY *pCAPI_GET_VERSION)(DWORD *pCAPIMajor, DWORD
*pCAPIMinor, DWORD *pManufacturerMajor, DWORD *pManufacturerMinor);
typedef DWORD (APIENTRY *pCAPI_GET_SERIAL_NUMBER)(PVOID SzBuffer);
typedef DWORD (APIENTRY *pCAPI_GET_PROFILE)(PVOID SzBuffer, DWORD
CtrlNr);
typedef DWORD (APIENTRY *pCAPI_INSTALLED)(void);

pCAPI_REGISTER CAPI_REGISTER=NULL;
pCAPI_RELEASE CAPI_RELEASE=NULL;
pCAPI_PUT_MESSAGE CAPI_PUT_MESSAGE=NULL;
pCAPI_GET_MESSAGE CAPI_GET_MESSAGE=NULL;
pCAPI_WAIT_FOR_SIGNAL CAPI_WAIT_FOR_SIGNAL=NULL;
pCAPI_GET_MANUFACTURER CAPI_GET_MANUFACTURER=NULL;
pCAPI_GET_VERSION CAPI_GET_VERSION=NULL;
pCAPI_GET_SERIAL_NUMBER CAPI_GET_SERIAL_NUMBER=NULL;
pCAPI_GET_PROFILE CAPI_GET_PROFILE=NULL;
pCAPI_INSTALLED CAPI_INSTALLED=NULL;

bool loadCapiLib(void){
HINSTANCE hLibDLL=LoadLibrary("CAPI2032.DLL");
if( hLibDLL == NULL){ return false; }
if( (CAPI_REGISTER =
(pCAPI_REGISTER)GetProcAddress(hLibDLL,"CAPI_REGISTER")) == NULL
|| (CAPI_RELEASE =
(pCAPI_RELEASE)GetProcAddress(hLibDLL,"CAPI_RELEASE")) == NULL
|| (CAPI_PUT_MESSAGE =
(pCAPI_PUT_MESSAGE)GetProcAddress(hLibDLL,"CAPI_PUT_MESSAGE")) == NULL
|| (CAPI_GET_MESSAGE =
(pCAPI_GET_MESSAGE)GetProcAddress(hLibDLL,"CAPI_GET_MESSAGE")) == NULL
|| (CAPI_WAIT_FOR_SIGNAL =
(pCAPI_WAIT_FOR_SIGNAL)GetProcAddress(hLibDLL,"CAPI_WAIT_FOR_SIGNAL"))
== NULL
|| (CAPI_GET_MANUFACTURER =
(pCAPI_GET_MANUFACTURER)GetProcAddress(hLibDLL,"CAPI_GET_MANUFACTURER"))
== NULL
|| (CAPI_GET_VERSION =
(pCAPI_GET_VERSION)GetProcAddress(hLibDLL,"CAPI_GET_VERSION")) == NULL
|| (CAPI_GET_SERIAL_NUMBER =
(pCAPI_GET_SERIAL_NUMBER)GetProcAddress(hLibDLL,"CAPI_GET_SERIAL_NUMBER"))
== NULL
|| (CAPI_GET_PROFILE =
(pCAPI_GET_PROFILE)GetProcAddress(hLibDLL,"CAPI_GET_PROFILE")) == NULL
|| (CAPI_INSTALLED =
(pCAPI_INSTALLED)GetProcAddress(hLibDLL,"CAPI_INSTALLED")) == NULL
){
return false;
}
return true;
}

Bye
Michael
Post by rs232
Hello,
I'm developing my first application with capi adk, I'm using Microsoft
VC++.
I have specified lib directories (where there is capi2032.lib file) in
tools/options/projects/vc++ directories/library files and I have
inserted in in project/my_app properties/linker/command line
capi2032.lib
error C3861: 'CAPI_INSTALLED': identifier not found, even with
argument-dependent lookup
I have seen inside file: cwin32.c: extern DWORD APIENTRY
CAPI_INSTALLED (void);
So I don't figured It out, this problem!
I also tried with cap2032.lib and cap2032d.lib but the i have the same
error.
I have installed capi drivers and C:\WINNT\system32 directory I have
capi2032.dll file
please help me.
Teo
rs232
2006-11-10 08:05:59 UTC
Permalink
Hello Michael,
thanks for your reply.
Ok, for dynamic linking I'll follow your good suggestions.
Why you tell me to forget about linking to any lib files?
I'm beginning so, I was think that capi-adk was a
facilities to develope isdn communication's programs.
Could I please ask you if you send me a simple program? Even with a
single statement
(CAPI_INSTALLED/CAPI_REGISTER).
my email is : rs232atemail.it
Thanks in advance
Bye
Teo
Post by mm
Hi Teo;
Forget about linking to any lib files. You want dynamic linking, as
typedef DWORD (APIENTRY *pCAPI_REGISTER)(DWORD MessageBufferSize, DWORD
maxLogicalConnection, DWORD maxBDataBlocks, DWORD maxBDataLen, DWORD
*pApplID);
typedef DWORD (APIENTRY *pCAPI_RELEASE)(DWORD ApplID);
typedef DWORD (APIENTRY *pCAPI_PUT_MESSAGE)(DWORD ApplID, PVOID
pCAPIMessage);
typedef DWORD (APIENTRY *pCAPI_GET_MESSAGE)(DWORD ApplID, PVOID
*ppCAPIMessage);
typedef DWORD (APIENTRY *pCAPI_WAIT_FOR_SIGNAL)(DWORD ApplID);
typedef VOID (APIENTRY *pCAPI_GET_MANUFACTURER)(PVOID SzBuffer);
typedef DWORD (APIENTRY *pCAPI_GET_VERSION)(DWORD *pCAPIMajor, DWORD
*pCAPIMinor, DWORD *pManufacturerMajor, DWORD *pManufacturerMinor);
typedef DWORD (APIENTRY *pCAPI_GET_SERIAL_NUMBER)(PVOID SzBuffer);
typedef DWORD (APIENTRY *pCAPI_GET_PROFILE)(PVOID SzBuffer, DWORD
CtrlNr);
typedef DWORD (APIENTRY *pCAPI_INSTALLED)(void);
pCAPI_REGISTER CAPI_REGISTER=NULL;
pCAPI_RELEASE CAPI_RELEASE=NULL;
pCAPI_PUT_MESSAGE CAPI_PUT_MESSAGE=NULL;
pCAPI_GET_MESSAGE CAPI_GET_MESSAGE=NULL;
pCAPI_WAIT_FOR_SIGNAL CAPI_WAIT_FOR_SIGNAL=NULL;
pCAPI_GET_MANUFACTURER CAPI_GET_MANUFACTURER=NULL;
pCAPI_GET_VERSION CAPI_GET_VERSION=NULL;
pCAPI_GET_SERIAL_NUMBER CAPI_GET_SERIAL_NUMBER=NULL;
pCAPI_GET_PROFILE CAPI_GET_PROFILE=NULL;
pCAPI_INSTALLED CAPI_INSTALLED=NULL;
bool loadCapiLib(void){
HINSTANCE hLibDLL=LoadLibrary("CAPI2032.DLL");
if( hLibDLL == NULL){ return false; }
if( (CAPI_REGISTER =
(pCAPI_REGISTER)GetProcAddress(hLibDLL,"CAPI_REGISTER")) == NULL
|| (CAPI_RELEASE =
(pCAPI_RELEASE)GetProcAddress(hLibDLL,"CAPI_RELEASE")) == NULL
|| (CAPI_PUT_MESSAGE =
(pCAPI_PUT_MESSAGE)GetProcAddress(hLibDLL,"CAPI_PUT_MESSAGE")) == NULL
|| (CAPI_GET_MESSAGE =
(pCAPI_GET_MESSAGE)GetProcAddress(hLibDLL,"CAPI_GET_MESSAGE")) == NULL
|| (CAPI_WAIT_FOR_SIGNAL =
(pCAPI_WAIT_FOR_SIGNAL)GetProcAddress(hLibDLL,"CAPI_WAIT_FOR_SIGNAL"))
== NULL
|| (CAPI_GET_MANUFACTURER =
(pCAPI_GET_MANUFACTURER)GetProcAddress(hLibDLL,"CAPI_GET_MANUFACTURER"))
== NULL
|| (CAPI_GET_VERSION =
(pCAPI_GET_VERSION)GetProcAddress(hLibDLL,"CAPI_GET_VERSION")) == NULL
|| (CAPI_GET_SERIAL_NUMBER =
(pCAPI_GET_SERIAL_NUMBER)GetProcAddress(hLibDLL,"CAPI_GET_SERIAL_NUMBER"))
== NULL
|| (CAPI_GET_PROFILE =
(pCAPI_GET_PROFILE)GetProcAddress(hLibDLL,"CAPI_GET_PROFILE")) == NULL
|| (CAPI_INSTALLED =
(pCAPI_INSTALLED)GetProcAddress(hLibDLL,"CAPI_INSTALLED")) == NULL
){
return false;
}
return true;
}
Bye
Michael
mm
2006-11-10 15:04:41 UTC
Permalink
Hi again;

Following is a program that reads the manufacturer name.

Compile i.e. with borlands free bcc55, like so

c:\borland\bcc55\bin\bcc32 -w-par -tWCR -I"c:\borland\bcc55\include"
-L"c:\borland\bcc55\lib;c:\borland\bcc55\lib\psdk" test.cpp

You will get a program called test.exe.

Of course this code will work with any compiler.

The output should look like:

Loaded capi2032,dll
Capi installed.
Manufacturer: AVM-GmbH

test.cpp source code:


#include <windows.h>
#include <stdio.h>

typedef DWORD (APIENTRY *pCAPI_REGISTER)(DWORD MessageBufferSize, DWORD
maxLogicalConnection, DWORD maxBDataBlocks, DWORD maxBDataLen, DWORD
*pApplID);
typedef DWORD (APIENTRY *pCAPI_RELEASE)(DWORD ApplID);
typedef DWORD (APIENTRY *pCAPI_PUT_MESSAGE)(DWORD ApplID, PVOID
pCAPIMessage);
typedef DWORD (APIENTRY *pCAPI_GET_MESSAGE)(DWORD ApplID, PVOID
*ppCAPIMessage);
typedef DWORD (APIENTRY *pCAPI_WAIT_FOR_SIGNAL)(DWORD ApplID);
typedef VOID (APIENTRY *pCAPI_GET_MANUFACTURER)(PVOID SzBuffer);
typedef DWORD (APIENTRY *pCAPI_GET_VERSION)(DWORD *pCAPIMajor, DWORD
*pCAPIMinor, DWORD *pManufacturerMajor, DWORD *pManufacturerMinor);
typedef DWORD (APIENTRY *pCAPI_GET_SERIAL_NUMBER)(PVOID SzBuffer);
typedef DWORD (APIENTRY *pCAPI_GET_PROFILE)(PVOID SzBuffer, DWORD
CtrlNr);
typedef DWORD (APIENTRY *pCAPI_INSTALLED)(void);

pCAPI_REGISTER CAPI_REGISTER=NULL;
pCAPI_RELEASE CAPI_RELEASE=NULL;
pCAPI_PUT_MESSAGE CAPI_PUT_MESSAGE=NULL;
pCAPI_GET_MESSAGE CAPI_GET_MESSAGE=NULL;
pCAPI_WAIT_FOR_SIGNAL CAPI_WAIT_FOR_SIGNAL=NULL;
pCAPI_GET_MANUFACTURER CAPI_GET_MANUFACTURER=NULL;
pCAPI_GET_VERSION CAPI_GET_VERSION=NULL;
pCAPI_GET_SERIAL_NUMBER CAPI_GET_SERIAL_NUMBER=NULL;
pCAPI_GET_PROFILE CAPI_GET_PROFILE=NULL;
pCAPI_INSTALLED CAPI_INSTALLED=NULL;

bool loadCapiLib(void){
HINSTANCE hLibDLL=LoadLibrary("CAPI2032.DLL");
if( hLibDLL == NULL){ return false; }
if( (CAPI_REGISTER =
(pCAPI_REGISTER)GetProcAddress(hLibDLL,"CAPI_REGISTER")) == NULL
|| (CAPI_RELEASE =
(pCAPI_RELEASE)GetProcAddress(hLibDLL,"CAPI_RELEASE")) == NULL
|| (CAPI_PUT_MESSAGE =
(pCAPI_PUT_MESSAGE)GetProcAddress(hLibDLL,"CAPI_PUT_MESSAGE")) == NULL
|| (CAPI_GET_MESSAGE =
(pCAPI_GET_MESSAGE)GetProcAddress(hLibDLL,"CAPI_GET_MESSAGE")) == NULL
|| (CAPI_WAIT_FOR_SIGNAL =
(pCAPI_WAIT_FOR_SIGNAL)GetProcAddress(hLibDLL,"CAPI_WAIT_FOR_SIGNAL"))
== NULL
|| (CAPI_GET_MANUFACTURER =
(pCAPI_GET_MANUFACTURER)GetProcAddress(hLibDLL,"CAPI_GET_MANUFACTURER"))
== NULL
|| (CAPI_GET_VERSION =
(pCAPI_GET_VERSION)GetProcAddress(hLibDLL,"CAPI_GET_VERSION")) == NULL
|| (CAPI_GET_SERIAL_NUMBER =
(pCAPI_GET_SERIAL_NUMBER)GetProcAddress(hLibDLL,"CAPI_GET_SERIAL_NUMBER"))
== NULL
|| (CAPI_GET_PROFILE =
(pCAPI_GET_PROFILE)GetProcAddress(hLibDLL,"CAPI_GET_PROFILE")) == NULL
|| (CAPI_INSTALLED =
(pCAPI_INSTALLED)GetProcAddress(hLibDLL,"CAPI_INSTALLED")) == NULL
){
return false;
}
return true;
}

int main(void){
if(loadCapiLib()){
fprintf(stderr,"Loaded capi2032,dll\n");
int errno=CAPI_INSTALLED();
if(errno==0){
fprintf(stderr,"Capi installed.\n");
char cbuf[64]={0};
CAPI_GET_MANUFACTURER(cbuf);
fprintf(stderr,"Manufacturer: %s\n",cbuf);
}else{
fprintf(stderr,"Capi not installed. Errno=0x%04X\n",errno);
}
}else{
fprintf(stderr,"Couldn't load capi2032,dll\n");
}
}

Bye
Michael
Werner Henze
2006-11-11 11:06:20 UTC
Permalink
Hi!
Post by mm
Forget about linking to any lib files. You want dynamic linking, as
Why should he? Linking to the lib is much easier than explicitly
having to deal with LoadLibrary and GetProcAddress.

Ciao,
Werner...
--
PGP 8 available
http://home.arcor.de/werner.henze
Werner Henze
2006-11-11 11:09:58 UTC
Permalink
Hi!

It seems, you are new to C++ programming?
Post by rs232
error C3861: 'CAPI_INSTALLED': identifier not found, even with
argument-dependent lookup
This is a compiler error. Assuming you are using the AVM CAPI ADK,
you probably did not include the CAPI h file which declares the
DLL functions?
Post by rs232
I also tried with cap2032.lib and cap2032d.lib but the i have the same
error.
Of course this won't help. C3861 is a compiler message. When changing
the lib to use, you are playing with the linker setting. Of course, if
the compiler fails the linker will never get invoked.

Ciao,
Werner...
--
PGP 8 available
http://home.arcor.de/werner.henze
mm
2006-11-12 07:57:45 UTC
Permalink
Hi Werner;

Why not link to a static lib ?

A program statically linked to a capiXXXX.lib from AVM will not work
with an Eicon card.
All manufacturer ship their own capi dlls under windows. These dlls are
not compatible/exchangable. That's the reason why you cannot have AVM
and Eicon cards in one Windows computer. (It should work under Linux,
though)

If you do dynamic linking your program will work with all cards!

There are other advantages to using dynamic linking, which are more
general and can be looked up on the internet (smaller executables,
faster/lazy loading ...).

Bye;
Michael
Post by Werner Henze
Hi!
It seems, you are new to C++ programming?
Post by rs232
error C3861: 'CAPI_INSTALLED': identifier not found, even with
argument-dependent lookup
This is a compiler error. Assuming you are using the AVM CAPI ADK,
you probably did not include the CAPI h file which declares the
DLL functions?
Post by rs232
I also tried with cap2032.lib and cap2032d.lib but the i have the same
error.
Of course this won't help. C3861 is a compiler message. When changing
the lib to use, you are playing with the linker setting. Of course, if
the compiler fails the linker will never get invoked.
Ciao,
Werner...
--
PGP 8 available
http://home.arcor.de/werner.henze
Werner Henze
2006-11-12 12:05:27 UTC
Permalink
Hi Michael,

I guess you do not understand the meaning of the capi2032.lib provided
in the AVM CAPI ADK. Of course it is not the complete implementation of
the capi203.dll but only an import library. If you link to that lib you
will not have the complete functionality of capi2032.dll built into your
code so that you do not need the capi2032.dll any more. Linking against
capi2032.lib just tells the linker to integrate a table into the exe so
that the Windows exe loader knows that when loading this exe it also
needs to load capi2032.dll. That's the way it is also done with all the
Windows DLLs like kernel32.dll etc..
Of course linking against the capi2032 (import) lib works with AVM and
Eicon cards.

Doing LoadLibrary and GetProcAddress is not necessary if your program
always needs to load capi2032.dll. In fact with linking against capi2032
import lib the LoadLibrary and GetProcAddress stuff is done by Windows
when loading your program - so your code gets smaller and easier.

Ciao,
Werner...
--
PGP 8 available
http://home.arcor.de/werner.henze
mm
2006-11-12 18:49:02 UTC
Permalink
Hi again;

Right, I see what you mean. I was wondering where Teo had those libs
from ;)

Bye
Michael
Post by Werner Henze
Hi Michael,
I guess you do not understand the meaning of the capi2032.lib provided
in the AVM CAPI ADK. Of course it is not the complete implementation of
the capi203.dll but only an import library. If you link to that lib you
will not have the complete functionality of capi2032.dll built into your
code so that you do not need the capi2032.dll any more. Linking against
capi2032.lib just tells the linker to integrate a table into the exe so
that the Windows exe loader knows that when loading this exe it also
needs to load capi2032.dll. That's the way it is also done with all the
Windows DLLs like kernel32.dll etc..
Of course linking against the capi2032 (import) lib works with AVM and
Eicon cards.
Doing LoadLibrary and GetProcAddress is not necessary if your program
always needs to load capi2032.dll. In fact with linking against capi2032
import lib the LoadLibrary and GetProcAddress stuff is done by Windows
when loading your program - so your code gets smaller and easier.
Ciao,
Werner...
--
PGP 8 available
http://home.arcor.de/werner.henze
rs232
2006-11-13 08:35:28 UTC
Permalink
Hi Michael,
thanks for your source example, I have tried and It works fine!
I have downloaded lib files from AVM CAPI ADK web site.

Werner wrote:

'Doing LoadLibrary and GetProcAddress is not necessary if your program
always needs to load capi2032.dll. In fact with linking against
capi2032
import lib the LoadLibrary and GetProcAddress stuff is done by Windows
when loading your program - so your code gets smaller and easier. '

So I was thinking about using or not using AVM CAPI ADK.
Werner post is very interesting, and I asked myself which is the best
way.
Which is your opinions about this?


Bye
Teo
Post by mm
Hi again;
Right, I see what you mean. I was wondering where Teo had those libs
from ;)
Bye
Michael
Post by Werner Henze
Hi Michael,
I guess you do not understand the meaning of the capi2032.lib provided
in the AVM CAPI ADK. Of course it is not the complete implementation of
the capi203.dll but only an import library. If you link to that lib you
will not have the complete functionality of capi2032.dll built into your
code so that you do not need the capi2032.dll any more. Linking against
capi2032.lib just tells the linker to integrate a table into the exe so
that the Windows exe loader knows that when loading this exe it also
needs to load capi2032.dll. That's the way it is also done with all the
Windows DLLs like kernel32.dll etc..
Of course linking against the capi2032 (import) lib works with AVM and
Eicon cards.
Doing LoadLibrary and GetProcAddress is not necessary if your program
always needs to load capi2032.dll. In fact with linking against capi2032
import lib the LoadLibrary and GetProcAddress stuff is done by Windows
when loading your program - so your code gets smaller and easier.
Ciao,
Werner...
--
PGP 8 available
http://home.arcor.de/werner.henze
mm
2006-11-13 11:12:31 UTC
Permalink
Hi Teo;

I hope somebody is correcting me, if I tell you complete bullocks here.

I assume that linking to that lib just adds a few entries to your
import table of your exe file. So, when you start up the app, the
windows loader loads the 'real' capi dll and does the usual address
rewriting. (The only book I know about 'Linker & Loaders' is from John
R. Levine ISBN 1-55860-496-0, as always lots of info on the net :) )

As Werner said, if you know there is a capi dll and your program always
needs capi then go ahead and use it. Otherwise don't ;) I don't think
there is a big difference in terms of speed and space, if at all.

The reason why I would never use a lib like that is simple: I don't
like 'black boxes'. And this lib is just another one. I guess AVM did a
proper job and nothing fishy is going on in there, but who am I to
tell. Never trust another programmer if you don't have to ;)


Bye
Michael
Post by Werner Henze
Hi Michael,
thanks for your source example, I have tried and It works fine!
I have downloaded lib files from AVM CAPI ADK web site.
'Doing LoadLibrary and GetProcAddress is not necessary if your program
always needs to load capi2032.dll. In fact with linking against capi2032
import lib the LoadLibrary and GetProcAddress stuff is done by Windows
when loading your program - so your code gets smaller and easier. '
So I was thinking about using or not using AVM CAPI ADK.
Werner post is very interesting, and I asked myself which is the best
way.
Which is your opinions about this?
Bye
Teo
Post by mm
Hi again;
Right, I see what you mean. I was wondering where Teo had those libs
from ;)
Bye
Michael
Post by Werner Henze
Hi Michael,
I guess you do not understand the meaning of the capi2032.lib provided
in the AVM CAPI ADK. Of course it is not the complete implementation of
the capi203.dll but only an import library. If you link to that lib you
will not have the complete functionality of capi2032.dll built into your
code so that you do not need the capi2032.dll any more. Linking against
capi2032.lib just tells the linker to integrate a table into the exe so
that the Windows exe loader knows that when loading this exe it also
needs to load capi2032.dll. That's the way it is also done with all the
Windows DLLs like kernel32.dll etc..
Of course linking against the capi2032 (import) lib works with AVM and
Eicon cards.
Doing LoadLibrary and GetProcAddress is not necessary if your program
always needs to load capi2032.dll. In fact with linking against capi2032
import lib the LoadLibrary and GetProcAddress stuff is done by Windows
when loading your program - so your code gets smaller and easier.
Ciao,
Werner...
--
PGP 8 available
http://home.arcor.de/werner.henze
Tobias Erichsen
2006-11-13 11:34:38 UTC
Permalink
Post by mm
I assume that linking to that lib just adds a few entries to your
import table of your exe file. So, when you start up the app, the
windows loader loads the 'real' capi dll and does the usual address
rewriting. (The only book I know about 'Linker & Loaders' is from John
R. Levine ISBN 1-55860-496-0, as always lots of info on the net :) )
There are two kinds of libs when developing with Visual-studio:
"real libs" that contain all functionality and "stub libs" that just
reference to DLLs which then contain the functionality...
Post by mm
The reason why I would never use a lib like that is simple: I don't
like 'black boxes'. And this lib is just another one. I guess AVM did a
proper job and nothing fishy is going on in there, but who am I to
tell. Never trust another programmer if you don't have to ;)
Normally those "stub-libs" that just implicitely load a dll at
execution-time
are autogenerated by the compiler that produced the DLL, or it can also
be created by some Microsoft-SDK-tools from an existing DLL. So not
much "blackbox" stuff going on.

The only advantage to really dynamically loading dlls is the fact, that you
application can start up even if the DLL does not exist (obviously with
reduced functionality ;-)

Tobias
artemis
2014-01-30 15:17:15 UTC
Permalink
if any one could help ???

I use the same approach (dll load) waiting a phone call in a thread.
All are okay ... the Ring message is coming but in the CONNECT_IND structure all the pointers (Calling_number, Called_number, etc) are <Bad Ptr> !

if(CAPI_WAIT_FOR_SIGNAL(IsdnApplId)==0)
{
void *msg = NULL;
if(CAPI_GET_MESSAGE( IsdnApplId, &msg )==0)
{
CONNECT_IND *ind = (CONNECT_IND *)msg;

if((ind->Command == CAPI_CONNECT) && (ind->SubCommand == CAPI_IND))
{
if(ind->Calling_number)
{
}


the ind->Calling_number is not null but extracting data the program crashes !!
I use VC++ and Windows 7

waiting a message from the outer space :o)
Thank you
Artemis

Loading...