|
Hi all,
Is there a way to allow only a specified program to load a dll.
For example: There is a dll called "test.dll" and I don't want other programs loading it except "test.exe". Is there a way to check the caller in dll main function and denide access if the caller is not authorized.
thanks.
Arun
|
|
|
|
|
Hi Toxcct,
toxcct wrote: that's stupid...
You're not playing well with others in the sandbox...
I've received the same sort of answers before (from PhD's no less). It made no sense because there was no context of the problem domain. What do you know of the OP's problem domain or project requirements? I did not see it in the original post.
Perhaps the OP has developed an RSA Integer Factorization algorithm he wants to use in his work only: the first being his RSA modulous generation program (to test that n = p * q ), and a second to factor other's moduli. In this case he may not want to share the functionality - for example, the NSA[^] has threatened him with bodily harm.
Finally, what if the DLL is actually a resource of custom graphics or messages...
Jeff
|
|
|
|
|
Hi,
I am not sure whether we can deny access to dll using system control.
But you can do that in your way.
For instance if your dll export a function
CYourDllClass *CreateInstance();
and the object it returns is needed for further processing.
you can do this
CYourDllClass *CreateInstance(yourSecurityKey)
{
if (Authorised(yourSecurityKey))
{
return new CYourDllClass();
}
else
{
return NULL;
}
}
Best Regards
-- modified at 6:42 Friday 1st June, 2007
|
|
|
|
|
|
|
No problem BusaBird. Apparently, others did not think so highly of the response - I received two 1.0's. Ouch!
Perhaps one of the poster's who I criticized for the content of their message has taken revenge. Oh well.
Jeff
|
|
|
|
|
|
do you have any other error before this one ?
moreover, what compiler do you use exactly ?
|
|
|
|
|
|
then, as CPallini suggested, haven't youremoved a #include <windows.h> directive in your stdafx.h header ?
|
|
|
|
|
|
Your test code compiles fine on my system (VS 2003).
Have you involuntarily modified any standard header file?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
No....
I have no idea whats going on ...
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
My Blog: ^_^
|
|
|
|
|
Try to send me (cpallini@tiscalinet.it) your headers...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Thanks Pallini,
I'm just busy with the VS2005 repair wizard. So I'll test it again, and let you know whether I got it working or not.
Thank you very much.
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
My Blog: ^_^
|
|
|
|
|
Email has been sent.
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
My Blog: ^_^
|
|
|
|
|
toxcct wrote: what compiler do you use exactly ?
Visual Studio 2005 Professional Edition.
But I'm going to try a repair installation, maybe it will work.
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
My Blog: ^_^
|
|
|
|
|
In fact winuser.h contains protoypes of functions using LPSECURITY_ATTRIBUTES as parameter, hence it as to be defined.
Maybe you're including (either directly or indirectly) winuser.h without prior to including windows.h .
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
|
So, after a uninstall - install everything seems to be working again ....
Sometimes I hate computers ...
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
My Blog: ^_^
|
|
|
|
|
Hi All
I am customizing ToolTip control for single document application. I want to show ToolTip control whenever user move mouse over Icons on ToolBar,so for this I want to know Handle of Each icons on ToolBar.
So if anybody have some hint to get handle of icons on ToolBar then plz forward me.
Thanks in Advance
Atul
|
|
|
|
|
Hi,
I have to port a few (old) applications written in C++ with VS6 and MFC to VS2005 under Vista.
Have anybody done that already?
Is it just rebuilding everything without any problems? What can I expect?
Are there any advantages with VS2005 compared to VS6?
Thanks
|
|
|
|
|
VC6 is a terrible C++ implimentation, there are many improvements which could cause problems with your code, depending on how standards complaint it is.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Terrible it is. Unfortunately I still have to use it at work
Steve
|
|
|
|
|
This is Christian's standard response when a discussion of VC6 vs VS2005 is concerned. I'm pretty sure he's bound a macro to a key so he doesn't actually have to type it out every time - he hits one key and it automatically fills in the text for him. (I'm sure he's concerned that he wasn't able to create the macro with VS2005, though.)
A good programmer knows about the limitations of his tools and takes precautions against poor coding practices when using said tools. Christian is a good programmer, but he's a little hung up on this VC6 thing.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|