|
Ahoy all,
I'm currently making an application that analyzes network packets on a Windows system. I have no problems monitoring the packets but I'm having a hard time finding the source application of the packet (on the local system).
Applications such as NetLimiter are able to tell where a specific packet originated from.
Does anyone know how to achieve this? How can one find the process that sent the packet?
UPDATE: Found a way to enumerate all active connections and their ports, but still have no clue on how to figure out a connection's process ID.. anyone?
Huge thanks in advance,
|
|
|
|
|
Hi,
My program is written in Visual C++ 6 + MFC (4.2)
I need to build it with unicode. I downloaded Microsoft Core Platform SDK and took "unicows.lib" from there.
When building application in debug mode i get following error :
"Linking...UnicoWS.lib(failure.obj) : fatal error LNK1103: debugging information corrupt; recompile module"
When i started researching , i understood that unicows.lib i took from microsoft core SDK is latest version and it was build in VC 7 (it's debug info).
Now , the question is if maybe someone has older "unicows.lib" which will be good for VC6 ? I need it badly.
Please post URL to download here or sent it to
leon AT btdtech DOT com
Thanks!!
|
|
|
|
|
http://weblogs.asp.net/michkap
This is Michael Kaplan's blob who did UNICOWS. Maybe he can help.
*shrug*
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
I have installed the latest command line C++ compiler from microsoft, and I would like to use it in my Visual Studio 6.0
Does anyone have any pointer on how to do this?
|
|
|
|
|
Hi,
I want to enable all the hot keys in my MFC application (in menu items, dialogs etc) after launching the application without pressing the ALT key. Is this possible, if yes how and where do I write the code.
eg. MS-Word shows the hot keys for menus when launched without pressing the ALT key.
At present the hot keys in my application are enabled only after I hit the ALT key.
Thanks,
PRJ
|
|
|
|
|
I looking for a batch program where one could place the same program to be executed with its parameters (not arguments as we know it) several times. When the batch program is run, it would executed the program file automatically with its parameters(not arguments).
I would like run the same program several times with different parameters.
Does anyone perhaps know of such a batch program and where I could get hold of it.
Thanks.
louis
|
|
|
|
|
Just in case someone wants to know the difference between arguments and parameters as mentioned in this question.
Arguments are those variables that one passes to a subroutine, or for example, as in the old days when programming in C, main(int argc, char * argv[]). These values are passed before the program is executed.
Parameters on the other hand are variables(inputs) required by a program during its execution, for example scanf() or getc() in C.
Thanks again.
Bamboo
|
|
|
|
|
So you have a command line program that prompts the user to type in their parameters at run time?
You could just redirect the input from a text file rather than from the keyboard
e.g.
Myfile.exe arg1 arg2 <parameters.txt
(i can't="" remember="" if="" that="" syntax="" is="" correct,="" offhand,="" but="" it="" should="" work)=""
<small="">--
Help me! I'm turning into a grapefruit!
Phoenix Paint - back from DPaint's ashes!
|
|
|
|
|
benjymous wrote:
You could just redirect the input from a text file rather than from the keyboard
Assuming that the program is reading from standard input, you'd have:
myprog.exe < file.dat
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
hai,
i am using Shellexecute() function to invoke my e-mail client....i.e
ShellExecute(NULL, "open", "mailto:aa@xyx.com&cc=&bcc=&subject=hello", NULL, NULL, SW_SHOW);
will this work for all e-mail clients...suppose,now i am having outlook express 2003....some may have other than microsoft product....even though will it invoke appropriate e-mail client or not
plz let me know
regards
plex
|
|
|
|
|
|
hi,
I have a question about threads. In the following code you can see a class which creates a thread, taking a callback fn that gets called repeatedly (it's using boost, but the concepts I'm trying to understand aren't boost specific, maybe?). A second file instanciates that class, using a local fn for the callback;
mythreadstuff.h
-----------------------------------
typedef boost::function1<void, int> CallbackFn;
void MyThread(CallbackFn fn)
{
int a = 0;
do {
(*fn)(a++);
Sleep(1);
} while (1);
}
class Caller {
public:
Caller(CallbackFn fn) : m_callback(fn) {}
void Start() {
m_thread = new boost::thread(
boost::bind(&MyThread, m_callback)); }
CallbackFn m_callback;
boost::thread* m_thread;
};
-----------------------------------
mymainstuff.cpp
-----------------------------------
#include "mythreadstuff.h"
void showVal(int a)
{
// do something with a
}
void main()
{
CallbackFn fn = &showVal;
Caller mycaller(fn);
mycaller.Start();
Sleep(1000);
}
-----------------------------------
when showVal is called and does its thing on 'a', is it in the parent process from the main() process, or is it in the child thread process? Do I need to protect what's going on in there with mutexes, or is that only if the function shares some global variable in mymainstuff.cpp?
Is there a way of printing a process id (or some other identifier) which shows what process showVal is acting in?
thanks,
nik
|
|
|
|
|
Yes, it runs within the thread.
If you're in Visual Studio, you can break within your thread on the (*fn)(a++); . Use F11 to step into the function. Then select Debug->Threads from the main menu, and you'll see a list of running threads, with the current thread highlighted.
I'm not sure how many threads you'll see there (depends on your application), but if you double-click any of them, it'll open an appropriate window to display the code currently being executed in that thread. With Call Stack in place, you'll see that one of those threads has your main() happily sleeping while your thread is executing the callback.
Bob Ciora
|
|
|
|
|
hai,
i am using MFC application with MAPI support.
frame work has provided MAPI functionality with in OnFileSendMail().
with this i able to send mails, but i want to send mail's along with attachments...so where to mention the attachment exactly in my code...
plz let me know with code chunks...
regards,
plex
|
|
|
|
|
What to do to add an image along with a text and insert an image as a subitem in list control? The application is based on CFormView,and using CListCtrl with Report style.
|
|
|
|
|
|
Hi all,
I write a API App, I use playsound() in event Init form.
I also call Help file (.chm) in my app. But when I call HelpFile, the sound play as the form inited again. In the Help file,the sound play when I change the topic.
I don't know why...
Anybody help me find the explanation ?
Thank !
To love in vain more than love no one.
|
|
|
|
|
Hi
I am not experinced in MFC . I'm doing simulation and measurment project in direct3d . From my project i am getting some data that i have to show in report . Basically for reporting i'am using crystal report 8.5 (for easy) .
So my problem is When i printing report after report print done it is all ejecting page that is i dont want to do beacuse report is only 10 line and next report can print in current page . But it is ejecting page so i have to set page again.
So in Short how can i prevent to page eject after print ? Any ascii char ? or Any API ?
|
|
|
|
|
Hi,Everyone:
when i build the program in server machine, it runs well; but if i build it in local machine and upload, then i got a Runtime Error.
<br />
-Microsoft Visual C++ Runtime Library-<br />
<br />
d:\vcydcj.exe<br />
<br />
abnormal program termination.<br />
is it normal, cos the difference of Op-System?
Server Machine: Windows 2000 Professional
Local Machine: Windows Xp
& it seemed problem happened when it runs to these code:
<br />
CADOParameter pParamIn_Readnum(CADORecordset::typeInteger, sizeof(int));<br />
pParamIn_Readnum.SetValue(pMydoc->rwbossdlg.m_nReadNum);<br />
CADOCommand pCmd(pAdoDb_RB, "ydcj_getdata_574");<br />
pCmd.AddParameter(&pParamIn_Readnum);<br />
pRs_RB = new CADORecordset(pAdoDb_RB);<br />
pRs_RB->Execute(&pCmd));<br />
Thx!
________________________________________
Many nights we've prayed with no proof anyone could hear, we were moving moutains long before we knew we could!
Yet now i'm standing here, although we know there's much to fear, hope seemed like summer bird too swiftly flown away ...
There can be miracles! When you believe, though hope is frail, it's hard to kill!
Who knows what miracles, you can achieve! When you believe, somehow you will ...
YOU WILL WHEN YOU BELIEVE
|
|
|
|
|
I want to write a utility to turn off the Direct3D and DirectDraw function.
I can turn off the function by the following procedure :
a. Open "Run" in "Start" menu and type "Dxdiag".
b. Select "Display" tab, and click the "Disable" button with "Direct3D Acceleration"
But I can't find solution that uses Windows API or other way.
Could someone help me to find out how to implement this function?
Thanks!
Jesa
|
|
|
|
|
HOw can I turn off the Excel toolbars when launching it from within VC as a COM app?
|
|
|
|
|
|
Hi all,
I have to share some data among processes. how to create shared memory among processes. How can we implement inter process communication techniques using win32/mfc.
thanks and regards,
rahul.
|
|
|
|
|
|
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/creating_named_shared_memory.asp[^]
________________________________________
Many nights we've prayed with no proof anyone could hear, we were moving moutains long before we knew we could!
Yet now i'm standing here, although we know there's much to fear, hope seemed like summer bird too swiftly flown away ...
There can be miracles! When you believe, though hope is frail, it's hard to kill!
Who knows what miracles, you can achieve! When you believe, somehow you will ...
YOU WILL WHEN YOU BELIEVE
|
|
|
|