Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Skin Framework
  New Posts New Posts RSS Feed - Skin and Armadillo
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Skin and Armadillo

 Post Reply Post Reply
Author
Message
Kite View Drop Down
Groupie
Groupie


Joined: 10 May 2004
Location: Belarus
Status: Offline
Points: 35
Post Options Post Options   Thanks (0) Thanks(0)   Quote Kite Quote  Post ReplyReply Direct Link To This Post Topic: Skin and Armadillo
    Posted: 25 March 2007 at 11:47am
Xtreme SkinFramework doesn't work with Armadillo protection when statically linked. What can be done to make it work?
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 26 March 2007 at 3:03am
Hi,
 
we tried Armadillo  and it use same methods as unicows which can't  work together with SkinFramework.  :(
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Kite View Drop Down
Groupie
Groupie


Joined: 10 May 2004
Location: Belarus
Status: Offline
Points: 35
Post Options Post Options   Thanks (0) Thanks(0)   Quote Kite Quote  Post ReplyReply Direct Link To This Post Posted: 26 March 2007 at 4:15pm
In any case I have made workaround and it works fine with Armadillo and Xtreme Skin statically linked
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 27 March 2007 at 1:16am
Hi,
 
For future questions can you describe what you did?
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Kenneth View Drop Down
Senior Member
Senior Member
Avatar

Joined: 23 May 2004
Location: United States
Status: Offline
Points: 256
Post Options Post Options   Thanks (0) Thanks(0)   Quote Kenneth Quote  Post ReplyReply Direct Link To This Post Posted: 27 March 2007 at 6:16pm
How come Kite can get it to work and nobody else can.  We have the same basic problems, that is we use both Unicode and Armadillo.
 
The skin framework is a large part of the pro toolkit, and it should work with major packages such as Armadillo and Unicode.
 
Ken
 
 
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 28 March 2007 at 1:09am
Hi,
SkinFramework is very specific control - it hooks dll table to catch messages. Armadillo  do the same.
How SkinFramework should  work if it was already hooked by Armadillo ?
 
 
I guess you can create some loader dll, protect it with Armadillo  and from loader dll run your main application with skinframework.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Kite View Drop Down
Groupie
Groupie


Joined: 10 May 2004
Location: Belarus
Status: Offline
Points: 35
Post Options Post Options   Thanks (0) Thanks(0)   Quote Kite Quote  Post ReplyReply Direct Link To This Post Posted: 28 March 2007 at 4:25am
It was really difficult to make it work. I can give you a hint. Unicows and Armadillo works in almost the same way, right, but not the same!!! I do not use Unicows in my projects now because Xtreme is not support it and I cannot skip Armadillo also because of Xtreme.

First, when you use Armadillo you have wrong IMAGE_IMPORT_DESCRIPTOR because of protection and second, your functions like GetProcAddress, LoadLibraryA
will always point to Armadillo functions, not Xtreme after LoadSkin

I have written a small DLL with stubs for functions GetProcAddress, LoadLibraryA, LoadLibraryW and so on and link it in Unicows way, so that after compiling it uses my functions, not Armadillo and not Xtreme, and not system functions. But now I can do what I want with this DLLs. And after loading skin I put in this stubs pointers to Xtreme functions OnHookGetProcAddress and so on. It seems all works fine.

After all of this you can find that now you will not able to load ArmAccess.dll, because LoadLibrary now is ours. But according to Armadillo forum you can know that you can use GetModuleHandle(NULL) instead of calling LoadLibrary. And for GetProcAddress (note just for ArmAccess.dll functions) you can use:

DWORD GetProcAddressA(HINSTANCE hInst, const char *fnname) {
   typedef DWORD (__stdcall *GetProcAddressAFn)(HMODULE, LPCSTR);

   char tmp[256]="";
   DWORD addr;
   GetEnvironmentVariableA("GetProcAddressA", tmp, 256);
   addr=atol(tmp);
   if (addr!=0) {
      GetProcAddressAFn GPA=(GetProcAddressAFn)(addr);
      return GPA(hInst, fnname);
   } else return 0;
};

Back to Top
Kenneth View Drop Down
Senior Member
Senior Member
Avatar

Joined: 23 May 2004
Location: United States
Status: Offline
Points: 256
Post Options Post Options   Thanks (0) Thanks(0)   Quote Kenneth Quote  Post ReplyReply Direct Link To This Post Posted: 28 March 2007 at 7:53pm
I still think there is a lot of double talk about this whole issue.  I have had Armadillo and Unicows working together for several years.  It seems the only program that does not work is the skin framework.  So if it is impossible to hook if you are using Unicows, how does Armadillo work?  And the other way around?
Back to Top
Kite View Drop Down
Groupie
Groupie


Joined: 10 May 2004
Location: Belarus
Status: Offline
Points: 35
Post Options Post Options   Thanks (0) Thanks(0)   Quote Kite Quote  Post ReplyReply Direct Link To This Post Posted: 28 March 2007 at 8:58pm
We talk about skin here. And problem that all three things(Armadillo, Xtreme, Unicows) work almost in the same way. So the solution is how connect them in right way. Xtreme can work with Armadillo and Unicows and without skin, why not? And why you think that hook of Unicows impossible? I had working solution with Unicows and first version of Xtreme Skin.
Back to Top
Kenneth View Drop Down
Senior Member
Senior Member
Avatar

Joined: 23 May 2004
Location: United States
Status: Offline
Points: 256
Post Options Post Options   Thanks (0) Thanks(0)   Quote Kenneth Quote  Post ReplyReply Direct Link To This Post Posted: 28 March 2007 at 9:52pm

I agree with you.  Its Oleg that says its impossible for the skin framework to work with Armadillo or Unicows.  It just does not make sense that Armadillo and Unicows work well together, but the skinframework does not work with either.

Keep in mind that Armadillo and Unicows ALREADY work together, without having to modify anything!  Its only the skinframework that DOES NOT WORK.
 
 
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.188 seconds.