Click here to Skip to main content
15,922,574 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionAdding library modules for the linker from _code_ [SOLVED] Pin
sashoalm7-Jan-09 0:31
sashoalm7-Jan-09 0:31 
QuestionRe: Adding library modules for the linker from _code_ Pin
CPallini7-Jan-09 0:43
mveCPallini7-Jan-09 0:43 
AnswerRe: Adding library modules for the linker from _code_ Pin
sashoalm7-Jan-09 0:58
sashoalm7-Jan-09 0:58 
AnswerRe: Adding library modules for the linker from _code_ Pin
Stephen Hewitt7-Jan-09 0:52
Stephen Hewitt7-Jan-09 0:52 
GeneralRe: Adding library modules for the linker from _code_ Pin
sashoalm7-Jan-09 1:00
sashoalm7-Jan-09 1:00 
AnswerRe: Adding library modules for the linker from _code_ Pin
Iain Clarke, Warrior Programmer7-Jan-09 0:54
Iain Clarke, Warrior Programmer7-Jan-09 0:54 
GeneralRe: Adding library modules for the linker from _code_ Pin
sashoalm7-Jan-09 1:01
sashoalm7-Jan-09 1:01 
GeneralImplementation help Pin
Marimuthu.r7-Jan-09 0:06
Marimuthu.r7-Jan-09 0:06 
Hi Guys,

I have briefed on the current implementation of my application which is used to detect mobile data cards.

The application consists of an Main module and seperate dlls modules, one dll for each mobile data card that my application wants to detect.
This mobile data card dlls contain unique device info like the registry name/path that is used to uniquely identify an card from other cards hardcoded in them.

Assume 3 device dlls whose class goes by the name CMobileData_A and CMobileData_B. These class are derived from an base class CMobileData as indicated by the code snippet below.

class CMobileData
{
  public:
	bool DriverInstalled();//virtual function
	bool DevicePresent();//Virtual function
}

class CMobileData_A: public CMobileData
{
//These 2 methods are implemented in this class and will contain info(strings) unique to this card hardcoded in them.
  public:
	bool DriverInstalled();
	bool DevicePresent();
}

class CMobileData_B: public CMobileData
{
//These 2 methods are implemented in this class and will contain info(strings) unique to this card hardcoded in them.
  public:
	bool DriverInstalled();
	bool DevicePresent();
}

I have given 2 methods to illustrate the current implementation.

When application is started, the main module contains reads an xml file which contains the list of MobileData cards that it has to load(dll names of the different Mobile Data card dlls).

Each dll that is mentioned in the xml is dynamically loaded and it's instance created and the pointer to the instance stored in another list(say list m_DllsInstance) for all the dlls present in the xml.

Now the methods DriverInstalled() and DevicePresent() of all the dlls are called using their respective class instance using the list m_DllsInstance one after the other.

When the nth item in the m_DllsInstance list which refers to the CMobileData_A class instance, the 2 methods would be called. Only for this particular call will these 2 methods return success as
this is the currently used device. Hence my main application will contain the logic to figure out that this is the device in use there by detecting the card.

This application works fine.

But the problem here is that the current implementation will require a seperate dll for each mobile data card and this card will contain all the unique characteristices of the card.

I want the change the implementation such that there is a need for a single dll.
This dll inturn could refer to an external configurable file (say an xml file) which could contain info unique to each mobile data card.
The implementation should take these unqiue characteristics from the xml file and pass these info to these 2 methods.

The 2 methods instead of having the hardcoded unique device info, should recieve the requied info as a parameter.

Any guidance as to how i go about achieving this implementation will be of great help.
QuestionCMFCToolBar with CView Pin
N B sowmi7-Jan-09 0:02
N B sowmi7-Jan-09 0:02 
AnswerRegister an OCX programatically Pin
Mustapha Rédouane6-Jan-09 23:28
Mustapha Rédouane6-Jan-09 23:28 
GeneralRe: Register an OCX programatically Pin
CPallini6-Jan-09 23:46
mveCPallini6-Jan-09 23:46 
GeneralRe: Register an OCX programatically Pin
Randor 6-Jan-09 23:57
professional Randor 6-Jan-09 23:57 
QuestionCOleDataObject error Pin
NewVC++6-Jan-09 21:08
NewVC++6-Jan-09 21:08 
AnswerRe: COleDataObject error Pin
Cedric Moonen6-Jan-09 21:12
Cedric Moonen6-Jan-09 21:12 
Questionload image Pin
 Programmer.6-Jan-09 20:29
 Programmer.6-Jan-09 20:29 
AnswerRe: load image Pin
«_Superman_»6-Jan-09 21:04
professional«_Superman_»6-Jan-09 21:04 
AnswerRe: load image Pin
David Crow7-Jan-09 3:12
David Crow7-Jan-09 3:12 
QuestionHow to call a Dll Pin
tasumisra6-Jan-09 18:53
tasumisra6-Jan-09 18:53 
AnswerRe: How to call a Dll Pin
Cedric Moonen6-Jan-09 20:14
Cedric Moonen6-Jan-09 20:14 
AnswerRe: How to call a Dll Pin
Hamid_RT6-Jan-09 20:19
Hamid_RT6-Jan-09 20:19 
AnswerRe: How to call a Dll Pin
CPallini6-Jan-09 21:57
mveCPallini6-Jan-09 21:57 
AnswerRe: How to call a Dll Pin
nyeboy7-Jan-09 21:16
nyeboy7-Jan-09 21:16 
Questionstruct definition with : Pin
KASR16-Jan-09 18:20
KASR16-Jan-09 18:20 
AnswerRe: struct definition with : Pin
«_Superman_»6-Jan-09 18:48
professional«_Superman_»6-Jan-09 18:48 
GeneralRe: struct definition with : Pin
KASR16-Jan-09 19:09
KASR16-Jan-09 19:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.