Module does not show up in Module List
Posted: Fri Oct 14, 2011 5:40 am
Hello community,
i recently became interestend in module-development (c++) for dvbdream.
For this reason, i wrote a test mod which has no function apart from showing up in the modules list. Unfortunately, the mod doesnt even show up there.
I would be glad if someone could help me to correct my code!
cheers
rusti
.h File:
----------------------
#pragma once
#pragma comment(lib, "user32.lib")
#include
#include
#include "Include\moduleAPI.h"
#if (!defined( MAKEINTRESOURCE ))
#define MAKEINTRESOURCE( res ) ((ULONG_PTR) (USHORT) res)
#endif
int __stdcall OnGetModuleInfo (TModuleInfo *pModuleInfo);
int __stdcall OnInit (TInitInfo *pInitInfo);
int __stdcall OnClose ();
int __stdcall OnShow ();
int __stdcall BeforeChannelChange (TChannelInfo *pChannelInfo);
int __stdcall AfterChannelChange (TChannelInfo *pChannelInfo);
int __stdcall OnDDEvent(DWORD EventType, void *EventParams);
---------------------
.cpp File:
---------------------
#include "stdafx.h"
#include "dvbdream_remote.h"
int DlgProc (HWND hWin, DWORD uMsg, DWORD wParam, DWORD lParam); ***EDIT: this line is actually not included anymore***
HWND hwndDD;
HINSTANCE hInstance;
#pragma unmanaged
bool APIENTRY DllMain (HANDLE hDll, DWORD dwReason, LPVOID lpReserved)
{
hInstance = (HINSTANCE)hDll;
return TRUE;
}
int __stdcall OnGetModuleInfo (TModuleInfo *pModuleInfo)
{
pModuleInfo->dwModuleAPI = MODULE_API_1_9;
pModuleInfo->dwModuleVer = 0x01010000; // v1.1
lstrcpy((LPWSTR)(TModuleInfo*)&pModuleInfo->szModuleAuthor, (LPCWSTR)"rusti");
lstrcpy((LPWSTR)(TModuleInfo*)&pModuleInfo->szModuleEmail, (LPCWSTR)"rusti@tu.de");
lstrcpy((LPWSTR)(TModuleInfo*)&pModuleInfo->szModuleName, (LPCWSTR)"DVB Dream Check");
pModuleInfo->dwModuleType = MODTYPE_REMOTE;
pModuleInfo->dwRequiredDDver = 0x01000000; // v1.0.0.0
return TRUE;
}
int __stdcall OnInit (TInitInfo *pInitInfo) {
hwndDD = pInitInfo->hMainWnd;
return FALSE;
}
---------------------
i recently became interestend in module-development (c++) for dvbdream.
For this reason, i wrote a test mod which has no function apart from showing up in the modules list. Unfortunately, the mod doesnt even show up there.
I would be glad if someone could help me to correct my code!
cheers
rusti
.h File:
----------------------
#pragma once
#pragma comment(lib, "user32.lib")
#include
#include
#include "Include\moduleAPI.h"
#if (!defined( MAKEINTRESOURCE ))
#define MAKEINTRESOURCE( res ) ((ULONG_PTR) (USHORT) res)
#endif
int __stdcall OnGetModuleInfo (TModuleInfo *pModuleInfo);
int __stdcall OnInit (TInitInfo *pInitInfo);
int __stdcall OnClose ();
int __stdcall OnShow ();
int __stdcall BeforeChannelChange (TChannelInfo *pChannelInfo);
int __stdcall AfterChannelChange (TChannelInfo *pChannelInfo);
int __stdcall OnDDEvent(DWORD EventType, void *EventParams);
---------------------
.cpp File:
---------------------
#include "stdafx.h"
#include "dvbdream_remote.h"
int DlgProc (HWND hWin, DWORD uMsg, DWORD wParam, DWORD lParam); ***EDIT: this line is actually not included anymore***
HWND hwndDD;
HINSTANCE hInstance;
#pragma unmanaged
bool APIENTRY DllMain (HANDLE hDll, DWORD dwReason, LPVOID lpReserved)
{
hInstance = (HINSTANCE)hDll;
return TRUE;
}
int __stdcall OnGetModuleInfo (TModuleInfo *pModuleInfo)
{
pModuleInfo->dwModuleAPI = MODULE_API_1_9;
pModuleInfo->dwModuleVer = 0x01010000; // v1.1
lstrcpy((LPWSTR)(TModuleInfo*)&pModuleInfo->szModuleAuthor, (LPCWSTR)"rusti");
lstrcpy((LPWSTR)(TModuleInfo*)&pModuleInfo->szModuleEmail, (LPCWSTR)"rusti@tu.de");
lstrcpy((LPWSTR)(TModuleInfo*)&pModuleInfo->szModuleName, (LPCWSTR)"DVB Dream Check");
pModuleInfo->dwModuleType = MODTYPE_REMOTE;
pModuleInfo->dwRequiredDDver = 0x01000000; // v1.0.0.0
return TRUE;
}
int __stdcall OnInit (TInitInfo *pInitInfo) {
hwndDD = pInitInfo->hMainWnd;
return FALSE;
}
---------------------