Actually NOT sure why your Smart says "d3d9.dll not loaded" and yet it at the same time says: "d3d9.dll has no INIT method".. and it has an Init method:
Code:
LIBRARY "d3d9.dll" BASE=0x0000000069640000
DESCRIPTION "D3D9 Definition File"
EXPORTS
D3DPERF_BeginEvent = DXHook_D3DPERF_BeginEvent @1
D3DPERF_EndEvent = DXHook_D3DPERF_EndEvent @2
D3DPERF_GetStatus = DXHook_D3DPERF_GetStatus @3
D3DPERF_QueryRepeatFrame = DXHook_D3DPERF_QueryRepeatFrame @4
D3DPERF_SetMarker = DXHook_D3DPERF_SetMarker @5
D3DPERF_SetOptions = DXHook_D3DPERF_SetOptions @6
D3DPERF_SetRegion = DXHook_D3DPERF_SetRegion @7
DebugSetLevel = DXHook_DebugSetLevel @8
DebugSetMute = DXHook_DebugSetMute @9
Direct3DCreate9 = DXHook_Direct3DCreate9 @10
Direct3DCreate9Ex = DXHook_Direct3DCreate9Ex @11
Direct3DShaderValidatorCreate9 = DXHook_Direct3DShaderValidatorCreate9 @12
PSGPError = DXHook_PSGPError @13
PSGPSampleTexture = DXHook_PSGPSampleTexture @14
SMARTPluginInit @15
C++ Code:
bool SmartDebugEnabled = false;
bool SmartDirectXEnabled = true;
void SMARTButtonPressed(int ID, bool State)
{
switch(ID)
{
case 100:
if (State)
{
SmartGlobal->setCapture(false);
SmartDirectXEnabled = true;
}
else
{
SmartGlobal->setCapture(true);
SmartDirectXEnabled = false;
}
break;
case 101:
SmartDebugEnabled = State ? false : true;
break;
}
}
extern "C" void SMARTPluginInit(SMARTInfo* ptr, bool* ReplaceButtons, int* ButtonCount, char*** ButtonText, int** ButtonIDs, _SMARTButtonPressed* ButtonCallback)
{
SmartGlobal = ptr;
if (ptr)
{
*ReplaceButtons = true;
char** ButtonTexts = new char*[2];
ButtonTexts[0] = const_cast<char*>("Disable Direct-X_Enable Direct-X");
ButtonTexts[1] = const_cast<char*>("Enable Debug_Disable Debug");
int* IDs = new int[2];
IDs[0] = 100;
IDs[1] = 101;
*ButtonCount = 2;
*ButtonText = ButtonTexts;
*ButtonIDs = IDs;
*ButtonCallback = &SMARTButtonPressed;
}
}
Exact same code as in the OpenGL plugin.. It is practically impossible for the plugin NOT to be loading at all.. It exports everything Smart requires with the correct calling convention. In fact, if this plugin fails, so should OpenGL and that means SRL-6 is broken.. But yet that works :S I know I haven't made a mistake in the code; I just copy pasted my Smart headers from the OpenGL project into the DirectX project.
Another thing is that if the game fails to find an export, it will do:
MessageBox(nullptr, e.what(), "ERROR!", 0); which will show which export failed to load.. I don't think you are getting any popups?
The only thing I can think of is something may be wrong on your end?