|
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
|
|
|
|
|
Download was successful and temporary file is perfect!!!
But when it is copied it did return a nonzero value but the destination file was corrupted.
|
|
|
|
|
stanlymt wrote: ...CopyFileW didnt return any error...
Did it return a nonzero value?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
It did return a nonzero value otherwise it would give a download error.
|
|
|
|
|
I find same strange problem when work with DirectX9.
when I push Ctrl+Alt+Del and open Task Manager,
my Window Render function is go on, device is ok, but
in the window I see backgraund of my desktop...
even clear backgraund function don't do nothing with it!
|
|
|
|
|
Hi all..
First I am crawling the mail information and writing to output XML File...
It creates ADD Tag and under ADD tag the crawled information comes...
But Second time if i crawl i want to maintain History File...Suppose if any Mails deleted in Mailbox...
That deleted mails i must check or compare with first XML file if not found..
I Should write only that mails in History File..I am not getting how to do it...
Can anyone help me please..
I am just sending the code where i am just putting the code...
I dnt want any code..Just any help..where i can move...
Thanking you
manju
//////////////////////////
struct loginInfo<br />
{<br />
CAclsApi *TestApi ;<br />
_TCHAR *sUserName;<br />
_TCHAR *sPassWord;<br />
_TCHAR *sServerName;<br />
_TCHAR *sTagStyle;<br />
long sMaxCrawl;<br />
const _TCHAR *sStDate;<br />
const _TCHAR *sEndDate;<br />
_TCHAR *sFileExt;<br />
_TCHAR *OutPut;<br />
_TCHAR *sMailDate;<br />
_TCHAR *sDuration;<br />
bool *cMailHasAttachment;<br />
_TCHAR *cAttachFileNames;<br />
bool bThreadRunning;<br />
bool bServerConnected;<br />
bool BServerConnected() const { return bServerConnected; }<br />
void BServerConnected(bool val) { bServerConnected = val; }<br />
bool btimeOut;<br />
_TCHAR thstrAclInfo[1024];<br />
ACL_STATUS status;<br />
ACL_STRUCT_INFO *ACL_INFO;<br />
ACL_STRUCT_MBUSERS_MAIL *ACL_STMAIL; <br />
ACL_STRUCT_MBUSERS *ACL_MBUSERS;<br />
ACL_STRUCT_MBUSERS_MAIL_ATTCH *ACL_MAIL_ATTACH;<br />
<br />
};<br />
unsigned int __stdcall ConnectToServer(void *dummy)<br />
{<br />
loginInfo *linfo = (loginInfo*)dummy; <br />
linfo->ACL_INFO=new ACL_STRUCT_INFO;<br />
linfo->ACL_STMAIL=new ACL_STRUCT_MBUSERS_MAIL[MAX_MAIL_COUNT];<br />
linfo->ACL_MBUSERS=new ACL_STRUCT_MBUSERS[MAX_MAILBOX_COUNT];<br />
<br />
<br />
for(int y=0; y<(linfo->ACL_STMAIL[0].iMBUserMailCount); y++) <br />
{ <br />
<br />
_tprintf("\nMails found between %s date and %s date\n",linfo->sStDate,linfo->sEndDate); <br />
for(int i = 0;i < (linfo->ACL_STMAIL[y].iMBUserMailAttachFileCount); i++) <br />
{<br />
<br />
elementName [0] = "NAME";<br />
elementValue[0] = linfo->ACL_STMAIL[y].cMBUserMailFromName;<br />
elementName [1] = "EMAIl";<br />
elementValue[1] = linfo->ACL_STMAIL[y].cMBUserMailFromEmail;<br />
elementName [2] = "DATE";<br />
elementValue[2] = mailDatee;<br />
elementName [3] = "TITLE";<br />
elementValue[3] = linfo->ACL_STMAIL[y].cMBUserMailSubject;<br />
elementName [4] = "BODY";<br />
elementValue[4] = linfo->ACL_STMAIL[y].cMBUserMailTextDesc;<br />
elementName [5] = "URL";<br />
elementValue[5] = MailPath;<br />
elementName [6] = "ATTACHMENT";<br />
elementValue[6] = strAttachFilePath[i];<br />
elementName [7] = "TYPE";<br />
elementValue[7] = nExtension[i];<br />
elementName [8] = "SIZE";<br />
elementValue[8] = strMailAttachSize;<br />
elementName [9] = "ACL";<br />
elementValue[9] = strACL;<br />
elementName [10] = "NOACL";<br />
elementValue[10] = strNoACL; <br />
<br />
<br />
CSingleLock singleLock(&LockListFile);<br />
singleLock.Lock(); <br />
if (singleLock.IsLocked()) <br />
{ <br />
<br />
bsgw_status = BSGW_WriteRequest(listFile,BSGW_REQUEST_TYPE_ADD,11,elementName,elementValue);<br />
if(bsgw_status == BSGW_STATUS_SUCCESS) <br />
{<br />
IS_Trace( IS_COMP_EXC, FuncName, "bsgw_status=[%d]",BSGW_STATUS_SUCCESS) ;<br />
_tprintf("\nWritten to list file successfully\n");<br />
<br />
}<br />
else if(bsgw_status != BSGW_STATUS_SUCCESS) <br />
{<br />
<br />
_tcscpy_s( errcode, "TSE_0017" ) ;<br />
IS_MgrLog( IS_OUTPUT_ERR, IS_COMP_EXC, errcode, "Error writing XML", ERRbuff );<br />
_tprintf("\nError writing XML : %d\n", bsgw_status);<br />
return 0;<br />
}<br />
singleLock.Unlock();<br />
}<br />
}<br />
}<br />
} //////////////////////
Hi..
I am Mnaju.I have Completed my B.E Computers Science.Lokking for a job.I am interested in VC++
manju
|
|
|
|
|
Hi
I have a problem while converting my VC++ application into a service.. the service gets created.. but,when i try to start the service i get the error....
Error is:
"Could not start the program on Local Computer.
Error 1053:The service did not respond to the start or control request in a timely fashion"..
is there any steps to be followed while convertine the exe into service...
Thanks in Advance
V.Govardhan Reddy.......
|
|
|
|
|
tns_ranjith wrote: is there any steps to be followed while convertine the exe into service...
Yes. When a service is started, the service control manager expect the service to call StartServiceCtrlDispatcher()[^] with in 30 sec. I hope you havent called this function. Read the remark section in the above link for more details.
|
|
|
|