|
Hi,
Thanks for the help!!
Thanks,
Suman
--
"Programming is an art that fights back!"
|
|
|
|
|
Here is the code i tried
IPropertySetStorage *pPropSetStg = NULL;
IPropertyStorage *pPropStg = NULL;
HRESULT hr;
hr = ::StgOpenStorageEx(wcFilename, STGM_READ | STGM_SHARE_EXCLUSIVE, STGFMT_FILE,
0, NULL, 0, IID_IPropertySetStorage, (void**)&pPropSetStg);
hr return S_KO
hr = pPropSetStg->Open(FMTID_SummaryInformation,
STGM_READ | STGM_SHARE_EXCLUSIVE, &pPropStg);
hr returns as 0x80030002 %1 could not be found.
|
|
|
|
|
It seems that you got this error:
"STG_E_FILENOTFOUND A property set of the indicated name does not exist"
are you sure you have that object?
|
|
|
|
|
Hi,
I am looking for the way to write 1) a Windows Service in VC6 and 2) a method to monitor network availablility in VC6.
I have actually done a service that will monitor the network availablility in VS2005 but due to some situation, I am not allowed to have .Net framework 2.0 on the system that I want to install this service.
I am looking for the equivalent of
using System.Net.NetworkInformation;
NetworkChange.NetworkAvailabilityChanged += OnAvaiabilityChanged;
in VC6 and also maybe an article of how to write a Windows Service in VC6.
Any help will be appreciated.
People live with their choices.
modified on Tuesday, May 20, 2008 1:54 AM
|
|
|
|
|
Replying to my own message... I have found the method of achieving both items that I was looking for.
I just want to close this message in case anyone is also looking for anything like this.
1) For writing a Windows Service in VC6, I have found a great article on CodeProject http://www.codeproject.com/KB/system/serviceskeleton.aspx[^]">
2) For this, it is more tricky. I have found a service called Network Location Awareness and by doing a search on the internet for this, you will find some very useful information or you can have a look at this article http://www.codeproject.com/KB/IP/NLA.aspx[^]">
Hope this information is useful and thanks to anyone that have given a thought to my questions.
Cheers
People live with their choices.
|
|
|
|
|
dear all
how to calculate time during processing using Time class, anyone has such code? thanks a lot.
gentleguy
|
|
|
|
|
Are you talking about GetTickCount() ?
"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
|
|
|
|
|
i just would like to know how to calculate time from start to end processing, which function i can use it? when i used start clock() and end clock(), and CLOCK_PER_SEC, after compiling, output showed didn't declare CLOCK_PER_SEC.
but the time is very small after calculate, how to calculate? any road is ok for me. thanks
gentleguy
|
|
|
|
|
Hi,
Please refer below pseudocode,
long ltime = GetTickCount();
CallYourTimeTakingFunction();
TRACE("Time took = %li\n", GetTickCount() - ltime);
Or,
CTime startTime = CTime::GetCurrentTime();
CallYourTimeTakingFunction();
CTime endTime = CTime::GetCurrentTime();
CTimeSpan elapsedTime = endTime - startTime;
Hope this will server your purpose.
Regards,
Paresh.
|
|
|
|
|
#include <time.h>
clock_t ckStart,ckEnd,duration =0.0;
char buff[1000];
ckStart=clock();
....
.....
ckEnd=clock();
float fDuration=(float)(ckEnd-ckStart)/CLOCK_PER_SEC;
sprintf(buff,"speed=%d ms",fAveduration);
Message Box (buff,"Time");
what is wrong with these code?
output showed no declare CLOCK_PER_SEC.
what is problem. thanks
gentleguy
|
|
|
|
|
gentleguy wrote: float fDuration=(float)(ckEnd-ckStart)/CLOCK_PER_SEC;
Should be,
float fDuration=(float)(ckEnd-ckStart)/CLOCKS_PER_SEC;
Change CLOCK_PER_SEC to CLOCK<big>S</big>_PER_SEC .
Regards,
Paresh.
modified on Friday, May 16, 2008 6:55 AM
|
|
|
|
|
|
What about fc.exe?
"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
|
|
|
|
|
|
Armond Sarkisian wrote: how can I parse and get the information I need? does fc.exe create a log file?
You can easily capture its output.
"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
|
|
|
|
|
|
Armond Sarkisian wrote: ...how do I capture the output of FC.exe?
See here and here.
"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
|
|
|
|
|
Armond Sarkisian wrote: bool CompareFiles( file1, file2);
do you want to implement this function in c/c++ or are you looking for a ready made function?
--------------------------------------------
Suggestion to the members:
Please prefix your main thread subject with [SOLVED] if it is solved.
thanks.
chandu.
|
|
|
|
|
|
so, what exactly is the problem to implement it?
did you try
1.opening the two files,
2.reading byte by byte
3.comparing them and generating a report
any problem in implementing the above?
good luck.
--------------------------------------------
Suggestion to the members:
Please prefix your main thread subject with [SOLVED] if it is solved.
thanks.
chandu.
|
|
|
|
|
|
|
Hey Friends
I need to supply a proxy server to Microsoft Internet Explorer Active X Control.
This should be irrespective of Internet Explorer Settings.
Any idea how we can supply proxy to Microsoft Internet Explorer Active X Control?
Regards
|
|
|
|
|
Application can use different proxy settings for InternetOpen instance (HINTERNET) using InternetSetOption.
[
BOOL InternetSetOption(
__in HINTERNET hInternet,
__in DWORD dwOption,
__in LPVOID lpBuffer,
__in DWORD dwBufferLength
);
^]
where hInternet, InternetOpen instance, if it is NULL, the scope of the settings is global and is default option settings for Internet Explorer. So it changes the settings for WebBrowser control as well as all instance if IE.
If you want to specify proxy settings for your application alone with out changing the default settings, I don't know any interface exposed by WebBrowser control.
But with some effort you can achieve that, you may open an HINTERNET , InternetOpen instance for your application with proxy settings, and download the URL file using [wininet APIs^]and display the html source in WebBrowser control. That is WebBrowser control is used for only rendering HTML and getting UI events, connection is handled by your program.
And if you find any other way, post it.
|
|
|
|
|
thanks buddy
downloading html & displaying seems to be a messy task as there will be images etc and might be messy
will post if i find anything else
|
|
|
|