Problem in using CString in Win32 dynamic library
-
Hi. I have created a console application which reads a file from the local disk and does certain operation on the data. where i need to specify the path of the file. Now i have to create a dll file and i have to pass the path of the file as a parameter to the dll, But if i declare CString to hold the path it gives an error : undeclared identifier / no such directory of files found. please help me asap.
-
Hi. I have created a console application which reads a file from the local disk and does certain operation on the data. where i need to specify the path of the file. Now i have to create a dll file and i have to pass the path of the file as a parameter to the dll, But if i declare CString to hold the path it gives an error : undeclared identifier / no such directory of files found. please help me asap.
did you include and by the way you shouldn't be using a CString variable to be passed as a parameter. better use BSTR Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_
-
did you include and by the way you shouldn't be using a CString variable to be passed as a parameter. better use BSTR Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_
-
I tried using BSTR but it is giving error in header file. can anyone suggest the solution, its very urgent.. with regards vinay
include 'comutil.h' and link to comsupp.lib to use BSTR's.
vinaykskvs wrote:
its very urgent..
Should have resisted posting to this URGENT question but since I had already answered previously, had to follow this up. Who suggested that you should be using CString variable to be used as a parameter while passing it to a different dll
Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_
-
include 'comutil.h' and link to comsupp.lib to use BSTR's.
vinaykskvs wrote:
its very urgent..
Should have resisted posting to this URGENT question but since I had already answered previously, had to follow this up. Who suggested that you should be using CString variable to be used as a parameter while passing it to a different dll
Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_
change the property setting give MFC shared dll .. and then add afx .h header file .. i think it ll work fine...
-
Hi. I have created a console application which reads a file from the local disk and does certain operation on the data. where i need to specify the path of the file. Now i have to create a dll file and i have to pass the path of the file as a parameter to the dll, But if i declare CString to hold the path it gives an error : undeclared identifier / no such directory of files found. please help me asap.
Are you even using MFC as others have assumed? What version of Visual Studio? CStringT has been a template class for a few versions of VC++. The appropriate header for a non-MFC CString is atlstr.h. Mark
Mark Salsbery Microsoft MVP - Visual C++ :java: