|
in the above code, the fileFrom.Open() call should have strFrom as the first parameter, not strFileArray[uFile];
[insert witty comment here]
bdiamond
|
|
|
|
|
Hi ,
It really worls , but one doubt , if v do not have the access password(already accessed that system from RUN : "\\system2") for the other system , it wont work.
is ther any way v can provide username and password for the other system's access?
Regards,
Thax,
Prax
|
|
|
|
|
I want to send a http POST request to a given url.How can I get it done. I usually use the CInternetSession class to
connect to a server and to get the specified page.From that page I go to the next page by fetching the next page's url
from the href of the SUBMIT button.
One day I get a page.But when clicked manually on the NEXT button (SUBMIT button of html) the url in the address bar do not change but the page is changed. Neither I found any url in the web page(source of page) also.
I come to know that this is because the page uses the POST method and by using the hidden values posted from the page the sever is dynamically moving to next page
Is it true.
Since user is not given any values in the page,can I get the next page by sending a POST request to the server using program.
Can we send a POST request to the server through VC++.
Plz help me and give any answer
Thanks in advance
Below shown the code . If you implement that in the code ,
it will be a good help for me
const int FILEBUFLEN = 1024;
char httpBuff[FILEBUFLEN+1];
TCHAR szCause[255];
/// var: url ,contains the url
TRY
{
CInternetSession session;
int numBytes;
session.SetOption(INTERNET_OPTION_CONNECT_TIMEOUT, 1000);
session.SetOption(INTERNET_OPTION_CONNECT_RETRIES, 3);
CFile *remoteFile=session.OpenURL(url, 1 , INTERNET_FLAG_TRANSFER_BINARY | INTERNET_FLAG_RELOAD);
numBytes = remoteFile->Read(httpBuff, FILEBUFLEN);
while (numBytes)
{
httpBuff[numBytes]='\0';
data.Insert(data.GetLength()+10,httpBuff);
numBytes = remoteFile->Read(httpBuff, FILEBUFLEN);
}
}
CATCH_ALL(error)
{
error->GetErrorMessage(szCause,254,NULL);
data.Format("%s",szCause);
Logger logVar;
logVar.WriteLog(data);
return FALSE;
}
END_CATCH_ALL;
return true;
Now I want to give a post request to this page.I saw
an option in CHttpConnection::openRequest() to post request in POST method.I tried it But the fifth parameter is not working.If it is NULL then it will work.
|
|
|
|
|
Really Sir,
i amn't able to track error in your code,but i can suggest you a way to post data to HTTP server,there is one very good wrapper class that will do it for you
Search for amHttp AT CP
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
Hi All,
I have requirement to tranfer a file(test.txt) between 2 machines connected in same LAN.
May b v can use Sockets., but i dont know full details . please give me complete details with
simple code if possible.
Regards,
Prax
|
|
|
|
|
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/copyfile.asp
4apai
There're no impossible tasks. There're tasks that required infinite period of execution time.
|
|
|
|
|
Hi,
It works ...!!!
Thx
Prax
|
|
|
|
|
Hello Friends,
I am using Form View on which I had placed two edit boxes. My problem is that The Edit box which is on the top of the FormView is not displaying the Vertical scroll bar and nor is doing the word wrapping thing, while the second edit box is wrapping the text present in it. I am using OnSize message also where I had specified the two edit boxes should change their size according to the size of the form view. Please help regarding this matter.
Thank you
Neelesh Jain.
|
|
|
|
|
Hi,
I Think you are having some problem with resizing/Refreshing problem.
Sujan
|
|
|
|
|
I had the problem with Refreshing i.e., The text is not getting wrapped to the next line even though I made the property of the edit box as no hscroll, and given autovscroll and even multiline. option.
Neelesh Jain
|
|
|
|
|
Hi guys,
I am having a cpp file in which i have added 2 more cpp files in which i have declared my classes... now when i compiles and builds well and executes ... but in the middle of execution it is giving an error window which states tht
"Debug Assertion Failed!" Expression: _BLOCK_TYPE_IS_VALID(pHead->nBlockUse)
I am not any idea why i am getting this... may be my stack is overflowing or is their any pointer mismatch or invalid references....? but as far as i know i havn't used pointers in my cube class except in sphere class.
plz can anyone help me on this issue...How can i upload my programs..if i want to overhere...?
thanks in advance,
Suman
|
|
|
|
|
Hi
I think, the program is trying to access an invalid pointer. Please check where it is happening using the call stack(view/debug windows), and step through the source.
Hope this might help you
Sujan
|
|
|
|
|
Hi,
i am not getting where it is.... actually this is wht happened... previously i am having a program which is having another file included in it. the other file is containing only some functions regrading to a particular task of considering a cube and finding values for something respectively.
now instead of having one cube ... i want to modify it to take more number of cubes... so i have just declared the other file in a class and declared all the previous functions as the methods of the class and all the variables used previously, as data members (but haven't changed any code regarding to logic). but in main file in whcih previously i used to call just functions, now i am calling them as methods of every cube instance. Now i am getting the above stated error.
hope now i am clear....
thanks,
Suman
|
|
|
|
|
How do i program the regional setting. You know when App runs in US, it will use $, runs in England, use pound. Thanks
<italic>Work hard and a bit of luck is the key to success.
|
|
|
|
|
GetCurrencyFormat()
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it!
|
|
|
|
|
How about the date format? How can we program, to make the regional and language option in control panel, what we want?
<italic>Work hard and a bit of luck is the key to success.
|
|
|
|
|
|
Hello
Im having a hard time trying to figure what to do on my college assigment. Its a multi level index that only needs to be one level. it has three index nodes per block. I have to insert an integer into the list sorted. I already wrote the code for inserting into a sorted link list, just dont know how to put three pointers per block and link those. If anyone can point me in the right direction that would be great.
Thanks
Jason
|
|
|
|
|
i dont remember for sure. but it seems to be a b-tree structure. in this case u can find information on google.
4apai
There're no impossible tasks. There're tasks that required infinite period of execution time.
|
|
|
|
|
I have tried setting the "Tool Window" setting to true, but the height of the caption does not get smaller like it is supposed to. Is there a simple way for me to change the size of the caption in a Dialog Window? Thanks!
|
|
|
|
|
Hai , i working on VC++ using MFC and i have to work on listview class to call the database data into th SDI application as a listview format and i also know that i have a sample in MSDN as dbvlist which does same what i want but along with that i also need to get a option to add , delete and update , please any one working in VC++ MFC related to database ,,please help me
|
|
|
|
|
Hi,
As a simple solution, you can create a userdefined function within your application, which uses the existing delete and update function present in dbvlist. The other solution is to create a new class itself, having the base class as dbvlist.
Hope this will help you.
Sujan
|
|
|
|
|
hi,
MFC + MS Access using ADO sample code can be found at http://www.geocities.com/jcynion/jcynion_codes.htm, look for VideoRental sample code.
It load data to a listview, allows add,edit and delete.
Hope this will help
|
|
|
|
|
Hi,
I have an abstract base class Graph which has concrete child classes Grid and Puzzle. To keep the code general, I use pointers to the base class Graph and instantiate them to either Grid or Puzzle objects. This works fine until I have to delete any of these, where I get the "Debug Assertion Failed!", "_BLOCK_TYPE_IS_VALID(pHead->nBlockUse)" error. For example:
Grid *g = new Grid();
delete g;
works, but
Graph *g = new Grid();
delete g;
doesn't. Does anybody know why this is? Any help would be greatly appreciated.
|
|
|
|
|
Is the destructor for your base class virtual?
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|