|
Hello, Sir:
I have a matter about dll, static lib and dynamic lib for a long time. And i don't know what are they different. I want to master the knowledge. Can you help me? I wish to get your reply. Maybe you can give me some article or resource? Thanks,
|
|
|
|
|
One difference between static and dynamic DLL binding is when the program gains access to the DLL. The concept is similar to compile-time processing using template and run-time processing using polymorphism.
Kuphryn
|
|
|
|
|
Hello, sir:
Thanks you replay. Maybe i know it a little from you now. Can you tell me some article or resource about them. I want to master it entirety.
|
|
|
|
|
There are many articles on DLL. Do a search at Google. Here is one tutorial.
http://www.flipcode.com/tutorials/tut_dll01.shtml
Kuphryn
|
|
|
|
|
Thanks your reply. You are welcome.
|
|
|
|
|
Hi,
I have a Console application were it parses the VBS file and Create objects for controls like Button,TextBox etc using COM.I want to implement Events for these objects using COM IConnectionPoint.Is it possible to invoke events for console app.?Pls help
I am really struggling.
Thynks in advance
Valar
|
|
|
|
|
The events belong to the COM object itself, in that it fires them when if whats the client to know that the applicaple event has occured. You cannot force a client to just fire an event at will.
From VB to pick up events, you need to Dim with object using the WithEvents keyword, and then create a New instance somewhere else on the object. Then implements the call back event sub routines.
Giles
"Je pense, donc je mange." - Rene Descartes 1689 - Just before his mother put his tea on the table.
Shameless Plug - Distributed Database Transactions in .NET using COM+
|
|
|
|
|
Actually what i want to know is,I create controls dynamically using COM in C++ console app by parsing the VBScript file.I want to fire events for these controls,Say when user clicks a Button the coressponding objects event has to be fired.Is this possible for console app using IConnectionPoint in COM..or any other way.
Thnks
Valar
|
|
|
|
|
Hi,
I have a problem with WaitForSingleObject. my code are as follows
int RunExternalProES(LPTSTR ExecProc, int option)
{
STARTUPINFO si;
PROCESS_INFORMATION pi;
DWORD pProcessID;
ZeroMemory( &si, sizeof(si) );
si.cb = sizeof(si);
ZeroMemory( &pi, sizeof(pi) );
// Start the child process.
if( !CreateProcess(NULL, // No module name (use command line).
ExecProc, // Command line.
NULL, // Process handle not inheritable.
NULL, // Thread handle not inheritable.
TRUE, // Set handle inheritance to FALSE.
0, // No creation flags.
NULL, // Use parent's environment block.
NULL, // Use parent's starting directory.
&si, // Pointer to STARTUPINFO structure.
&pi ) // Pointer to PROCESS_INFORMATION structure.
)
{
return FALSE;
//( "CreateProcess failed." );
}
if (option == 1) {
WaitForSingleObject(pi.hProcess, INFINITE);
}
}
i found that sometime waitforsingleobject function will hang for some process.. is there any reson why this happens?
Thanks
|
|
|
|
|
The process that spawns the new process has limited knowledge of what goes on afterward. If WaitForSingleObject() does not return for a long time then I suspect that the spawned process is not exiting.
Kuphryn
|
|
|
|
|
kuphryn wrote:
I suspect that the spawned process is not exiting.
Yes, that would be my assumption as well
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
HI.
Can someone tell what vectors are usauly used for and
what can be stored in them\Console app and WinApp.
I am a beginer can someone help me with this.
create vector of size 1000.
containing values 0.1,1.1.1.2,1.3,....,1.999;
display values in vector using the vector it self.
resize vector size 5.
empty out vector.
To pro's like you oaks this must be easy!
I did do but would like to see how someone else doe's it
just to make sure im wright.
maybe silly, but help me out pls.
lance
|
|
|
|
|
use the template class std::vector<t>, you can store anything by choosing the right T. It behaves pretty much like a C array . In your case, code could look like
#include <vector>
typedef std::vector< float > vector_f;
vector_f v(1000);
for (size_t i = 0;i<v.size();++i)
v[i] = ???
v.resize(5);
v.clear();
|
|
|
|
|
I have a simply question as well. Can vectors grow automatically?
|
|
|
|
|
Yes, use the push_back() member function:
i.e.:
std::vector<CMyClass> vMyVector;
for(int i=0; i<nElements; i++)
{
vMyVector.push_back(CMyClass(SomeCtorArgs...));
}
then use at() instead of []...
CMyClass mcTest = vMyVector.at(iSomeIndex);
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
how to read and get the cunks data in png file using vc++...
i've learn on pnglib.org i'm still dont understood any explain??
====================^_^
|
|
|
|
|
Many binary files formats are composed of chunks. It usually contains an ID header, the size of the chunk, then the data. If the data is constant length (contains no variable length strings), and integers are in right format you can just create a structure and read it directly into memory using raw reads.
|
|
|
|
|
How can I flash a window in a taskbar? Just like MSN or Yahoo messengers do when a new message arrives in a chat window.
Thanks
-----
We are what we repeatedly do. Excellence, then, is not an act, but a habit.
|
|
|
|
|
|
|
You are welcome
|
|
|
|
|
Take a look at FlashWindow() and FlashWindowEx()
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Hello guys,
I am frequently using one WorkerThread in my application. It is starting using AfxBeginThread() function. When I run application from within IDE, debug window is also not showing any memory leake.
But when I run this application in Windows NT, its task manager shows memory usage going on increasing by time in chunk of 4 KB.
Can anybody show me the way to control this memory wastage.
Thanking You,
C.R.Naik
|
|
|
|
|
There are several possible reasons. One reason is that the threads do not terminate correctly. Another reason is that the process does not deallocate memory correctly.
Kuphryn
|
|
|
|
|
1. I have used "return 0;" statement to return from thread's controlling function and hence to terminate thread.
2. How can you make sure that the process deallocates memory correctly ?
Thanking You
C.R.Naik
|
|
|
|