0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
My VC Compiler gives the correct output provided you use GetBuffer and not Getbuffer.
0
ankurk's Avatar, Join Date: Aug 2007
Go4Expert Member
yes i am using the GetBuffer(); earlier that was a typing mistake,,


still not getting the right output..., r u getting the whole string in the char * argument???
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Yup.
0
ankurk's Avatar, Join Date: Aug 2007
Go4Expert Member
well god knows what's wrong then.......
but i'll tell you it's not that simple i have found several queries similar to mine , but neither of the solutions provided there are useful.


anyways thanks for your time
0
ankurk's Avatar, Join Date: Aug 2007
Go4Expert Member
here is the correct solution use this version of fopen

Code:
int let;
	UpdateData();

	const wchar_t  * g_application_path  = (LPCTSTR) m_browse_file;

	FILE * file = _tfopen(g_application_path ,_T("rb"));

	if(!file)
	{
		let = GetLastError();
		MessageBox(_T("ERROR! file not found ..."));
		exit(0);
	}
	else
		MessageBox(_T("OK File found ..."));
just wanted to help if any one had similar problem

Last edited by shabbir; 13Oct2007 at 18:09.. Reason: Code block