Hello,
I would like to use the GetVolumeInformation call to retrieve the name of a removable device. I can retrieve the name just fine and store into a TCHAR array variable szVolNameBuff. Here is my code for that:
// Get Volume Information to check for NTFS or FAT
TCHAR szFileSys[256];
TCHAR szVolNameBuff[256];
DWORD dwSerial ...
See link for what I'm talking about.
I want to use point 1 in the link and
#define tfopen _wfopen
#define _T(s) L##s
to do exactly what the link says is possible:
std::ifstream file( tfopen("filename.txt", _T("r") );
But gcc (mingw) 4.4 says there's no matching call...
Am I doing it wrong or is the info in the link above incorre...
I have a wide-character XML message that I need to send over a Win32 socket in C++.
TCHAR wszBuffer[1024];
Should I sprintf(szSendBuffer, "%S", wszBuffer) the wide character buffer to a char array before sending it?
What is the correct way to send this?
...
Hello everyone
I have this method which receives a path through a TCHAR szFileName[] variable, which contains something like C:\app\...\Failed\
I'd like to sort through it so I can verify if the name of the last folder on that path is in fact, "Failed"
I thought that using something like this would work:
std::wstring Path = szFileNam...
hello again
I have this variable dirpath2 where I store the deepest directory name of a path:
typedef std::basic_string<TCHAR> tstring;
tstring dirPath = destPath;
tstring dirpath2 = dirPath.substr(destPathLenght - 7,destPathLenght - 1);
I want to be able to compare it it another string, something like:
if ( _tcscmp(dirpath2,failed)...
I have a TCHAR and value as below:
TCHAR szDestPathRoot[MAX_PATH]="String This";
Now I want the 1st three character from TCHAR , like below:
szDestPathRoot.substring(0,2);
How can I do this.
...