|
|
you might be wanting to read this article[^]...
static loading a DLL ensures that the DLL is found when the program starts up. if the DLL is not found, an error message is thrown, and the application stops straight.
|
|
|
|
|
Since
toxcct wrote: static loading a DLL ensures that the DLL is found when the program starts up.
hence
toxcct wrote: if the DLL is not found
cannot happen.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|
|
yes it can
I meant, static loading ensures that if the applications is started, the the DLL has been found.
but still the DLL may not be found, thus application bornt dead.
|
|
|
|
|
toxcct wrote: thus application bornt dead
And wasn't it alive before actual birth? Was it?
Oh, this is an arduous ethical debate...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|
|
|
ForNow wrote: first I guess there is a difference between a static load and a Dynamic Load
The difference is actually referred to as implicit vs. explicit linking.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Is there a way to read with/write into databases with C++?
|
|
|
|
|
|
Yes. What is your specific question?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi,
How can I implement a context menu for a menu. That's mean when I right click on the menu a context menu will appearing. Like the favorite menu of Firefox or IE.
Thank you for your help
|
|
|
|
|
|
Thank you very much Mark
|
|
|
|
|
Is there any way to specify which Ethernet adapter a socket connetion uses? I'm creating the socket as follows:
<br />
SOCKET Socket;<br />
int opt_on = 1;<br />
<br />
<br />
Socket = socket(AF_INET, SOCK_STREAM, 0);<br />
<br />
if(Socket == INVALID_SOCKET)<br />
return - 1; <br />
<br />
if( setsockopt( Socket, SOL_SOCKET, SO_REUSEADDR, (char*)&opt_on, sizeof (opt_on) ) == SOCKET_ERROR )<br />
{ <br />
<br />
return -1;<br />
<br />
}
<br />
cliAddr.sin_family = AF_INET;<br />
cliAddr.sin_addr.s_addr = inet_addr( "169.254.148.9" );<br />
cliAddr.sin_port = htons( 4200 );<br />
<br />
if ( connect( Socket, (struct sockaddr *)&cliAddr, sizeof(cliAddr) ) == SOCKET_ERROR )<br />
{<br />
<br />
GetSocketError();<br />
return -1;<br />
<br />
}
<br />
The connection will always try to use the first available network adapter, which is not necessarily the one connected to the requested port. Is there a way to change this without having to specify different domains?
Thanks.
|
|
|
|
|
masnu wrote: Is there any way to specify which Ethernet adapter a socket connetion uses?
For a local socket, that's what the bind() function is for.
masnu wrote: The connection will always try to use the first available network adapter, which is not necessarily the one connected to the requested port.
I'm confused here. The port you specified is for the destination address, not the
local address. Again, use bind() to bind a socket to the adapter with the specific
address before calling connect().
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Been a while, but if i recall correctly,
- use GetAdaptersInfo to walk through the adapters
- for each adapter you can walk its list of (local) IP addresses
- create the socket then bind to the local address for the adapter you want
- after the bind connect to the desired peer
...cmk
The idea that I can be presented with a problem, set out to logically solve it with the tools at hand, and wind up with a program that could not be legally used because someone else followed the same logical steps some years ago and filed for a patent on it is horrifying.
- John Carmack
|
|
|
|
|
Is there a way how to catch system messages in a driver created by DDK ?
directly from win or using some way like callback functions in WIN32
<br />
switch(Msg){<br />
case WM_CLOSE:<br />
...<br />
break;<br />
}<br />
thank you for any support
modified on Wednesday, January 09, 2008 11:24:13 AM
|
|
|
|
|
Not directly, no. Kernel mode has no concept of what a "window" is. You'd need a user-mode component somewhere.
Judy
|
|
|
|
|
Using unicode what is the proper method for formatting currency to have the symbol, separators, and sign(minus) available?
|
|
|
|
|
Use GetCurrencyFormat() .
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
|
Hi again.
I always have problems with templates . I'm not able to create two template classes with an implicit cast from one to the other (for the same template type). Without the template there are no problems:
class Class1
{
public:
Class1(){};
};
class Class2
{
public:
Class2(){};
Class2(Class1 &mat){};
};
void main()
{
Class1 C1;
fun(C1);
}
But with the template:
void fun(Class2 a){};
template <class T> class TClass1
{
public:
TClass1(){};
};
template <class T> class TClass2
{
public:
TClass2(){};
TClass2(TClass1<T> &mat){};
};
template <class T> void funT(TClass2<T> a){};
void main()
{
TClass1<int> TC1;
funT((TClass2<int> )TC1);
funT(TC1);
}
The compiler is Visual C++ 6.0.
Does anyone know the reason and/or an alternative solution to do this?
Thanks
|
|
|
|
|
No luck, my friend: you simply cannot instantiate a TClass2 object without speciying its template argument.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|
|
I need to set/change the properties of a .txt file (author, title, subject, comment) from a VC++/MFC program. Does anyone know how its done or where that information is actually stored at?
Feather
|
|
|
|
|
This is called compound document properties.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|