|
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.
|
|
|
|
|
Your service has not called SetServiceStatus with the dwCurrentState field in the SERVICE_STATUS parameter set to SERVICE_RUNNING within "a timely fashion." That time is something like 20 or 30 seconds.
Services[^]
Service example[^]
Judy
|
|
|
|
|
How can I get a reference to the Doc class instance
in the CMainFrame being part of a SDI project ?
Thanks a lot!
|
|
|
|
|
Check out GetActiveDocument [^] method.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Another possibility to what CPallini told you is to do the following.
Declare a CMyDoc variable in the StdAfx.h as extern. Then in the InitialUpdate of your view, use the GetDocument and assign it to that extern pointer/variable. Then you will be able to use it in every place on your programm.
Regards.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
Rating helpfull answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
Hi all,
Please tell me how can i create a report in VC++ 2005, i m using SDI type of application,and for Database i m using MS-Access.
Use table for ftch record and then the record is use for report generation.
Please tell me example an in detail.
After this how can i print this report.
Please help me for this.
I m waiting for your valuable suggestions.
Thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
Hi
I want to get mouse move or click event on Internet Explorer ,
Through that I can get selected text form Internet Explorer .
Thanks in advance.
dabara
|
|
|
|
|
You need a Browser Helper Object (BHO). There is a fine sample in the MSDN.
It is COM and Unicode, so it gets tricky at some point.
Greetings from Germany
|
|
|
|
|
Hi
I allready used BHO on my project but I am not getting any mouse click event on Internet Explorer .
I suppose on Invoke() function , I can get Mouse Event but not getting mouse event over there.
I used DISPID_MOUSEMOVE but fail to get Mouse Event.
dabara
|
|
|
|
|
Did you look for "There is a fine sample in the MSDN." ???
Greetings from Germany
|
|
|
|
|
I used This code for get the Text from Internet Explorer . Use IHTMLDocument::OnClick() and IHTMLDocument::MouseUp() Message for Mouse Event . I used Popupblocker code for Implementing my application . But On Some pages like http://search.webdunia.com and hindi.webdunia.com
On That pages I am not able to get Invoke function So I am not getting Text So pls help me out To resolve me problem. in OnDocEventHandler Function.
IHTMLDocument2 * pDoc;
m_pBrowser->get_Document((IDispatch**)&pDoc);
CComQIPtr<IHTMLSelectionObject> pSel;
CComQIPtr<IHTMLTxtRange> pRange;
HRESULT hr = pDoc->get_selection( & pSel );
if (hr || (!pSel) )
return E_FAIL;
hr = pSel->createRange((IDispatch **)&pRange);
if (hr || (!pRange))
return E_FAIL;
CComBSTR bstrText;
pRange->get_text(&bstrText);
dabara
|
|
|
|
|
I want to do the following:
1. use Image/Bitmap to load a image file
2. decorate it, for example, put another small image on it
3. when save, overwrite the original one using the decorated one
The problem is that, when save the file format should keep the same, how to solve the problem?
I find it is even hard to get the file type (eg. gif, jpeg , tiff...) via an Image/Bitmap object.
|
|
|
|
|
|
Hi all,
I am wondering if there is a way to use FaceID icon to a dialog box?
I tried to do the following in my dialog's OnInitDialog() :
HICON hIcon = LoadIcon(AfxGetInstanceHandle(), MAKEINTRESOURCE(540));
this->SetIcon(hIcon, FALSE);
"540" is FaceID number of a commandbar button icon. Apparently it did not work as the ID did not point to the wanted resource in the dialog project.
Any help would be really great. Thanks!
|
|
|
|
|
J.B. wrote: Apparently it did not work...
What does LoadIcon() return? Have you tried making hIcon a member variable instead?
What happens if you use:
hIcon = AfxGetApp()->LoadIcon(540);
"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
|
|
|
|
|
Dear DavidCrow,
Thanks for the reply. LoadIcon() returns NULL . I should give more details about my project. The dialog is ATL-based class which is to be brought up via DoModal() . A window-based parent may decide to bring up the dialog at any time. Since the dialog is ATL based (derived from CAxDialogImpl class). The way I use to call LoadIcon in the dialog's OnInitDialog() is in fact:
HICON hIcon = LoadIcon((HINSTANCE)GetModuleHandle(NULL), MAKEINRESOURCE(540));
if (NULL != hIcon)
this->SetIcon(hIcon);
I get hIcon is NULL in return. Am I doing something incorrectly here?
Thanks!
|
|
|
|
|
J.B. wrote: Am I doing something incorrectly here?
Are you calling GetLastError() to find out why?
"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
|
|
|
|
|
Yes, the return code is 1813 (The specified resource type cannot be found in the image file ).
Perhaps the resource just isn't available for access without explicitly loading from the actual resource DLL?
Thanks for the help anyway
|
|
|
|