Click here to Skip to main content
15,887,175 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: Text editor in vc++ Pin
lolici13-Mar-17 2:42
lolici13-Mar-17 2:42 
GeneralRe: Text editor in vc++ Pin
Jochen Arndt13-Mar-17 2:53
professionalJochen Arndt13-Mar-17 2:53 
GeneralRe: Text editor in vc++ Pin
lolici13-Mar-17 3:15
lolici13-Mar-17 3:15 
GeneralRe: Text editor in vc++ Pin
lolici13-Mar-17 3:29
lolici13-Mar-17 3:29 
GeneralRe: Text editor in vc++ Pin
Jochen Arndt13-Mar-17 3:47
professionalJochen Arndt13-Mar-17 3:47 
GeneralRe: Text editor in vc++ Pin
lolici13-Mar-17 4:07
lolici13-Mar-17 4:07 
QuestionHow to give data dynamically in a dialog box using visual c++ Pin
lolici9-Mar-17 3:14
lolici9-Mar-17 3:14 
AnswerRe: How to give data dynamically in a dialog box using visual c++ Pin
Richard MacCutchan9-Mar-17 5:22
mveRichard MacCutchan9-Mar-17 5:22 
GeneralRe: How to give data dynamically in a dialog box using visual c++ Pin
lolici9-Mar-17 5:51
lolici9-Mar-17 5:51 
GeneralRe: How to give data dynamically in a dialog box using visual c++ Pin
Richard MacCutchan9-Mar-17 6:07
mveRichard MacCutchan9-Mar-17 6:07 
GeneralRe: How to give data dynamically in a dialog box using visual c++ Pin
lolici9-Mar-17 6:54
lolici9-Mar-17 6:54 
GeneralRe: How to give data dynamically in a dialog box using visual c++ Pin
Richard MacCutchan9-Mar-17 8:23
mveRichard MacCutchan9-Mar-17 8:23 
GeneralRe: How to give data dynamically in a dialog box using visual c++ Pin
lolici10-Mar-17 4:29
lolici10-Mar-17 4:29 
GeneralRe: How to give data dynamically in a dialog box using visual c++ Pin
Richard MacCutchan10-Mar-17 4:38
mveRichard MacCutchan10-Mar-17 4:38 
GeneralRe: How to give data dynamically in a dialog box using visual c++ Pin
ThatsAlok11-May-17 20:51
ThatsAlok11-May-17 20:51 
QuestionSTL std::string help needed Pin
VISWESWARAN19988-Feb-17 7:02
professionalVISWESWARAN19988-Feb-17 7:02 
AnswerRe: STL std::string help needed Pin
Richard MacCutchan8-Feb-17 22:09
mveRichard MacCutchan8-Feb-17 22:09 
GeneralRe: STL std::string help needed Pin
VISWESWARAN19989-Feb-17 3:59
professionalVISWESWARAN19989-Feb-17 3:59 
GeneralRe: STL std::string help needed Pin
Richard MacCutchan9-Feb-17 5:24
mveRichard MacCutchan9-Feb-17 5:24 
GeneralRe: STL std::string help needed Pin
VISWESWARAN19989-Feb-17 19:53
professionalVISWESWARAN19989-Feb-17 19:53 
Thank you for your solution sir but the wide character is something like this,

L"F:\\dupelicateFinder\\New folder\\New folder\\检查.jpg"

so I am converting it to the string by the above method described by you,

"F:\\dupelicateFinder\\New folder\\New folder\\检查.jpg"

I've have already found a way to convert the std::string to char* using strcppy so finally I get this,

"F:\\dupelicateFinder\\New folder\\New folder\\检查.jpg"

the same thing as of string, but I have a function( from 3rd party library) which takes char* as an argument so, I have char* value as F:\\dupelicateFinder\\New folder\\New folder\\检查.jpg

but the function shows returns -1(file not found) since the unicode fonts didn't changed from 检查.jpg to 检查.jpg so how to open the file using that function

I have checked the work flow of this function using Debugger by creating the break-points and checked the values using Immediate window.

Below is my code:

C++
// Template is passed as wstring i.e duplicates is equal to std::wstring
template<typename duplicates>
std::string Duplicates<duplicates>::compute_hash(duplicates file_loc)
{
	std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>> converter;
	std::string narrow_target = converter.to_bytes(file_loc);
	char *cstr = new char[narrow_target.length() + 1];
	strcpy(cstr, narrow_target.c_str());
	 //This function takes char* as an argument
	std::string hash = CALL_MD5_Function(cstr);
	delete[] cstr;
	std::cout << hash;
	return hash;
}

GeneralRe: STL std::string help needed Pin
Richard MacCutchan9-Feb-17 20:51
mveRichard MacCutchan9-Feb-17 20:51 
GeneralRe: STL std::string help needed Pin
Jochen Arndt9-Feb-17 21:13
professionalJochen Arndt9-Feb-17 21:13 
GeneralRe: STL std::string help needed Pin
VISWESWARAN19989-Feb-17 21:56
professionalVISWESWARAN19989-Feb-17 21:56 
GeneralRe: STL std::string help needed Pin
Jochen Arndt9-Feb-17 23:35
professionalJochen Arndt9-Feb-17 23:35 
PraiseRe: STL std::string help needed Pin
VISWESWARAN19989-Feb-17 23:53
professionalVISWESWARAN19989-Feb-17 23:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.