View Single Post

renegadelink's Avatar

01.17.2012 , 09:04 PM | #1
So I've done some digging at why SWTOR and the steam overlay do not work together. The swtor mods didn't like my previous workaround so I figured I would help and explain what is wrong and how to fix it.

The steam overlay hooks SWTOR's launcher just fine. The problem comes right before the launcher starts SWTOR's client. The steam overlay is expecting the 'verb' argument to the windows api SHELL32 function ShellExecuteExW(, to be the unicode string, "open". However, SWTOR's launcher uses an empty string, "", which gets defaulted to open. Since an empty string does not equal "open", the steam overlay exits out and does not hook into SWTOR's client.

I've tested editing memory making the empty string equal, open, and the steam overlay works just fine. Steam also has to be running in admin mode unfortunately because the launcher needs to escalate to admin.

To fix the steam overlay one of two things can happen. Valve can put in a check for the empty string, and if that means open is the default, then continue business as usual. Or Bioware can change how they start the client giving the ShellExecuteExW, the parameter verb as "open".

I've written a very small program showing how SWTOR's launcher is starting the client. I added a comment on what needs to change to fix. This may also be a problem with other games with a launcher not working with steam overlay.

#include <windows.h>
#include <stdio.h>
#include <conio.h>

int main()
	// Steam Overlay is expecting lpVerb to equal "open", but since lpVerb is an empty string, the Steam Overlay exits out
	// So for the Steam Overlay to work, the next line must read:
	// LPCWSTR lpVerb = L"open";
	LPCWSTR lpVerb = L"";

	LPCWSTR lpFile = L"C:\\Program Files (x86)\\Electronic Arts\\BioWare\\Star Wars - The Old Republic\\swtor\\retailclient\\swtor.exe";
	LPCWSTR lpParameters = L"-set username ...";
	LPCWSTR lpDirectory = L"C:\\Program Files (x86)\\Electronic Arts\\BioWare\\Star Wars - The Old Republic\\swtor\\retailclient";
	LPCWSTR lpClass = L"";

	exec.cbSize = sizeof(exec);
	exec.hwnd = NULL;
	exec.lpVerb = lpVerb;
	exec.lpFile = lpFile;
	exec.lpParameters = lpParameters;
	exec.lpDirectory = lpDirectory;
	exec.hInstApp = NULL;
	exec.lpIDList = NULL;
	exec.lpClass = lpClass;
	exec.hkeyClass = NULL;
	exec.dwHotKey = 0;
	exec.hIcon = NULL;
	exec.hProcess = NULL;

	BOOL successful = ShellExecuteExW(&exec);
		printf("Execute Succeeded.\n");
		printf("Execute Failed.\n");

	printf("Press any key to exit...");
	return 0;
I've posted in the steam forums too.

Be sure to comment to keep the thread visible enough for mods/devs to see!