Click here to Skip to main content
15,918,808 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: change buttons style Pin
mitok27-Sep-07 3:13
mitok27-Sep-07 3:13 
GeneralRe: change buttons style Pin
Nishad S27-Sep-07 3:30
Nishad S27-Sep-07 3:30 
GeneralRe: change buttons style Pin
mitok27-Sep-07 3:52
mitok27-Sep-07 3:52 
GeneralRe: change buttons style Pin
Nishad S27-Sep-07 4:06
Nishad S27-Sep-07 4:06 
AnswerRe: change buttons style Pin
Naveen27-Sep-07 2:48
Naveen27-Sep-07 2:48 
GeneralRe: change buttons style Pin
Nishad S27-Sep-07 2:56
Nishad S27-Sep-07 2:56 
QuestionIs this idea viable? (about dll and namespace) Pin
Nelek27-Sep-07 0:05
protectorNelek27-Sep-07 0:05 
AnswerRe: Is this idea viable? (about dll and namespace) Pin
Cedric Moonen27-Sep-07 0:50
Cedric Moonen27-Sep-07 0:50 
I'm not sure I understood everything correctly. First, maybe some points:

Nelek wrote:
The problem I have is that the WriteTo functions have to be in a DLL for security to avoid as many problems as possible.


Why is it so Confused | :confused: ? Which security problems are you talking about ? Putting the code in the dll won't change anything.


Nelek wrote:
Changing the “working mode” want to be sure my file is there, so I want to check out if one member parameter in the dll has a concrete value (like a license or a password) and if all is good then use the function of the dll.


I didn't understand what you meant by "Changing working mode", but anyway: you probably load your dll implicitely (meaning that you use a lib file that contains the code to load your dll). If that is the case, then if your dll is missing, your program won't even start (you'll get a nice error message saying that the dll is missing as soon as you start your app). You could also load the dll explicitely, by making use of LoadLibrary and GetProcAddress functions. If you do that, you'll have full control on when your dll is loaded (but it is a little bit more complicated to use, specifically if you use classes). In that case, the LoadLibrary will return NULL if the dll cannot be loaded (e.g. missing).

Thus, for both scenarios, it doesn,t make any sense to call a function from your dll to see if it is present (because if you come to the point were you are able to call a function from the dll, then it means that your dll is present).


Nelek wrote:
including the *.lib to have the directions/links to the functions in the dll in my *.exe but delivering only the *.dll when I want to.


That will fail, as I explained before: if the dll is not present, you won't be able to start your program.

And for the namespace question, I didn't really understood what you meant. Isn't it simpler (if you could do it) that if you detect the dll, you call the function from it, otherwise you call another function from your class (with a different name for example). Why do you want to use namespaces for that ?


Cédric Moonen
Software developer

Charting control [v1.2]

GeneralRe: Is this idea viable? (about dll and namespace) Pin
Nelek27-Sep-07 1:49
protectorNelek27-Sep-07 1:49 
QuestionArticles on SAFEARRAY for implementing in VC++ Pin
shir_k26-Sep-07 23:54
shir_k26-Sep-07 23:54 
AnswerRe: Articles on SAFEARRAY for implementing in VC++ Pin
toxcct27-Sep-07 0:07
toxcct27-Sep-07 0:07 
Questionsetfocus Pin
bhogavalli suresh26-Sep-07 23:40
bhogavalli suresh26-Sep-07 23:40 
GeneralRe: setfocus Pin
Stephen Hewitt27-Sep-07 14:47
Stephen Hewitt27-Sep-07 14:47 
AnswerRe: setfocus Pin
Sunil P V26-Sep-07 23:52
Sunil P V26-Sep-07 23:52 
GeneralRe: setfocus Pin
Stephen Hewitt27-Sep-07 14:48
Stephen Hewitt27-Sep-07 14:48 
AnswerRe: setfocus Pin
zakkas248326-Sep-07 23:54
zakkas248326-Sep-07 23:54 
GeneralRe: setfocus Pin
Naveen27-Sep-07 0:17
Naveen27-Sep-07 0:17 
GeneralRe: setfocus Pin
zakkas248327-Sep-07 0:40
zakkas248327-Sep-07 0:40 
GeneralRe: setfocus Pin
Stephen Hewitt27-Sep-07 14:48
Stephen Hewitt27-Sep-07 14:48 
GeneralRe: setfocus Pin
zakkas248327-Sep-07 20:59
zakkas248327-Sep-07 20:59 
AnswerRe: setfocus Pin
Nishad S27-Sep-07 1:45
Nishad S27-Sep-07 1:45 
QuestionRe: setfocus Pin
David Crow27-Sep-07 3:11
David Crow27-Sep-07 3:11 
AnswerRe: setfocus Pin
Stephen Hewitt30-Sep-07 15:31
Stephen Hewitt30-Sep-07 15:31 
AnswerRe: setfocus Pin
Mark Salsbery27-Sep-07 5:36
Mark Salsbery27-Sep-07 5:36 
AnswerRe: setfocus Pin
Stephen Hewitt27-Sep-07 14:47
Stephen Hewitt27-Sep-07 14:47 

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.