You can use the Explorer.exe /select command line syntax. Given a file, this command will open the containing folder and select the file. This is what Firefox does when you click on 'Open Containing Folder' in the download manager. Here is an example:
Code:
#include <windows.h>
int main(void)
{
STARTUPINFO si = { sizeof(STARTUPINFO) };
PROCESS_INFORMATION pi = { 0 };
CreateProcess(NULL, TEXT("Explorer.exe /select,C:\\Windows\\Win.ini"), NULL,
NULL, FALSE, 0, NULL, NULL, &si, &pi);
CloseHandle(pi.hThread);
CloseHandle(pi.hProcess);
return 0;
}