Hi all,

Firstly, my appologies for the appauling title of this thread - but I couldn't think of what to describe my problem as.

I have a C++ DLL built, which I'm using code from. Most of it works fine, however I'm experiencing something rather unsual (to me at least).

I have a method which Is exposing a method in my DLL:
Code:
char** dllGetProductKeyInfo( int Type )
{
	typedef char** (*GetProductKeyInfo)( int );
	GetProductKeyInfo _GetProductKeyInfo;

	_GetProductKeyInfo = (GetProductKeyInfo)GetProcAddress(hInstLibrary, "GetProductKeyInfo");

	if (_GetProductKeyInfo)
	{
		// Debug.
		printf("dllGetProductKeyInfo: %s\r\n", _GetProductKeyInfo(Type)[0] );
		printf("dllGetProductKeyInfo: %s\r\n", _GetProductKeyInfo(Type)[1] );
		// Debug.

		return _GetProductKeyInfo( Type );
	}
	else
	{
		return 0;
	}
}
This returns:
Code:
dllGetProductKeyInfo: CyberLink PowerDVD DX
dllGetProductKeyInfo: VDXXXXXXXXXXXXXX
Great, it works I thought. However, when trying to use dllGetProductKeyInfo(), I'm not so lucky.

Code:
void loadKeys( )
{
	char** tmpKeyInfo;

	// Size of the Keyfinder vector.
	int keyFinderSize = dllProductKeyInfoSize();

	for( int a =0; keyFinderSize > a; a++)
	{
		tmpKeyInfo = dllGetProductKeyInfo( a );
		
		// Debug.
		printf("loadKeys: %s\r\n", tmpKeyInfo[0]);
		printf("loadKeys: %s\r\n", tmpKeyInfo[1]);
		// Debug.
	}
}
Produces:
Code:
loadKeys: CyberLink PowerDVD DX
loadKeys: @dÇw........
Any thoughts as to what i've missed? - Been looking over it for so long I'm not really looking, if that makes sense.

Any help would be appreciated, if you know the solution I'd love to know why I've gone wrong

Cheers!