|
George_George wrote: [System], what does it mean?
That's the kernel process ntkrnlpa.exe whose process id is 4. "They" call it System .
Nibu babu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
|
|
|
|
|
Great man, Nibu!
Does it mean the kernel is using that port?
regards,
George
|
|
|
|
|
George_George wrote: Does it mean the kernel is using that port?
Yes!
Nibu babu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
|
|
|
|
|
Thanks for your help, Nibu!
regards,
George
|
|
|
|
|
Use TcpView[^] from Mark Russinovich.
It's excellent.
You can also find detailed information using the ProcessExplorer[^] regarding loaded dlls and such by double-clicking on a process.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Hi Roger,
I like TCPView, but does ProcessExplorer have this function to monitor port usage?
regards,
George
|
|
|
|
|
George_George wrote: I like TCPView, but does ProcessExplorer have this function to monitor port usage?
Nope, not in the same way. But you can monitor the connections on the TCP/IP tab in the properties dialogue for a process.
You can also get a lot of information about the process and what dll's is has loaded.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Thanks Roger!
You mean Process Explorer provides process basis view other than global port view?
regards,
George
|
|
|
|
|
George_George wrote: process basis view....global port view
Don't know what you mean.
I meant for you to use TcpView in order to figure out what process has opened which port and then use ProcessExplorer to get more info about the process and its loaded dll's.
Try ProcessExplorer. If you find it useful simply continue to use it, otherwise throw it in the trash can.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Thanks Roger,
Sorry for my bad English. Let me say in question in some other words. Could you point out under which menu could we have port usage of a process under Process Explorer please? I have tried but failed to find out.
regards,
George
|
|
|
|
|
<Process> -> <Properties>...or
right click for context menu on a process in the tree and then select <Properties>...or
double-clicking on a process in the tree...
...will bring up the tabbed properties dialogue box.
Select the TCP/IP tab and you'll see what ports the process currently has opened.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Thanks Roger,
I can see 4 columns, they are protocol/Local Address/Remote Address/State. Do you mean the port in Local Address are the occupied address?
regards,
George
|
|
|
|
|
The address columns show either an ip-address or a resolved host name followed by a colon and a number. The number after the colon is the port used.
The local address column is on you computer and the remote column is the remote computer that your computer connects to.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Thanks Roger!
Question answered.
regards,
George
|
|
|
|
|
Hi,
How to read a manifest file from executable using either vc++ or sdk?
Regards
|
|
|
|
|
What's a manifest file?
Do you mean a .NET assembly manifest? If so, it's XML - you can
read it the same way you'd read any XML file.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
There is manifest file for native applications also. It can either be embedded in the executable file or can be used as standalong file. It basically points to which version of CRT, MFC, and other common controls to use from winsxs.
-Saurabh
|
|
|
|
|
|
|
No problem, you are welcome.
-Saurabh
|
|
|
|
|
subramanyeswari wrote: How to read a manifest file from executable using either vc++ or sdk?
Resource digger[^] does it, tell me if that's what you want. I can share with you the function source which does this.
Basically manifest file is a resource of type RT_MANIFEST and it's embedded into an exe as such. So what resource digger does is that it loads the exe and searches for RT_MANIFEST resource type and get's the content of the resource and saves it to an XML file then opens it with the HTML control.
Nibu babu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
|
|
|
|
|
thanks. This is what exactly i am looking for. I opened my exe with your resource digger. I saw my manifest file. How to save it back to xml file. Does it do automatically ?. how to work with resource digger.
Is it possible for you to share the source code.
And i have one more question. I embed my manifest file in a resouece and linked that resource with exe. I ran that exe in vista. It ran with no UAC prompt. But when i tried to write into registry. It failed to do so. I used requireAdministrator in them anifest. It did not ask for credentials. Should it ask for credentials or not? if it does not ask then i want to enable UAC prompt asking for credentials there. Is it possible to do so programmtically (or) will it work if i do impersonation.
Regards
modified on Thursday, July 3, 2008 3:16 AM
|
|
|
|
|
subramanyeswari wrote: Does it do automatically ?.
Well you've got to write code to get it working.
So the algorithm is something like this
- Use
FindResourceEx to find resource of type RT_MANIFEST .
- Use
LoadResource to load found manifest resource
- Use
LockResource to get real data in the resource
- Save this data to an XML file and this will be your manifest file.
subramanyeswari wrote: And i have one more question. I embed my manifest file in a resouece and linked that resource with exe. I ran that exe in vista. It ran with no UAC prompt. But when i tried to write into registry. It failed to do so. I used requireAdministrator in them anifest. It did not ask for credentials. Should it ask for credentials or not? if it does not ask then i want to enable UAC prompt asking for credentials there. Is it possible to do so programmtically (or) will it work if i do impersonation.
I am not so familiar with UAC in vista.
Nibu babu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
|
|
|
|
|
I'm using CopyFileW to copy a temporary downloaded file to proper location.
But in a rare scenario, CopyFileW didnt return any error but first 198,324 bytes of 454,086 bytes of destination file was written empty, rest of data is copied properly.
This was used on Windows XP.
Please tell me where would have gone wrong.
|
|
|
|
|
Looks like the download was not complete. Start the Copy FileW only after you are shure that the download is complete.
Greetings from Germany
|
|
|
|