Hey guys, how would i go about converting a string variable (or even a char) to a dword? I've tried casting it but I get an error..
Quote: "1>.\main.cpp(108) : error C2440: 'type cast' : cannot convert from 'std::string' to 'DWORD'
1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called"
I am new to c++ and have been messing around rearranging stuff trying to cast (DWORD) .etc in front, in the function call .etc .etc just to see if something works. Any help?
Code;
dbLoadDLL((DWORD)"kernel32.dll",1);
string strdir;
string strfile="\\test.ini";
strdir=dbGetDir();
string strresult=strdir+strfile;
dbPrint(const_cast<char*>(strresult.c_str()));
dbCallDLL(1,(DWORD)"WritePrivateProfileStringA",
(DWORD)"section",
(DWORD)"label",
(DWORD)"value",
(DWORD)strresult);
dbDeleteDLL(1);