Tested my game on Vista

Miscellaneous Forums/General Discussion/Tested my game on Vista

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Right, sorted... Using Visual C++ Express and the Vista Windows SDK, I've come up with this:-

//ProgramData thing
#include <windows.h>
#include <shlobj.h>
#include <iostream>
#include <stdlib.h>

using namespace std;

int main(void)
{
	HRESULT hr;
	LPWSTR pStringOut = NULL;
	char *folderPath = new char[1000];

	hr = SHGetKnownFolderPath(FOLDERID_ProgramData,0, NULL,&pStringOut);
	
	if ( SUCCEEDED(hr) )
    {
		cout << "Folder found:-\n\n";
		WideCharToMultiByte(CP_ACP, 0, (LPWSTR)pStringOut, -1,folderPath, 1000, NULL, NULL);
		cout << folderPath << "\n";
	}
	system("PAUSE");
}


The whole solution is here to pick over (including an exe):-

http://www.syntaxbomb.com/ftp/dabz/ProgramData.zip

EDIT: Now, I know sod all about MinGW and its inner workings, so if anyone can build on this, great! ;)

Dabz