|
What do you wish to know? I thought you wanted to know how to write the operator, so I wrote it in that post.
|
|
|
|
|
I am planning to develop TCP/UDP compression utility for Star
topology Network. In short on a windows pc client utility will run, which
will run on top of existing network adaptors. Before sending data to
actual interface it will compress UDP/TCP part of IP packet and forward
it to Central Server for uncompression, then it will further route it.
If anybody how to do it please let me know.
|
|
|
|
|
This[^] might give you some starting points.
We need to graduate from the ridiculous notion that greed is some kind of elixir for capitalism - it's the downfall of capitalism. Self-interest, maybe, but self-interest run amok does not serve anyone. The core value of conscious capitalism is enlightened self-interest.
Patricia Aburdene
|
|
|
|
|
Thanks for the link.
You want to say instead of creating new interface on top of existing using NDIS-Hook filter I can alter(Compressing TCP Payload in Ip packet) packets before sending it to physical interface, vice versa while receving before it goes to network layer I can alter(Decompressing TCP Payload in Packet).
Is it possible to have a small sample code for basics of Firewall-hook & NDIS-hook so that I can have some idea.
|
|
|
|
|
I want to track filesystem changens, ie I want some sort of message when a file is opened, read from, written to, closed, a directory created, etc.
But I don't know the relevant functions in Win32API which do this. What are their names?
Ideally, I'd want a callback which gets called anytime a file/directory is used in some way in one of the directories I specify. Is that possible? If not, what's the name of the functions which a nearest to that functionality?
|
|
|
|
|
You need to implement a filter driver (or some) to hook those drivers of FAT32, NTFS, ... drivers.
Maxwell Chen
|
|
|
|
|
I need a driver? You sure? Things like filemon froms sysinternals don't look like they use drivrs for their functionality, at least I couldn't see any driver intall related imports, especially not for each type of filesystem.
|
|
|
|
|
hfry's solution is easier.
Maxwell Chen
|
|
|
|
|
|
|
maybe it is some helpful to you here[^]
|
|
|
|
|
If I create a thread with code like this:
while ( true ) {
if ( PeekMessage( &msg, NULL, 0, 0, PM_REMOVE ) ) {
switch ( msg.message ) {
case WM_QUIT : {
return;
}
break;
}
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
Does this automatically create a hidden window (I'd prefer not to have this)? Are there any downsides to doing this? Somewhere I recall reading that this could potentially be problematic.
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
Save an Orange - Use the VCF!
|
|
|
|
|
No it doesn't automatically create a window. The first call to PeekMessage()/GetMessage() would automatically create a message queue for the worker thread though.
In your code, you would be polling PeekMessage() in a tight loop if there is no message available on the queue. Why not use GetMessage() instead? It blocks until a message is posted on the queue.
|
|
|
|
|
In general, I would do that, however the actual code is a bit more complex than I posted. It possible for it to run for a brief time, for example run the message loop for 5 minutes. So for that I don't think I can use GetMessage. I put a Sleep(1) in the current code, though I'm not sure that's the right thing to do.
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
Save an Orange - Use the VCF!
|
|
|
|
|
I don't think calling Sleep(1) in your loop would solve the issue.
If you need the message loop to run say for 5 minutes, can't you create a timer using SetTimer() that would post WM_TIMER to your message queue and handle that message as the condition to get out of the loop?
|
|
|
|
|
hfry wrote: can't you create a timer using SetTimer() that would post WM_TIMER to your message queue and handle that message as the condition to get out of the loop?
Doh!!! You're exactly right! I'll adjust accordingly! Thanks so much for mentioning that - I feel like an idiot for missing something so obvious.
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
Save an Orange - Use the VCF!
|
|
|
|
|
Please note that you will have to use callbacks with the timer, as you don't have a window.
|
|
|
|
|
Polling with PeekMessage is antisocial behaviour for an application. In a multitasking OS busy waits should be avoided like the plague.
Steve
|
|
|
|
|
If it helps, you can use MsgWaitForMultipleObjects() to put a timeout on waiting for messages.
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"
|
|
|
|
|
|
Please!!! I'm tryng to get the amount of memory allocated by a process. I have the HANDLE of process, and actually a discovered a function wich returns information about pages "GetProcessMemoryInfo" defined in "psapi.h", but I don't know how to get the amount of memory (in Kb) allocated for this process. How can I get this information????
Thanks!
|
|
|
|
|
you can use GetProcessMemoryInfo to get amount of memory (in Kb) allocated for process as following :
<br />
PROCESS_MEMORY_COUNTERS pmc;<br />
if ( GetProcessMemoryInfo( hProcess, &pmc, sizeof(pmc)) )<br />
{<br />
CString s3;<br />
s3.Format( "amount of memory (in Kb) allocated for process: %ld\n", pmc.WorkingSetSize/1024 );<br />
}<br />
Use the WorkingSetSize member of the PROCESS_MEMORY_COUNTERS structure to get
amount of memory (in Kb) allocated for process.
Osama E. Adly
|
|
|
|
|
How do you convert a ULARGE_INTEGER in to a string and back?
No MFC Pleas.
Thanks in advance
G_S
|
|
|
|
|
1) sprintf(str, "%I64d", num);
2) _atoi64(str);
Maxwell Chen
|
|
|
|
|
Hallo
I try to implement: double clicking a file opens mainframe an childframe. Openeing the mainframe seems to work but what do i have to do that also the childframe opens ??
THX
|
|
|
|