|
lib doesn't contain any "logic" inside. It's just a dummy. It contains information about the exported symbols from the dll. How will it have the same size of the dll then? But if it's a static library, yes, it will have brains and the size will be big. Unlike a dll, this static libraries get "fixed up" to the executables. But I guess you aren't concerned about the latter.
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
|
|
|
|
|
VuNic wrote: lib doesn't contain any "logic" inside.
That's not necessarily true. Import libraries just contain, essentially, function names and the name of the containing DLL, so it’s true in that case. However, the “other” sort of lib file contains machine code and data.
Steve
|
|
|
|
|
Stephen Hewitt wrote: That's not necessarily true. Import libraries just contain, essentially, function names and the name of the containing DLL, so it’s true in that case. However, the “other” sort of lib file contains machine code and data.
Did you really read my message till the end?
Stephen Hewitt wrote: However, the “other” sort of lib file contains machine code and data.
But if it's a static library, yes, it will have brains and the size will be big. Unlike a dll, this static libraries get "fixed up" to the executables. But I guess you aren't concerned about the latter.
I think both mean the same.
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
|
|
|
|
|
thanks!
why lib is smaller than dll?
if lib is the combination of all objects, and dll also a combination of all objects(some have been allocated though), dll should be greater in size than lib.
And are you saying import liberay and static program liberary are exactly the same?
|
|
|
|
|
It need not be. If it's an import library it will be quite small.
Steve
|
|
|
|
|
Dear All,
I have an application which connects to remote machine. I want to check the behavior of this application when remote machine is suddenly restarted. For this purpose, i have to physically access remote machine and restart it. After that i check how my application behaves.
By restarting the remote machine, i am actually making that remote machine inaccessible. Now i want to do it programatically so that i don't need to physically connect to remote machine to restart it.
How can i make a "remote" machine inaccessible from my local box for a certain time ? I want to do it programatically. By making remote machine "inaccessible" doesn't necessarily mean that i restart it. What i want to do is to just temporarily make it inaccessible from my local box.
Imtiaz
|
|
|
|
|
Unplug the network cable on your machine.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
You can use PsExec utility to restart a remote computer.
Or you can use Remote Desktop Connection Application (mstsc.exe) to connect with remote computer and Shutdown.
Restart,or if you remove the network, both will result a broken network connection.
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|
|
i difine a custom message(i want to post it to a driver)
#define WM_INTERRUPT WM_USER+100
then i use it as a parameter in the function DeviceIoControl
<br />
...<br />
ULONG nBytesRead;<br />
<br />
if (! DeviceIoControl(<br />
m_hPCI9054, <br />
IOCTL_SET_NOTIFICATION_EVENT, <br />
&WM_INTERRUPT, <br />
sizeof(WM_INTERRUPT),<br />
NULL,<br />
0, <br />
<br />
&nBytesRead,<br />
NULL<br />
)<br />
...
it makes an error:
...'DeviceIoControl' : cannot convert parameter 3 from 'const int' to 'void *'
how to fix it?
i 've tried ,then i have no regret
|
|
|
|
|
You have defined WM_INTERRUPT as a preprocessor symbol. During compilation, the compiler is going to simply replace all occurrences of WM_INTERRUPT with the number 1124 . So what you're trying to do essentially, is this - &1124 which of course, does not make sense. Depending on how you have implemented your driver you can choose to pass WM_INTERRUPT directly like so - (void *)WM_INTERRUPT . This will of course, mean that you should not be dereferencing this value from your driver.
|
|
|
|
|
The parameter should not be constant as per the documentation. Do as follows
LONG lData = WM_INTERRUPT;<br />
<br />
ULONG nBytesRead;<br />
<br />
if (! DeviceIoControl(<br />
m_hPCI9054, <br />
IOCTL_SET_NOTIFICATION_EVENT, <br />
&lData, <br />
sizeof(WM_INTERRUPT),<br />
NULL,<br />
0, <br />
&nBytesRead,<br />
NULL<br />
)
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|
|
Hi,
Would anyone know in which of the overrideable methods can I set the Window Name ??
::SetWindowText just seems to set the Text When I do I a FindWindow for that string I dont seem to find it
|
|
|
|
|
What exactly do you mean by Window Name if you're not referring to its text/title?
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
I dont undrestand what do you need?
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
I am converting a program I wrote in C to MFC
In C
I used CreateWindow to Create the Main Window and the Second Param
LPCTSTR lpWindowName,
Was the Window Name
I am able to Do A FindWindow on this to get the Window Handle
When I converted the Program to MFC the Wizard Creatred a bucnh of Objects
Cwnd .. (guess for the Client Are .. CFrameWnd for the Frame
I guess I was looking for Where .. Some overrideable method to insert the Window
Title
When I tried doing it durning ::OnCreate using SetWindowText the Window title Displayed but the FindWidnow
didn't get the Window Handle
Durning PreCreateWindow setting the Window name by setting lpszName memeber of CreateStruct structure
The Program bombed
I am using FindWidow in Dos App to Do IPC with the GUI PROGRAM
thankx
|
|
|
|
|
|
|
Just looked up the API on MSDN for this API I need the Class name in My Case I used AFXregisterclassname
|
|
|
|
|
I have a class called subscriber in a project. Several classes inherit from it but as of now, none use the functionality. The destructor is empty but calls the STL <list> destructor. Since the class isn't used yet, the list is empty. This then crashes the program when shutting down because the empty list of pointers creates a null pointer in the <list> destructor. Is it me or aren't empty lists supposed to disappear without trying to empty themselves?
Class is below.
Mark Jackson
class subscriber
{
public:
subscriber() {}
subscriber(const subscriber& s);
~subscriber() {}
virtual void update() = 0;
void subscribe(broadCaster * b);
void unSubscribe(broadCaster * b);
void unSubscribe();
private:
std::list<broadCaster *> _mBroadList;
typedef std::list<broadCaster *>::iterator iterator;
}; // subscriber
|
|
|
|
|
mjackson11 wrote: because the empty list of pointers creates a null pointer in the <list> destructor
Huh ??
if no one "subscribe" the list will be empty; the size will be zero.
if there are subscription, then the list will be non-empty; it's not the job of the subscriber class to delete the broadCaster; so no major
cleaning to be done here.
in the destructor, I would do (just to be certain)
_mBroadLost.clear();
This signature was proudly tested on animals.
|
|
|
|
|
Duh, careless virtual in a baseclass declaration led to multiple calls to the destructor.
|
|
|
|
|
Using pointers to things as the element type template parameter to STL collections can be somewhat tricky. Is there any reason in particular why you are using a list<broadCaster *> instead of just list<broadCaster> ? With a list of pointers to broadCaster objects, maintaining the lifetime of the objects pointed at by those pointers typically becomes an issue. This is just a general guideline though - depending on your specific requirements it might make sense to do this.
|
|
|
|
|
BTW, Make your destructor virtual. If you're accessing derived class object though base class point and if you delete it, derived class constructor will not be called.
See FAQ[^]
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|
|
Hi
Why I can't see the result of my program (Win32 Console Application)in Vc++8.
for example:
#include <iostream>
using namespace std;
int main()
{
cout << "The First Program - Welcome";
return 0;
}
thank you
soso
|
|
|
|
|
anassamar wrote: Why I can't see the result of my program (Win32 Console Application)in Vc++8.
What do you mean by 'result'?
How have you executed the program?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|