|
Thought so, the stack was full of repeated function calls. Can't see why this is happening though, how come it is easy to do with hooks? Any way of preventing this? Thanks.
|
|
|
|
|
if you do the wrong thing you can end up calling yourself by passing the hook on to the next hook in the list. Try commenting out the CallNextHookEx part and see if it crashes again...
John
|
|
|
|
|
how to hide the nasty dash rectangular boder when you drag window especially you have a special region as your window shape.
|
|
|
|
|
This only occurs when the user has unchecked "show window contents while dragging" in the display applet in control panel.
You could use SystemParametersInfo() with the action of SPI_GETDRAGFULLWINDOWS to query the current value and set it to true just prior to dragging your window. Once the drag is complete, you can call SystemParametersInfo() again to restore SPI_GETDRAGFULLWINDOWS to the original value.
Seems like a lot of work and code purely for asthetics... I'd verify the requirement, twice.
onwards and upwards...
|
|
|
|
|
Thanks, a helpful idea. I get another way, when the window consists of only client (maybe dialog based), we can deal with WM_LBUTTONDOWN,WM_LBUTTONUP,WM_MOUSEMOVE,to drag the window show its content and hide the border(because it has no border indeed)
SystemParametersInfo() is a system level function? I'm so afraid of changing system settings in my code ;P
|
|
|
|
|
Here is the scenario:
<br />
UINT WorkerThread(LPVOID pParam)<br />
{<br />
while(1==1)<br />
{<br />
} <br />
return 0;<br />
}<br />
<br />
Main::MainFunction()<br />
{<br />
AfxBeginThread(WorkerThread, (LPVOID)this, THREAD_PRIORITY_NORMAL);<br />
}<br />
<br />
Main::FunctionImTryingToCall()<br />
{<br />
}<br />
From the worker thread, I am trying to call the main::FunctionImTryingToCall() function. Anything I have tried so far has been unsucessful. Anyone know how to do this? Any help is appreciated as always.
-Dev578
|
|
|
|
|
UINT WorkerThread(LPVOID pParam)
{
Main* pMain = static_cast<Main*>(pParam);
while (true)
{
pMain->FunctionYourTryingTocall();
}
return 0;
}
Roger Allen - Sonork 100.10016
Roger Wright: Remember to buckle up, please, and encourage your friends to do the same. It's not just about saving your life, but saving the quality of life for those you may leave behind...
|
|
|
|
|
Damn that tag preprocessor!
Main *pMain = static_cast<Main*>(pParam);
Roger Allen - Sonork 100.10016
Roger Wright: Remember to buckle up, please, and encourage your friends to do the same. It's not just about saving your life, but saving the quality of life for those you may leave behind...
|
|
|
|
|
I can't believe you beat me to the answer.
Do you live on CP, 24/7?
I Dream of Absolute Zero
|
|
|
|
|
It was my 1st visit in 24 hours. So I was just lucky.
Roger Allen - Sonork 100.10016
Roger Wright: Remember to buckle up, please, and encourage your friends to do the same. It's not just about saving your life, but saving the quality of life for those you may leave behind...
|
|
|
|
|
I'm sure simply doing something like this would do:
<code>
UINT WorkerThread(LPVOID pParam)
{
while(TRUE)
{
Main* pMain = static_cast<Main*>(pParam);
if(pParam != NULL)
pMain->FunctionImTryingToCall();
}
return 0;
}
</code>
I Dream of Absolute Zero
|
|
|
|
|
Ty
|
|
|
|
|
who can give me some materials about voice recognise?
|
|
|
|
|
I have written a programe for playing movies.It works well
in debuging. But using the .exe file in Debug directory, it only can play a few time,why? How can I resolve it?
|
|
|
|
|
p.tuony wrote:
But using the .exe file in Debug directory, it only can play a few time,why?
And then it does what after that?
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
It displays "0x00213000 citing by 0x03862f76 is unable to read".But why no problems in debuging? Where is the difference between them? Thanks!
Yous
p.tuony
|
|
|
|
|
Perhaps an uninitialized pointer, or a pointer that is being used after it has been deleted. This article might be of interest.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
I am using blowfish...
I have a database of records I wish to encrypt...what would offer best encryption not so much performance, but rather strength of encryption or does it make a difference?
Should I:
1) Encrypt an entire database file
2) Encrypt each record individually...that way the SQL engine can still return record data, but it would be all scrambled? I think I wanna go with this method, but i'm concerned about possibly weakening the strength becuz the message digests??? would be smaller...around 1024 bytes.
If you encrypt a large file say 2 MB with a single password, doesn't everything get smashed togather and provide better security in the theory that to decrypt a large file would naturally take longer then 1024 byte block of data? I'm no cryptologist so don't get to fancy with explanations...
I don't like the idea of encrypting a database file either, becuz of the possibility of unencrypted remains possibly being extracted...with a low level disk viewer or something...I would like to do everything in memory, that way there is no chance of data theft.
Any suggestions or ideas???
Thanks...again
Cheers
The word of the day is legs, let's go back to my house and spread the word
|
|
|
|
|
Hockey wrote:
Encrypt each record individually...that way the SQL engine can still return record data, but it would be all scrambled? I think I wanna go with this method, but i'm concerned about possibly weakening the strength becuz the message digests??? would be smaller...around 1024 bytes.
How MD is connected?
Hockey wrote:
If you encrypt a large file say 2 MB with a single password, doesn't everything get smashed togather and provide better security in the theory that to decrypt a large file would naturally take longer then 1024 byte block of data?
Not necessarily. Depends how blocks are chained. More important is compress before encrypt, or xor with random bits.
|
|
|
|
|
Not really realted to sockets specifically, but I plan on using them to request HTML pages, so it's kinda ties into the question.
When a browser has an adddress typed, say codeproject.com does the download engine or whatever you call it...get 2 seperate streams?
1) HTTP Response
2) HTML file or document whatever?
Or is this HTTP info concatenated to beginning of HTML file? What happens when you request an PDF file then?
Consider the following code snippet from Stephane Rodriguez
DWORD CHttpProxyMT::DataThread(void *parm)
{
socket_pair* spair = (socket_pair*) parm;
while( (spair->n=recv(spair->srcsock, spair->buff, 16384, 0))>0 )
{
spair->buff[spair->n] = 0;
if (g_bFilteringEnabled && spair->m_bIsServerResponse)
{
CHtmlFilterRules filter( spair->buff,spair->n );
filter.ApplyRules();
}
send(spair->dstsock, spair->buff, spair->n, 0);
}
...
}
Does the while loop iterate twice? Once for the HTTP request and the other for the HTML document itself?
Thanks
The word of the day is legs, let's go back to my house and spread the word
|
|
|
|
|
The HTTP headers and file are sent in the same stream separated by a blank line.
Niall.
|
|
|
|
|
I have been programing in c for sometime and just recently am going to c++ for school. I have Microsoft Visual c++ as a compiler...My question is can i use regular C code or C++ code without problems or will i have to learn Visual c++ i do anything....Basically is what i am asking is it backward capatible with c and c++
|
|
|
|
|
Hello,
You can use Win32 Console based application project type for C or C++ program with out any problem.
Tith Regards,
R.Selvam
|
|
|
|
|
Strider_2001 wrote:
My question is can i use regular C code or C++ code without problems...
Both are fine.
One thing to remember is that a .C file can only contain C code, while a .CPP file can contain both C and C++ code.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
Hi All
I have a MFC client wich is a part of big 3-tier application. Recently, I've begun to convert some parts of it into managed code.
By that, I mean that I rewrote some components of the app using C# and imported them into my app as a COM components (including the communication with the server wich I changed from COM+ to .Net remoring).
It works fine, but when I close the application I get exception in call to corExitProcess().
Does anybody know something about that?
Do I have to shut the CLR in some way?
thanks!
|
|
|
|