LPCSTR, LPCTSTR and LPTSTR

To answer the first part of your question: LPCSTR is a pointer to a const string (LP means Long Pointer) LPCTSTR is a pointer to a const TCHAR string, (TCHAR being either a wide char or char depending on whether UNICODE is defined in your project) LPTSTR is a pointer to a (non-const) TCHAR string In practice when talking about these in the past, … Read more

CALL command vs. START with /WAIT option

For exe files, I suppose the differences are nearly unimportant.But to start an exe you don’t even need CALL. When starting another batch it’s a big difference,as CALL will start it in the same window and the called batch has access to the same variable context.So it can also change variables which affects the caller. START will create a new cmd.exe for the … Read more

How to split large text file in windows?

If you have installed Git for Windows, you should have Git Bash installed, since that comes with Git. Use the split command in Git Bash to split a file: into files of size 500MB each: split myLargeFile.txt -b 500m into files with 10000 lines each: split myLargeFile.txt -l 10000 Tips: If you don’t have Git/Git Bash, download at https://git-scm.com/download If you … Read more

How does the echo command works in batch programming

The ECHO command in Windows CMD is used to print out text to the screen, display the actual setting of the Command-line which means when you do: The “C:\Users[User]” line before your command input will disappear. You can restore it with: Here all functions of ECHO explained: @echo [on/off] (to set the command-line settings) echo [text] (to print text … Read more

What is the source of the data for the ProgramFiles, ProgramW6432Dir, ProgramFilesDir (x86), CommonProgramFiles environment variables?

On a 64-bit Windows system, the reading of the various environment variables and some Windows Registry keys is redirected to different sources, depending whether the process doing the reading is 64-bit or 32-bit. The table below lists these data sources: So for example, for a 32-bit process, the source of the data for the %ProgramFiles% and %ProgramFiles(x86)% environment variables is the … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)